Skip to content

test(judge): close accepted-type and ownership gaps - #778

Merged
seonghobae merged 38 commits into
mainfrom
codex/fast-judge-accepted-type-regression
Aug 13, 2026
Merged

test(judge): close accepted-type and ownership gaps#778
seonghobae merged 38 commits into
mainfrom
codex/fast-judge-accepted-type-regression

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add regression coverage rejecting non-boolean advisory accepted values
  • cumulative-threshold judge mode and hardened category/result boundaries
  • restore documentation status vocabulary and native-entrypoint ownership references where still unique
  • includes fix(jmle): recognize objective convergence and add recovery evidence #770: L-BFGS objective-convergence recognition + real JMLE optimizer recovery evidence

Rebase

Rebased onto protected main after #788/#790. Redundant fitstats cov / docs-maturity deltas already on main via #788 were resolved in favor of main.

Validation

  • Local after rebuild: tests/test_jmle_optimizer_recovery.py + tests/test_llm_judge.py → 36 passed
  • Product gates will re-run on rebased head

Auto-merge when gates + non-author approval clear.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a27db5e4-8a51-4472-b3c7-0f8b8fe8c0a7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds cumulative-threshold categorization to the LLM judge, enforces strict validation for category inputs and responses, documents the policy in ADR 0014, updates documentation status governance, and replaces fit-statistics fallback tests with fail-closed compiled-core checks.

Changes

LLM judge categorization

Layer / File(s) Summary
Judge contracts and bounded validation
python/fast_mlsirm/llm_judge.py, docs/adr/0014-bounded-llm-judge-category-inputs.md, docs/adr/README.md
The judge enforces exact built-in scalar types and bounded IRT inputs. ADR 0014 documents the fail-closed validation policy.
Cumulative-threshold judge flow
python/fast_mlsirm/llm_judge.py, README.md
The judge validates monotone Boolean thresholds, derives categories, selects method-specific response fields, propagates the method, and documents calibration requirements.
Judge response and projection tests
tests/test_llm_judge.py
Tests cover threshold conversion, IRT projection, malformed responses, unsupported methods, scalar validation, category bounds, and Boolean advisory values.

Fit-statistics ownership verification

Layer / File(s) Summary
Compiled-core ownership tests
tests/test_cov_c_fitstats.py, docs/doctoring/fitstats_sx2_person_rust_required.md
S-X² and person-fit tests now verify RuntimeError when required Rust entrypoints are missing. NumPy fallback tests were removed.

Documentation status governance

Layer / File(s) Summary
Documentation coverage and governance rules
docs/documentation_coverage.md, docs/adr/0013-continuous-execution-and-documentation-governance.md
The documentation defines status shorthand, separates proposed architecture from protected-main behavior, updates capability status, and removes volatile active-PR details.
Documentation status regression checks
tests/test_documentation_coverage_fitness.py
Tests require protected-main status for parallel-analysis hardening and essay-report dark-mode accents.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ContextualOrchestratorJudge
  participant LLMProvider
  participant LLMJudgeResult
  ContextualOrchestratorJudge->>LLMProvider: Send method-specific prompt and evaluation payload
  LLMProvider-->>ContextualOrchestratorJudge: Return criterion_thresholds
  ContextualOrchestratorJudge->>ContextualOrchestratorJudge: Validate thresholds and derive categories
  ContextualOrchestratorJudge->>LLMJudgeResult: Preserve category_method and projected results
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the pull request's judge validation tests and ownership-boundary corrections.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fast-judge-accepted-type-regression

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.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head evidence (2026-08-12 Asia/Seoul):

  • PR test(judge): close accepted-type and ownership gaps #778 head: ccedd00.
  • Local validation at this head: .venv/bin/pytest -q => 3471 passed, 2 optional-PyYAML warnings; cargo test --workspace => 973 passed, 118 ignored, integration/doc tests passed.
  • The change adds explicit rejection coverage for accepted values 0, 1, true, and null; aligns stale S-X2/person-fit tests with the already-accepted Rust-only fail-closed contract; and repairs documentation status vocabulary.
  • Protected main was re-read and hardened without changing required check names: required_approving_review_count=1, enforce_admins=true, stale-review dismissal and last-push approval remain enabled, force pushes/deletions remain disabled.

No merge is authorized until all required checks conclude successfully on this exact SHA and an independent approval is present. No self-approval, bypass, or force push.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head status for fast-mlsirm PR #778: current head ccedd00. Local evidence remains 3471 Python tests passed with 2 optional PyYAML warnings and Rust workspace tests passed with 973 passed and 118 ignored. Remote exact-head checks have no failures; all recorded checks are terminal success/skip except the required opencode-review check, which is still queued. Aggregate reviewDecision is REVIEW_REQUIRED with no formal independent approval, and protection requires one approval with admin enforcement. No self-approval, auto-merge, or merge will be attempted.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head evidence for the latest fast-mlsirm push:

  • HEAD: 0721e55ce5d889b7917aa7da2891367adf3430dc
  • Added opt-in category_method="cumulative_threshold" for polytomous Judge results. The adapter requires explicit K, emits/validates exact Boolean threshold vectors, rejects non-monotone or malformed vectors, derives categories and weighted score, and keeps every call on the injected contextual-orchestrator path.
  • Added focused tests and updated the README to keep direct K-way projection experimental.
  • Local evidence: Judge/IRT tests 30 passed; Python suite 3477 passed with 2 existing PyYAML warnings; Rust workspace 973 passed/118 ignored; Python binding 6 passed.

This comment is tied to the exact HEAD above; a later push invalidates this evidence. No approval or merge is requested.

@seonghobae

Copy link
Copy Markdown
Contributor Author

The exact-head local MLX sweep is documented in contextual-orchestrator commit 1b7dbd2a46533f41072def1fb94283147134cab5 (benchmark and ADR 0006/0008). With the same two-criterion case and 2 repeats per K, direct scores were 1.0 at K=2/3/5/7 while cumulative-threshold scores were 1.0/1.0/0.5/0.3333; all 16 responses parsed and all two-item polytomous rows passed validation. This is calibration evidence only, not a claim that either method is unbiased. The current fast exact HEAD remains 0721e55ce5d889b7917aa7da2891367adf3430dc; later pushes invalidate this evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head security hardening evidence for fast-mlsirm PR #778:

  • Current head: 79a8e83d85552e1f353cfb266494e4551422a8b4.
  • The prior Strix run at 0721e55ce5d889b7917aa7da2891367adf3430dc first received NVIDIA NIM HTTP 429, then its fallback model reported a false Python-integer-overflow narrative without a structured vulnerability artifact. Independent review found the adjacent real boundary gap: isinstance(int) admitted comparison-forging int subclasses.
  • This commit now requires exact built-in int for bounded category_count and exact built-in int/float for category projection values; booleans, subclasses, oversized values, and coercion hooks fail closed. ADR-0014 and regression coverage were added.
  • Targeted Judge/IRT tests: 27 passed. Ruff on changed Python files: passed. Full Python and Rust checks are running; remote required checks are pending on this exact head.

This evidence is invalidated by any later push. No self-approval, bypass, or merge will be attempted.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Updated exact-head evidence for PR #778:

  • HEAD remains 79a8e83d85552e1f353cfb266494e4551422a8b4.
  • Local validation completed: .venv/bin/pytest -q => 3478 passed, 2 warnings; cargo test --workspace => 973 passed, 118 ignored; changed-file Ruff => passed.
  • The exact-type category-boundary fix and ADR-0014 are included in this SHA. Remote required checks are still running, including Strix.

No later push has invalidated this evidence. No self-approval, bypass, or merge will be attempted.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/adr/0014-bounded-llm-judge-category-inputs.md`:
- Around line 41-57: Add a primary-source citation and link for the
cumulative-threshold categorization method described by the ADR, along with a
brief summary of the source’s relevant findings. Place it in the decision or
supporting context near the category interpretation and score-derivation claims,
and explicitly limit the implementation claims to the scope supported by that
source.
- Line 4: Update the ADR’s Date field to the actual decision date, replacing the
future value in the document header before recording the ADR.

In `@docs/documentation_coverage.md`:
- Around line 38-40: Update the documentation around the Canonical
PyO3/public-export registry to describe it as the target architecture and future
source of truth, not the current protected-main implementation. Note that
ADR-0011 remains Proposed and protected main still uses separate native
initializers and package export paths.

In `@python/fast_mlsirm/llm_judge.py`:
- Around line 379-385: Update the category_method validation in the judge method
to reject non-string values before set membership, ensuring unhashable inputs
such as lists or dictionaries raise the existing ValueError rather than
TypeError. Add a regression test covering an unhashable category_method and
preserve the current validation for unsupported strings.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ef8dddcf-f59e-458b-ac21-20f6f385fdc7

📥 Commits

Reviewing files that changed from the base of the PR and between c91ae21 and 79a8e83.

📒 Files selected for processing (8)
  • README.md
  • docs/adr/0014-bounded-llm-judge-category-inputs.md
  • docs/adr/README.md
  • docs/doctoring/fitstats_sx2_person_rust_required.md
  • docs/documentation_coverage.md
  • python/fast_mlsirm/llm_judge.py
  • tests/test_cov_c_fitstats.py
  • tests/test_llm_judge.py

Comment thread docs/adr/0014-bounded-llm-judge-category-inputs.md
Comment thread docs/adr/0014-bounded-llm-judge-category-inputs.md
Comment thread docs/documentation_coverage.md Outdated
Comment thread python/fast_mlsirm/llm_judge.py
@seonghobae

Copy link
Copy Markdown
Contributor Author

Final local exact-head evidence for PR #778:

  • HEAD: 5c0dcd3b7ffb046fcdf2ff373100d0bdf512a87b.
  • Full Python suite: 3480 passed, 2 warnings (existing optional-PyYAML warning only).
  • Targeted Judge/IRT, documentation-contract tests: 50 passed; changed-file Ruff passed.
  • Rust workspace: 973 passed, 118 ignored; PyO3 binding crate: 6 passed.
  • This HEAD includes the exact-type category bounds, unhashable category_method normalization, ADR-0014 Samejima/OA Zotero evidence, and proposed-vs-protected-main documentation correction. All LLM-as-a-Judge calls remain routed through contextual-orchestrator.

Remote required checks, including Strix, are still running on this exact SHA. This evidence is invalidated by any later push. No self-approval, bypass, or merge will be attempted.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head local evidence for fast-mlsirm PR #778:

  • HEAD: 11291fd.
  • Python suite: 3483 passed, 2 existing optional-PyYAML warnings.
  • Rust workspace: 973 passed, 118 ignored.
  • Changed-file Ruff and git diff --check passed.
  • Added strict built-in type boundaries for public score, mode, item-type, text, criterion-key, and usage inputs; overflow and conversion-hook cases fail closed with regression coverage. All LLM-as-a-Judge calls remain injected through contextual-orchestrator.
  • No formal approval or merge is requested. Any later push invalidates this evidence; re-fetch exact-head checks, review threads, and protection before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Perform a fresh read-only semantic review of exact current head 11291fd. Focus on exact built-in type boundaries for score/mode/item-type/text/criterion keys/usage, overflow and conversion-hook behavior, strict model-output parsing, contextual-orchestrator-only Judge routing, and the multi-item dichotomous/polytomous IRT contract. Do not mutate the branch, self-approve, enable auto-merge, or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Local exact-head evidence for c54706c\n\n- Python: 3483 passed, 2 warnings\n- Rust workspace: 973 passed, 118 ignored\n- fast-mlsirm-py release tests: 6 passed\n- The uncommitted user-owned .Jules/palette.md was preserved and not staged.\n\nRemote Strix is still in progress and an independent current-head review is still required; this comment is evidence only, not an approval or merge instruction.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

auto-merge was automatically disabled August 12, 2026 07:25

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 07:38

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 35f6aab194c727e15d7b4b1664efdd71f7e7398d.

  • Head SHA: 35f6aab194c727e15d7b4b1664efdd71f7e7398d

  • Workflow run: 31574888494

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs (6 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs (6 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (6 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (6 files)"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae
seonghobae enabled auto-merge (squash) August 12, 2026 11:11
@seonghobae
seonghobae force-pushed the codex/fast-judge-accepted-type-regression branch from 2a79e97 to eeaef39 Compare August 12, 2026 11:36
@seonghobae

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (eeaef39)

Waiting on product CI for this exact head. Auto-merge remains the intended land path once non-author approval + required checks clear (require_last_push_approval still blocks self-merge).

@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 cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 24e4f11ad4f84602696d743af71b3eeaafd85570.

  • Head SHA: 24e4f11ad4f84602696d743af71b3eeaafd85570

  • Workflow run: 31617153931

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs (12 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs (12 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test (5 files)"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test (5 files)"]
  R3 --> V3["targeted test run"]
Loading

@seonghobae
seonghobae dismissed stale reviews from opencode-agent[bot] and opencode-agent[bot] August 13, 2026 01:22

Dismissing stale coverage-evidence request; required coverage-evidence is green on current tip.

@seonghobae
seonghobae enabled auto-merge (squash) August 13, 2026 02:51

Copy link
Copy Markdown
Contributor Author

@opencode-agent

@seonghobae
seonghobae merged commit 911c323 into main Aug 13, 2026
36 checks passed
@seonghobae
seonghobae deleted the codex/fast-judge-accepted-type-regression branch August 13, 2026 03:55
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