Skip to content

Require a language_completeness row before the verdict corpus scores a live case - #11894

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/corpus-language-row-admission-11272
Nov 1, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/corpus-language-row-admission-11272

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #11272

Acceptance delta (one sentence): The verdict-corpus harness admits a live measurement only when the check JSON carries a single evidenced language_completeness row (complete, complete_zero, partial) for the case's language; every other state is not-established.

What changed

  • admit_measurement reads /language_completeness/languages from the check JSON and requires exactly one row for the subject language with an evidenced status.
  • Refusals: missing projection, no single row for the language (including a sibling-only row), and unavailable/invalid/failed/unsupported/not_selected/no_current_scope.
  • RIPR-SPEC-0219 documents the requirement; changelog fragment added.

Proof

  • cargo test -p xtask verdict_corpus: 170 passed
  • cargo xtask verdict-corpus check-all: 4 corpora, exit 0
  • cargo xtask precommit: exit 0

Generated by Claude Code

…a live case

The corpus harness now refuses to admit a measurement whose subject
language has no single evidenced row (complete, complete_zero, partial)
in the check JSON's language_completeness projection. Unavailable,
invalid, failed, unsupported, not_selected and no_current_scope rows,
a missing projection, and a sibling-language-only row are all
not-established rather than scored.

Governing issue: #11272

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvmPmncg5vuMm5SAwBx1Ap
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: a8d20dfa-1d69-49c3-b684-abcf20e2eb6f
Commits

Reviewing files that changed from the base of the PR and between 714aed0 and 50074be.

Files selected for processing: 4
  • changelog.d/11272-corpus-language-row-admission.md
  • docs/specs/RIPR-SPEC-0219-labeled-rust-verdict-corpus.md
  • xtask/src/reports/verdict_corpus.rs
  • xtask/src/reports/verdict_corpus_tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Copy link
Copy Markdown
Member Author

Review of record, head 9085677 (self-review, COMMENT disposition; bot reviewers hit quota and are not counted).

Angles inspected:

  • Semantic owner: the check is in admit_measurement, the one admission path (verdict_corpus.rs:2603), after language routing. No second validator.
  • Fail-closed: missing projection, zero rows, duplicate rows, a sibling-only row, and any status outside complete/complete_zero/partial all return not-established. Unit tests cover each, including the sibling-only perl case.
  • Real route: cargo xtask verdict-corpus check-all ran the built ripr over all 4 corpora (exit 0), so live cases carry the feat(check-json): project per-language completeness into check --json (#11272) #11696 projection and none was newly refused.
  • Spec/docs: RIPR-SPEC-0219 states the requirement; changelog fragment added.
  • Local proof: cargo test -p xtask verdict_corpus 170 passed; cargo xtask precommit exit 0.

No blocking findings. Hosted Ripr Rust Small Result on this head is still required before merge.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 21:19
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member Author

Rust tests shard 1 of 4 is red on head 9085677 at guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals ("None" != "0" returns None, expects Some(true)). It is not this PR's: the diff is xtask-only, and I reproduced the same failure on current main in a detached worktree. #11842 changed shared literals_equal for mixed kinds. The fix of record is #11918 ("None never equals a number in shared literal equality (main red)"). I will request the Result again once it merges.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 9085677): REVIEW_INCOMPLETE

Inspected:

  • Head re-fetched before writing: 9085677 (base 7118be7). One commit: 9085677 "Require a language_completeness row before the verdict corpus scores a live case".
  • Changed files (REST pulls/11894/files): changelog.d/11272-corpus-language-row-admission.md (+6/-0, added), docs/specs/RIPR-SPEC-0219-labeled-rust-verdict-corpus.md (+9/-2), xtask/src/reports/verdict_corpus.rs (+34/-0), xtask/src/reports/verdict_corpus_tests.rs (+46/-0).
  • Governing issue #11272 ("fix(verdict-corpus): require expected-language completion and subject binding before scoring", open). Its "One bounded outcome" requires, before the harness scores a live case result, canonical producer evidence that the expected language and mode were actually analyzed, that the outcome permits scoring, that the outcome belongs to the intended subject, and that a legitimate completed zero-result case is distinguishable from missing dispatch, wrong-language output, no-current-scope, failure and incomplete analysis. It also says the expected language must come from the validated corpus/subject dispatch authority and not from the returned language label.
  • The implementation honours that authority rule: the row is selected by comparing each row's "language" to subject.language, the dispatch-derived expectation, and a row naming a sibling language does not satisfy it. That is exactly the point the issue calls out.
  • Direction of effect: this strengthens the gate rather than loosening it. admit_measurement now refuses three further ways: no /language_completeness/languages projection, no single row for the subject language, and a row whose status is not complete, complete_zero or partial. Each refusal is reported as an unestablished measurement, which the spec already treats as never a silent verdict.
  • I checked that the gate covers every live-scored case rather than one path: case_check_output has a single production call site (xtask/src/reports/verdict_corpus.rs:2539) and always calls admit_measurement, so no route reaches a scored case without the new check. The Perl-specific refusal is layered on top and is untouched.
  • Discriminators: xtask/src/reports/verdict_corpus_tests.rs extends case_output_requires_affirmative_expected_language_evidence with the negative and positive cases. Six non-evidenced statuses (unavailable, invalid, failed, unsupported, not_selected, no_current_scope) are each refused with the status named in the message; three evidenced statuses (complete, complete_zero, partial) are each admitted; a missing projection is refused with "language_completeness" in the message; and a sibling-only row is refused with "no single row". Revert the new gate and all eight refusal cases would instead be admitted, so the tests discriminate the changed behavior rather than restate it. The synthetic measurement helper also had to grow a language_completeness projection, which is itself evidence that the gate now binds the fixture.
  • Conventions: the changelog fragment is present, correctly sectioned (Fixed) and carries the #11272 reference. RIPR-SPEC-0219 is narrowed in the same change with the requirement, the accepted statuses and the full refusal list, matching the repo's habit of narrowing the owning spec alongside the behavior change.
  • Hosted evidence at head 9085677: merge-ready run 41243038769 and CI run 41243038761.

Blocking:

  • The required check "Ripr Rust Small Result" is RED at this head (job 124673978374). The Rust gates job (124662008805) is SUCCESS and shards 2, 3 and 4 are SUCCESS; shard 1 (job 124668794950) fails on exactly one test, the inherited python red analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals at crates/ripr/src/analysis/language/python/guard_activation.rs:1436, and that shard's JUnit carries exactly one failure element with that name. I confirmed the red is inherited rather than candidate-attributable two independent ways: this PR's merge commit 8ecb45c has first parent 7118be7, which does not contain the python fix a5c3ba4 (merged to main at 23:08:59Z by #11918), so the merge base predates the fix; and the same failure reproduces at that base SHA in the directly comparable base run 41243698892 job 124662661026. A merge onto current main would not reproduce it. The required check is nevertheless red at the reviewed head, so the disposition cannot be REVIEW_READY.

Non-blocking:

  • The candidate's own evidence is green at this head. I read the four shard JUnits directly: the new test case_output_requires_affirmative_expected_language_evidence ran and passed in shard 4, and 180 verdict_corpus tests are green across shards 2 to 4. The only red in the whole run is the inherited python test, so what is missing is the required check's redness, not candidate behavior.
  • The synthetic measured() helper in the xtask tests now injects a language_completeness row with a fixed status of complete_zero, findings 0 and disclosure silent regardless of the outcome kind under test. That keeps the fixture stable, but the fixture's per-language row is not derived from the aggregate outcome it accompanies, so a case whose aggregate kind were complete_with_findings would still carry complete_zero. The test varies the row explicitly, so the gate is exercised either way; a helper that derived the row from the case would make the fixture self-consistent.
  • The accepted status set admits partial as evidence of a run while refusing invalid, failed, unavailable, unsupported, not_selected and no_current_scope. That boundary matches the pre-existing aggregate contract, since SCOREABLE_OUTCOME_KINDS already contains partial_with_limitations, so this is alignment rather than a widening. It does mean a language row that completed while disclosing its own limits is admitted as a live measurement, and the spec now says so explicitly, which is the right place for that decision to live.
  • The refusal message for a non-evidenced row reads "its language_completeness row is <status>". The status is named, which is what makes the refusal actionable, but the message does not say what would make the row evidenced.
  • The changelog fragment wraps one bullet across six lines. The changelog gate folds indented continuation lines into the single entry, so this passes the check and will fold as one bullet; worth confirming at the fold.

Not run:

  • This review host has no Rust toolchain: rustc, cargo and rustup are all absent from PATH. Nothing was built, compiled, formatted, linted or tested locally. cargo fmt --check, cargo clippy, cargo xtask precommit, cargo xtask verdict-corpus check-all and every local cargo xtask gate were NOT run by this review.
  • The hosted shard 1 lane is red for the inherited python test, so the full suite was not green at this head; shards 2, 3 and 4 are green.
  • I did not execute the verdict corpus corpora myself. The corpus gate's green status at this head comes from the hosted Rust gates job; I did not re-derive that job's step list from the workflow file.
  • No runtime or mutation execution was performed. Every exposure statement here is static, and no claim is made about runtime mutation outcomes or test-suite sufficiency.
  • No repository file was modified and no HEAD-moving git command was run.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 908567785b9c156cde255046193d9d6e1732e662. Not an approval.

Copy link
Copy Markdown
Member Author

Independent review read: its only blocker was the inherited Python red in shard 1, fixed on main by #11918 (merged 23:08Z). The candidate head is unchanged (9085677), so its review stands. I cleared and re-applied merge-ready to re-request the Result against the current main.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Rust gates is red on head 0b2a6f4 at check-process-policy: policy/process_allowlist.d/11720-first-pr-run-chain.txt is orphaned since #11924 removed the use std::process::Command line from run_chain.rs. Not this PR's: the failure reproduces on main and the diff is xtask/docs only. Fixes of record are open on main: #11975 (this allowlist entry), #11982 and #11989 (two other main-red tests). I will merge main and re-request the Result after they land. The Python red from earlier is fixed by #11918, already in this head.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head 0b2a6f4): REVIEW_INCOMPLETE

Inspected:

  • Head re-read from the API before writing: 0b2a6f47eacd8129e79460c854dd70350686a00f, base a69bf0214f7bd7e0537a1cdd07e95608e5a366e8 (current main tip), draft: false, mergeable: MERGEABLE, mergeStateStatus: BLOCKED, labels ['merge-ready']. This matches the head named in the dispatch; it had not moved.
  • The delta from the previously reviewed head 908567785b9c156cde255046193d9d6e1732e662 is 941 paths, and none of it is the candidate's. I compared blob ids per path: xtask/src/reports/verdict_corpus.rs 31b1053033, xtask/src/reports/verdict_corpus_tests.rs 864833629a, docs/specs/RIPR-SPEC-0219-labeled-rust-verdict-corpus.md ae8bb409f8, changelog.d/11272-corpus-language-row-admission.md e66b489330 - all four are byte-identical at the old head and at this head. The candidate's true contribution is still 4 files, +95/-2.
  • The gate itself, read at this head: xtask/src/reports/verdict_corpus.rs:2625 admit_measurement, the new block at :2682-2717, and EVIDENCED_LANGUAGE_STATUSES at :2717.
  • The producer the gate reads, read at this head: crates/ripr/src/analysis/language_outcome.rs:76-113 (LanguageOutcomeStatus and its as_str wire vocabulary) and crates/ripr/src/analysis/language_outcome/view.rs:91-110 (the language_completeness projection shape: schema_version, mode, completeness, total_findings, languages[] with language, status, findings, limitations, disclosure).
  • The owning spec at this head: docs/specs/RIPR-SPEC-0219-labeled-rust-verdict-corpus.md:289-300.
  • The host-routine step list for job 124713888980 (Rust gates) and 124715782184 (aggregate) at this head, and the step list for the main-tip base job 124707375551.

Blocking:

  • The required check Ripr Rust Small Result is RED at this head (job 124715782184), and the cause is not this candidate. The Rust gates job 124713888980 fails at step 16, Repository policy preflight, with xtask: check-policy-all: 1 gate(s) failed: check-process-policy and crates/ripr/src/output/first_pr/run_chain.rs allowlist entry for 'use std::process::Command' is orphaned: max_count=1 but pattern not found in any tracked file. The same job at the main tip a69bf0214 (job 124707375551) fails at exactly the same step with exactly the same message, and the candidate's contribution touches no policy file, no run_chain.rs and no allowlist. Not candidate-attributable.
  • The consequence for this candidate is stronger than for most: because step 16 fails first, every step after it was skipped - including step 28 Verdict corpora, which is the gate that exercises this candidate's own change, and step 30 Required Rust tests, which would have run the candidate's new xtask test. The candidate's behaviour is therefore unobserved at this head. A red required check that is inherited from base is REVIEW_INCOMPLETE with the attribution stated, not REVIEW_READY.
  • No blocking defect in the candidate itself. I did not find one.

Non-blocking:

  • Earlier blocking finding (the required check was red because of the inherited python test compare_literal_values_fails_open_on_undecoded_literals): STALE as to cause, unchanged as to disposition. That python red is not what is red now. The same required check is still red, for the base-side check-process-policy orphan instead. The earlier review's reasoning - the red is inherited, the disposition therefore cannot be REVIEW_READY - still holds; the identified cause has moved.
  • Earlier non-blocking finding (the synthetic measured() helper injects a fixed complete_zero language row regardless of the outcome kind under test): STILL HOLDS. xtask/src/reports/verdict_corpus_tests.rs still hard-codes "status": "complete_zero", "findings": 0, "disclosure": "silent" in the helper, so a case whose aggregate kind were complete_with_findings would still carry complete_zero. The tests vary the row explicitly, so the gate is exercised either way; a helper that derived the row from the case would make the fixture self-consistent. Unchanged by this delta.
  • Earlier non-blocking finding (partial is admitted as evidence of a run): STILL HOLDS, and it is now provably aligned rather than merely plausible. The producer's LanguageOutcomeStatus is a closed set of nine: complete, complete_zero, partial, unavailable, invalid, failed, unsupported, not_selected, no_current_scope (crates/ripr/src/analysis/language_outcome.rs:97-113). EVIDENCED_LANGUAGE_STATUSES is exactly the three that mean "the adapter ran"; the six refused statuses are exactly the remaining six, with no typo, no omission and no extra. So the gate cannot refuse a language that was genuinely measured, and cannot admit one that was not. Partial means the adapter ran and disclosed its own limits, which is why it is admitted; no_current_scope is refused for the expected language, which is right - nothing of that language was in scope, so there is nothing to score.
  • Earlier non-blocking finding (the refusal message names the status but not what would make the row evidenced): STILL HOLDS. xtask/src/reports/verdict_corpus.rs:2704-2707 still reads "its language_completeness row is <status>". The status is named, which is what makes the refusal actionable.
  • Earlier non-blocking finding (the changelog fragment wraps one bullet across six lines and should be confirmed at the fold): STILL HOLDS. changelog.d/11272-corpus-language-row-admission.md is unchanged in this delta.
  • New, confirming: the gate is monotone. admit_measurement only ever adds refusals; it never relaxes an existing admission and never rewrites a recorded verdict. The worst case the candidate can cause is that a live case becomes an unestablished measurement, which RIPR-SPEC-0219 already treats as never a silent verdict. That is the fail-closed direction the product contract asks for.
  • New: no duplicate semantic authority. At the main tip, xtask/src/reports/verdict_corpus.rs has no language-completeness admission gate and no EVIDENCED_LANGUAGE_STATUSES; the only language_completeness references on main in xtask/ are the fixture-output normaliser in xtask/src/reports/fixtures.rs:1871. The producer half of #11272 is already merged on main (crates/ripr/src/analysis/language_outcome/view.rs:91, "The additive check --json language_completeness projection (#11272)"), so this PR is the harness half and is the sole open carrier of the gate. It is not competing with another open PR.
  • Efficiency: nothing to report. The new gate scans the languages array once for the row whose language equals subject.language and takes one more element to detect a duplicate, so the work is O(number of language rows) - one row per language, a handful - plus the error strings on the refusal path. No corpus file is re-read, no per-case collection is built, nothing is cached or invalidated, and no previously short-circuited computation is now always run.
  • Prior-head evidence, for the record: the Rust gates job at the previously reviewed head 908567785 (job 124662008805) was SUCCESS with step 16 Repository policy preflight SUCCESS and step 28 Verdict corpora SUCCESS, so this exact code was exercised green against a base that did not yet carry the orphan. The candidate source has not changed since. That is prior-head evidence, not this head's, and main has advanced underneath it.

Not run:

  • The Rust toolchain on this host is not on PATH (rustc, cargo, rustup are absent from PATH). Nothing was built, compiled, formatted, linted or tested locally here; cargo fmt --check, cargo test -p xtask, cargo clippy and every cargo xtask gate (precommit, verdict-corpus check-all, check-traceability, check-user-text) were not run. Every Rust-level statement above comes from reading source at the reviewed SHA 0b2a6f47eacd8129e79460c854dd70350686a00f, from the main-tip source at a69bf0214, or from hosted job logs - never from a local run.
  • The corpus gate and the Rust test lane were skipped at this head, so I did not observe the candidate's own gate running green or red here. I did not execute the verdict corpora myself.
  • I did not run a combined-tree build of main merged with this head, so the base-attribution rests on the file-level causal chain and the identical base-job failure, which is what I state above rather than a local reproduction.
  • No runtime or mutation execution was performed. Every exposure statement here is static; no claim is made about runtime mutation outcomes or test-suite sufficiency.
  • No repository file was modified, no build was run, and no HEAD-moving git command was executed.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head 0b2a6f47eacd8129e79460c854dd70350686a00f. Not an approval.

@github-actions github-actions 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.

Reporter summary

The available lanes found no actionable defect: admit_measurement fail-closes on a missing/malformed projection, zero or duplicate expected-language rows, sibling-only evidence, and non-evidenced statuses, while accepted statuses remain complete, complete_zero, and partial; no unsafe, lifetime, or alternate-admission-path issue was identified. The strongest objection is missing current executable proof: cargo-test timed out after 900 seconds and RIPR exited with code 2, although the seeded thread reports 170 focused tests and a four-corpus check-all passing on byte-identical candidate blobs. This supports an uncertain rather than clear verdict: prior successful evidence is reassuring, but a human should obtain fresh successful targeted-test and RIPR/check-all receipts before merge.

@EffortlessSteven
EffortlessSteven merged commit 20812f4 into main Nov 1, 2026
57 of 58 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/corpus-language-row-admission-11272 branch November 1, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants