Audit FIPC linking formula integrity; pin formulas with tests#119
Conversation
Formula-integrity audit of the fixed item parameter calibration (FIPC) linking contract implemented by autoFIPC(). The estimation mathematics lives in mirt; this package only orchestrates the Kim (2006) contract of fixing old-form anchor parameters while non-anchor new-form parameters are estimated on the base scale. Reviewed every merged performance refactor that touches the linking path (#48/#52 fscores hoist, #51 grep->match anchor lookup, #56 category-count guard, #99 vectorized IPD anchor extraction) and confirmed each is mathematically equivalent - no term, margin, or constant changed. No formula damage found; nothing to restore. - Add tests/testthat/test-optimization-equivalence.R pinning the two formula-bearing expressions (#56 category count, #99 unlist extraction) to independent hand-computed reference values. - Strengthen test-fixed-parameter-calibration.R to assert non-anchor new-form items stay free (est == TRUE), pinning the second half of the Kim (2006) invariant. - Document the canonical linking equation, the refactor audit, and source DOIs (docs/fixed-parameter-item-calibration.md, docs/papers/README.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTAMs4bpSZS77Xe3RQjv9P
|
Order-safe local validation for the current #119 head. Current #119 head tested: Stack tested: Formula/literature scope checked:
Validation results from the disposable stack worktree:
Design/Figma scope check: this repository is still an R package with no frontend/visual surface, so no UI or Figma artifact is warranted for this PR. This is validation evidence only; merge still needs the required current-head checks and non-stale approval path. |
|
Order-safe validation for the current #119 head. Current #119 head tested: Local stack tested:
Scope checked:
Validation:
No PR branch was pushed or restacked; this is validation evidence only. #119 still needs the required review path before merge. |
OpenCode Review Overview
Pull request overviewOpenCode reviewed the current-head bounded evidence and found no blocking issues. FindingsNo blocking findings. SummaryApproval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Docs (2 files)"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs (2 files)"]
R1 --> V1["docs review"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head bounded evidence and found no blocking issues.
Findings
No blocking findings.
Summary
Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including docs/fixed-parameter-item-calibration.md, docs/papers/README.md.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects docs/fixed-parameter-item-calibration.md to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source checks are delegated to configured OpenCode web_search/Context7/DeepWiki sources when applicable; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: Playwright visual, DOM locator, ARIA snapshot, console, and responsive evidence were checked when a web UI surface was present; for non-web surfaces, API/CLI/log/docs/workflow interaction evidence was reviewed instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.
- Result: APPROVE
- Reason: The PR audits and pins the FIPC linking formula integrity with tests, ensuring correctness and maintainability.
- Head SHA:
132c26a5931c56521ecf581848ba3df337e40e1f - Workflow run: 29064329036
- Workflow attempt: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Docs (2 files)"]
S1 --> I1["operator or user guidance"]
I1 --> R1["Review risk: Docs (2 files)"]
R1 --> V1["docs review"]
Evidence --> S2["Test (2 files)"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test (2 files)"]
R2 --> V2["targeted test run"]
Summary
Formula-integrity audit of the fixed item parameter calibration (FIPC) linking
contract implemented by
autoFIPC(). The estimation mathematics (item-responseprobabilities, MML-EM,
fscores,expected.test, DIF/IPD statistics) lives inmirt; this package only orchestrates the Kim (2006) contract: old-form anchoritem parameters are held fixed while non-anchor new-form parameters are
estimated onto the established base scale.
Refactors audited (all mathematically equivalent — no damage found)
Every merged performance refactor that touches the linking path was checked
against the canonical equation:
82fa77d,762b8a9) — hoistfscores(..., method='MAP')intoa reused variable. MAP scoring is deterministic for a fitted model → identical.
07e94d2) —grep('^name$', cols)→match(name, cols)anchorlookup. Same index for unique column names;
matchis exact-string. Linkedvalues unchanged.
fc8bbfb) — category-count guardlength(levels(as.factor(x)))→length(na.omit(unique(x))). Both count distinct non-missing categories.d73adbd) — vectorize IPD anchor extraction (loop →as.character(unlist(IPDItemList[row, cols]))). Rows (old/new) and screenedcolumn order preserved exactly.
No term, margin, constant, or numerical-stability property was altered, so
nothing needed to be restored.
Changes
tests/testthat/test-optimization-equivalence.R— pins the twoformula-bearing expressions (⚡ Bolt: 공통 항목 조회 루프 내 성능 최적화 #56 category count, ⚡ Bolt: 루프 내 데이터 프레임 서브셋팅 벡터화 성능 최적화 #99 anchor extraction) to
independent hand-computed reference values, guarding against future
performance re-optimizations silently changing their meaning.
test-fixed-parameter-calibration.R— asserts non-anchornew-form items remain free (
est == TRUE), pinning the second half of theKim (2006) invariant (only anchors are fixed).
and cite the source formulas by DOI (
docs/fixed-parameter-item-calibration.md,new
docs/papers/README.md). Copyrighted JEM PDFs are cited by DOI rather thanredistributed; the open-access
mirt(JSS) reference is included.Verification
testthatsuite green (0 failures; pre-existing mirt info-matrixwarnings only). New pinning file: 6/6 assertions pass.
markdownlint-cli2clean ondocs/**/*.md.🤖 Generated with Claude Code