Skip to content

⚡ Bolt: mirt::fscores 중복 호출 최적화#81

Open
seonghobae wants to merge 1 commit into
masterfrom
bolt/optimize-fscores-calculation-5529142817755687507
Open

⚡ Bolt: mirt::fscores 중복 호출 최적화#81
seonghobae wants to merge 1 commit into
masterfrom
bolt/optimize-fscores-calculation-5529142817755687507

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What (무엇을): R/aFIPC.R에서 mirt::fscores(..., method = 'MAP')의 중복 호출 제거
🎯 Why (왜): fscores는 무거운 연산이며, 기존에는 mirt::expected.test 호출 시점과 Theta 저장 시점에 각각 중복 계산되어 불필요한 CPU 자원을 낭비하고 있었습니다.
📊 Impact (영향): 중복 연산을 제거함으로써 함수의 실행 속도 및 메모리 효율성이 크게 향상될 것으로 기대됩니다.
🔬 Measurement (측정 방법): Rscript -e 'covr::package_coverage()' 명령과 R CMD check를 통해 테스트 및 패키지가 정상 동작하는지 확인하였고, 변경된 커버리지가 올바르게 유지됨을 검증했습니다.


PR created automatically by Jules for task 5529142817755687507 started by @seonghobae

aFIPC::autoFIPC() 내부에서 모델별로 (old, linked, new) MAP 기반 Theta 값을 구하는 mirt::fscores() 함수가 불필요하게 두 번씩 호출되고 있었습니다 (한 번은 예상 점수 산출 시점, 한 번은 Theta 자체 반환 시점).
해당 연산은 비용이 크므로(expensive operation), Theta 변수에 먼저 값을 할당(pre-calculate)한 뒤 예상 점수 산출 함수(mirt::expected.test)의 인자로 재사용하도록 개선했습니다.
이를 통해 중복 연산을 제거하고 성능을 향상시켰습니다.
@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.

@opencode-agent

opencode-agent Bot commented Jun 30, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 5f1de7a722c68aea9c3250f9952e4dc3d9e5ce32
  • Workflow run: 28432774220
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch bolt/optimize-fscores-calculation-5529142817755687507 cannot be merged cleanly into master; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest master into bolt/optimize-fscores-calculation-5529142817755687507, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 81 --repo ContextualWisdomLab/aFIPC
git fetch origin master
git merge --no-ff origin/master  # or: git rebase origin/master
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507
# rebase path only: git push --force-with-lease origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Change Flow DAG

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 5f1de7a722c68aea9c3250f9952e4dc3d9e5ce32
  • Workflow run: 28432774220
  • Workflow attempt: 1

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: master
  • Head branch: bolt/optimize-fscores-calculation-5529142817755687507
  • Fix direction: merge or rebase origin/master into bolt/optimize-fscores-calculation-5529142817755687507, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 81 --repo ContextualWisdomLab/aFIPC
git fetch origin master
git merge --no-ff origin/master  # or: git rebase origin/master
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507
# rebase path only: git push --force-with-lease origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch bolt/optimize-fscores-calculation-5529142817755687507 cannot be merged cleanly into master; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest master into bolt/optimize-fscores-calculation-5529142817755687507, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 81 --repo ContextualWisdomLab/aFIPC
git fetch origin master
git merge --no-ff origin/master  # or: git rebase origin/master
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507
# rebase path only: git push --force-with-lease origin HEAD:bolt/optimize-fscores-calculation-5529142817755687507
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Change Flow DAG

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 5f1de7a722c68aea9c3250f9952e4dc3d9e5ce32
  • Workflow run: 28432774220
  • Workflow attempt: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant