Skip to content

Audit FIPC linking formula integrity; pin formulas with tests#119

Merged
seonghobae merged 4 commits into
masterfrom
audit/formula-integrity
Jul 10, 2026
Merged

Audit FIPC linking formula integrity; pin formulas with tests#119
seonghobae merged 4 commits into
masterfrom
audit/formula-integrity

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Summary

Formula-integrity audit of the fixed item parameter calibration (FIPC) linking
contract implemented by autoFIPC(). The estimation mathematics (item-response
probabilities, MML-EM, fscores, expected.test, DIF/IPD statistics) lives in
mirt; this package only orchestrates the Kim (2006) contract: old-form anchor
item 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:

No term, margin, constant, or numerical-stability property was altered, so
nothing needed to be restored.

Changes

  • New tests/testthat/test-optimization-equivalence.R — pins the two
    formula-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.
  • Strengthened test-fixed-parameter-calibration.R — asserts non-anchor
    new-form items remain free (est == TRUE), pinning the second half of the
    Kim (2006) invariant (only anchors are fixed).
  • Docs — restate the canonical linking equation, record the refactor audit,
    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 than
    redistributed; the open-access mirt (JSS) reference is included.

Verification

  • Full testthat suite green (0 failures; pre-existing mirt info-matrix
    warnings only). New pinning file: 6/6 assertions pass.
  • markdownlint-cli2 clean on docs/**/*.md.

🤖 Generated with Claude Code

Seongho Bae and others added 2 commits July 8, 2026 20:13
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
@seonghobae

Copy link
Copy Markdown
Collaborator Author

Order-safe local validation for the current #119 head.

Current #119 head tested: ab20ac96f994b0f5c68c6b1368e0448927d23cbd.

Stack tested: origin/master + #93 + #108 + #111 + #113 (4f38215) + #115 + #117 + #118 + #119.

Formula/literature scope checked:

  • Audit FIPC linking formula integrity; pin formulas with tests #119 adds the FIPC source-paper README and expands docs/fixed-parameter-item-calibration.md with the anchor/base-scale contract.
  • test-fixed-parameter-calibration.R now asserts non-common new-form parameters remain estimated/free while common anchors are fixed to old-form values.
  • New test-optimization-equivalence.R pins the category-count and IPD anchor-extraction refactors to hand-computed references.

Validation results from the disposable stack worktree:

  • Queue-order merge completed cleanly with no conflicts.
  • git diff --check origin/master...HEAD: clean.
  • R CMD INSTALL . with local R 4.4.1: DONE (aFIPC).
  • Full testthat::test_dir('tests/testthat'): FAIL 0 | WARN 0 | SKIP 0 | PASS 42.
  • Exact markdownlint command used by CI: 15 files linted, 0 error(s).

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.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

Order-safe validation for the current #119 head.

Current #119 head tested: c926033bf2889d5b6a9ec06d17cef2c10e0ff7d2.

Local stack tested:

Scope checked:

  • Audit FIPC linking formula integrity; pin formulas with tests #119 expands the FIPC source-paper/contract documentation.
  • test-fixed-parameter-calibration.R now covers all-zero, all-one, and missing common-item response rows while preserving the fixed-anchor/free-non-anchor contract.
  • test-optimization-equivalence.R pins the category-count and IPD anchor-extraction refactors to hand-computed references.

Validation:

  • Queue-order merge completed cleanly with no conflicts.
  • git diff --check origin/master...HEAD: clean.
  • Audit FIPC linking formula integrity; pin formulas with tests #119 delta over ci: centralize governance — remove local workflows duplicated by central .github #118 is exactly: docs/fixed-parameter-item-calibration.md, docs/papers/README.md, tests/testthat/test-fixed-parameter-calibration.R, and tests/testthat/test-optimization-equivalence.R.
  • npx --yes markdownlint-cli2@0.18.1 README.md AGENTS.md ARCHITECTURE.md CLAUDE.md CONTRIBUTING.md .github/**/*.md docs/**/*.md: 15 files linted, 0 errors.
  • C:\Program Files\R\R-4.4.1\bin\R.exe CMD INSTALL .: DONE (aFIPC).
  • C:\Program Files\R\R-4.4.1\bin\Rscript.exe -e testthat::test_dir('tests/testthat'): FAIL 0 | WARN 0 | SKIP 0 | PASS 41.

No PR branch was pushed or restacked; this is validation evidence only. #119 still needs the required review path before merge.

@opencode-agent

opencode-agent Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 132c26a5931c56521ecf581848ba3df337e40e1f
  • Workflow run: 29064329036
  • Workflow attempt: 1
  • Gate result: APPROVE (approval step)

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"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

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 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"]
Loading

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