Skip to content

superseded: surveyFA first-minimum selector - #315

Closed
seonghobae wants to merge 5 commits into
masterfrom
bolt-surveyFA-which-min-2267857839920636502
Closed

superseded: surveyFA first-minimum selector#315
seonghobae wants to merge 5 commits into
masterfrom
bolt-surveyFA-which-min-2267857839920636502

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #178

Fresh effective-delta review at b2f571d2819c65ad3f8c97a7fae8f99b92daf1d9 found one valid semantic change: replace the full-sort minimum selection in surveyFA() with a first-minimum linear scan.

#178 now owns that contract on exact head 4ac94f31ccf8d6dd24fabe1029835a2a82ceb838 with a narrower implementation and direct protected-expression equivalence coverage for ordinary, tied, negative, normalized-missing, and empty named vectors.

The remaining #315 delta is not unique product evidence:

  • .Rbuildignore additions are unrelated to minimum selection;
  • .jules/bolt.md turns a local experiment into repository-wide doctrine and is intentionally not inherited;
  • mockery is introduced only to support the added test scaffolding;
  • the two integration tests assert only that a model object is returned and do not observe which candidate was selected, so they do not establish an additional selector/fallback contract.

The canonical successor therefore carries every valid semantic/test contract from this PR while rejecting unrelated or non-probative delta. #178 remains Draft until its own unchanged exact-head checks and qualifying independent review are complete. This closure does not transfer GREEN evidence, merge authority, or performance claims.

surveyFA.R에서 가장 작은 p-value를 찾을 때 사용되던 sort(p_values)[1]를 which.min(p_values)로 교체하여 O(N log N)의 시간 복잡도를 O(N)의 선형 시간으로 개선했습니다.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 183be63b-a1c1-4c99-91e7-fb7c0b003a83

📥 Commits

Reviewing files that changed from the base of the PR and between afe2dea and 0b2d51f.

📒 Files selected for processing (2)
  • .Rbuildignore
  • DESCRIPTION

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

surveyFA()의 autofix 항목 선택이 전체 정렬 대신 which.min()을 사용하도록 변경되었습니다. 최소 p-value 선택과 분산 기반 대체 경로를 검증하는 테스트가 추가되었습니다.

Changes

surveyFA 항목 선택

Layer / File(s) Summary
최소 p-value 선택 로직
R/surveyFA.R, .jules/bolt.md
select_bad_item()이 p-value 전체 정렬 대신 which.min()으로 후보를 선택합니다. 최소값과 최대값 탐색에 선형 탐색을 사용하는 문서 항목이 추가되었습니다.
항목 선택 경로 검증
tests/testthat/test-surveyFA.R, DESCRIPTION, .Rbuildignore
노이즈가 있는 item3 선택과 mirt::itemfit 실패 후 분산 기반 대체 경로를 검증하는 테스트를 추가했습니다. 테스트용 mockery 의존성을 선언하고 관련 파일을 R 패키지 빌드에서 제외합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 0b2d5

The PR replaces full p-value sorting with linear minimum selection and adds focused tests; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

  • ContextualWisdomLab/aFIPC#203: surveyFA.R의 최소 p-value 선택을 sort()에서 which.min()으로 변경하고 동일한 .Rbuildignore 패턴을 추가합니다.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 sort() 대신 which.min()을 사용하여 최소값 탐색 성능을 개선하는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-surveyFA-which-min-2267857839920636502

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment on lines +117 to +118
expect_true(inherits(fitted, "SingleGroupClass"))
# Verify that candidate extraction which uses which.min() works without error

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Selection tests miss their target

Both tests only require a fitted model. They can pass without removing an item, so regressions in which.min() selection remain undetected.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread tests/testthat/test-surveyFA.R
surveyFA.R에서 가장 작은 p-value를 찾을 때 사용되던 sort(p_values)[1]를 which.min(p_values)로 교체하여 O(N log N)의 시간 복잡도를 O(N)의 선형 시간으로 개선했습니다. 아울러 변경사항을 검증하기 위한 테스트 코드도 추가하였습니다.
surveyFA.R에서 가장 작은 p-value를 찾을 때 사용되던 sort(p_values)[1]를 which.min(p_values)로 교체하여 O(N log N)의 시간 복잡도를 O(N)의 선형 시간으로 개선했습니다. 아울러 변경사항을 검증하기 위한 테스트 코드도 추가하였습니다.
coderabbitai[bot]

This comment was marked as resolved.

surveyFA.R에서 가장 작은 p-value를 찾을 때 사용되던 sort(p_values)[1]를 which.min(p_values)로 교체하여 O(N log N)의 시간 복잡도를 O(N)의 선형 시간으로 개선했습니다. 아울러 변경사항을 검증하기 위한 테스트 코드도 추가하였습니다.
surveyFA.R에서 가장 작은 p-value를 찾을 때 사용되던 sort(p_values)[1]를 which.min(p_values)로 교체하여 O(N log N)의 시간 복잡도를 O(N)의 선형 시간으로 개선했습니다. 아울러 변경사항을 검증하기 위한 테스트 코드도 추가하였습니다.
@seonghobae seonghobae added enhancement priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks labels Sep 2, 2026 — with ChatGPT Codex Connector
@seonghobae seonghobae changed the title ⚡ Bolt: 최소값 탐색에 sort() 대신 which.min()을 사용하여 O(N) 성능 최적화 superseded: surveyFA first-minimum selector Sep 6, 2026
@seonghobae seonghobae closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant