Skip to content

test(gate): reject vacuous non-promotion charters - #3203

Merged
EffortlessSteven merged 1 commit into
mainfrom
agent/3202-evidence-nonvacuity
Aug 13, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
agent/3202-evidence-nonvacuity

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Claim

Make evidence-promotion honesty charters non-vacuous: every typed must_not_promote case must also require must_not_report_clean, so a re-blessed empty findings report cannot satisfy a negative charter without evidence.

Closes #3202

Changes

  • Enforce the manifest invariant in validate_evidence_promotion_honesty_corpus_at.
  • Add a focused temporary-corpus regression test with an empty Python report and retained Rust/TypeScript controls.
  • Promote the two Rust non-promotion charters to explicit weakly_exposed plus non-clean expectations.
  • Document the invariant in RIPR-SPEC-0108.

Proof

  • cargo fmt --check — pass
  • cargo test -p xtask evidence_promotion_honesty -- --nocapture — pass (12 tests)
  • cargo xtask precommit — pass
  • cargo xtask check-evidence-promotion-honesty — pass
  • cargo xtask check-fixture-contracts — pass
  • cargo xtask goldens check — pass
  • git diff --check — pass
  • cargo xtask check-pr — timed out after 10 minutes without emitting a result; no assertion failure was observed

Claim boundary

This closes the manifest-level vacuity gap and preserves the existing runtime must_not_report_clean enforcement. It does not establish full CI or release readiness; the draft is awaiting independent exact-head review and hosted checks.

Rollback

Revert commit c8a3064b to restore the prior charter schema and validator behavior.

@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 Aug 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 95d4bedf-15c9-4907-903e-c6282c30cabc

📥 Commits

Reviewing files that changed from the base of the PR and between 611af89 and c8a3064.

📒 Files selected for processing (4)
  • docs/specs/RIPR-SPEC-0108-evidence-promotion-honesty-meta-gate.md
  • fixtures/evidence-promotion-honesty-corpus/corpus.json
  • xtask/src/evidence_promotion.rs
  • xtask/src/tests.rs

Summary by CodeRabbit

  • Bug Fixes

    • Strengthened evidence validation to prevent cases from being incorrectly reported as clean when they are not eligible for promotion.
    • Added safeguards against vacuous validation passes when findings are missing.
  • Documentation

    • Updated evidence-promotion guidance and examples to require explicit non-clean assertions for non-promotion cases.
  • Tests

    • Added regression coverage and updated language-specific validation cases to verify the stricter behavior.

Walkthrough

The evidence-promotion honesty gate now requires every must_not_promote case to assert must_not_report_clean. The validator enforces this rule. Rust, Python, TypeScript, and Perl corpus cases and regression tests include the required assertion.

Changes

Evidence promotion honesty

Layer / File(s) Summary
Charter and corpus contracts
docs/specs/RIPR-SPEC-0108-evidence-promotion-honesty-meta-gate.md, fixtures/evidence-promotion-honesty-corpus/corpus.json
The specification requires must_not_report_clean with must_not_promote. The two Rust cases retain weakly_exposed expectations and add the non-clean assertion.
Validator and regression coverage
xtask/src/evidence_promotion.rs, xtask/src/tests.rs
Corpus validation reports a violation when a non-promotion case lacks must_not_report_clean. Tests cover vacuous non-promotion and update Python, TypeScript, and Perl cases.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🔵 Low · up to c8a30

The PR makes negative evidence-promotion charters require non-clean findings, preventing empty reports from passing them. The change appears low risk, but merge readiness remains bounded by the full pre-merge validation timing out without a result.

Suggested labels: test

Poem

I’m a rabbit guarding the gate,
No clean disguise may slip through late.
Weak findings stay plainly shown,
Empty evidence earns a groan.
The corpus checks each case just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, proof, claim boundary, and rollback, but omits most required template sections and gate checklists. Add the required scope, source boundary, impact, policy, traceability, engineering, CI economics, and gates sections, including applicable checkboxes and n/a entries.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement the linked issue's validator, regression test, Rust charter, parity, documentation, and gate requirements.
Out of Scope Changes check ✅ Passed The changes are limited to the linked issue's validator, tests, fixtures, specification, and supporting corpus updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly identifies the main change: rejecting vacuous non-promotion charters.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/3202-evidence-nonvacuity

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.

@coderabbitai coderabbitai Bot added the test label Aug 13, 2026
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Confirmed findings

  • PR body claims cargo xtask check-pr timed out at 10 minutes without result; this is an environment/throughput concern, not a correctness defect of the validator invariant itself.

Verification questions

  • Confirm artifact-verifier failed exit 2 in this packet; combined with PR-body claim that check-pr timed out 10m with no result, the CI-witness chain for this exact head is incomplete. Body itself disclaims full CI/release readiness, so not a blocker, but reviewers should weigh this when deciding merge posture.
  • Confirm existing Rust charters rust_weak_error_oracle and rust_error_path_sibling_oracle gained must_not_report_clean plus expected_class=weakly_exposed, matching the new invariant; no other charters regressed.
  • Confirm corpus coverage: PR fixes Python and Rust must_not_promote charters but TS negative charter example in spec table does not show the same assertion pair; corpus may have stale typed-vocabularly assertion omitted.
  • Confirm manifest invariant added at validate_evidence_promotion_honesty_corpus_at only checks the typed-assertions branch (case.get('assertions').is_some()). If any tier branch (pure/observed_evidence/...) skips or duplicates the invariant, a vacuous charter could still slip through. ast-grep scan of the function body would confirm invariant is single-source.
  • Confirm validator only checks presence of must_not_report_clean anywhere in assertions array; order/duplicates not canonicalized, so a stray duplicate still passes.

Test proof

  • Focused HEAD proof failed (exit 101): cargo test --locked --package xtask --test tests evidence_promotion_honesty_rejects_vacuous_non_promotion_charter. This is a current failure, not a red/green witness.

Refuted

  • Allocation failure from any new allocation in the validator path; refuted because: The vacuity guard is pure iteration over an existing slice (assertions.iter().any(...)) plus format! of a small fixed string; no new heap allocation introduced on the validator hot path, and the PR diff does not touch any allocation-prone surface.
  • The vacuity guard fails to fire when assertions list is empty because .any() returns false on an empty iterator, so the case passes the new check vacuously.; refuted because: Refuted: the guard only requires must_not_report_clean when must_not_promote is also present; if neither is asserted the case simply lacks a non-promotion charter and is not subject to the new invariant. The guard's contract is correct as scoped to must_not_promote cases.

Evidence gaps

  • artifact-verifier sensor failed with exit code 2; orthogonal to this manifest-validator change but should not block correctness conclusion.
  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • Duplication risk: the vacuity assertion text is constructed in one site (must_not_promote requires must_not_report_clean so an empty findings re-bless cannot pass vacuously) and consumed via violations.join("\n") in the new test. Acceptable for now, but if more such schema rules accumulate, consider a typed error enum like neighboring validators.

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

Exact-head convergence review for c8a3064bbeff8a56d6fa3c820a8a43b96a97be1f: REVIEW_READY.

Independent review found no actionable source, proof, fixture, or documentation defect. I reverified the current head and the review questions against source truth: the invariant is enforced once in validate_evidence_promotion_honesty_corpus_at before tier dispatch; all 51 typed must_not_promote cases carry must_not_report_clean; both affected Rust charters additionally pin expected_class=weakly_exposed; the temporary empty-findings Python corpus is rejected while Rust/TypeScript guarded and promoted controls retain parity. Duplicate assertion ordering is not part of this bounded non-vacuity claim.

Exact-head hosted evidence is green: both routed Rust-small runs, including required gates, advisory reports, PR evidence, and Ripr Rust Small Result; JUnit; coverage/Codecov; source-of-truth; UB review; dependency/security checks. Local proof recorded in the PR body remains: focused xtask tests, precommit, honesty gate, fixture contracts, goldens, fmt, and diff check passed; cargo xtask check-pr timed out after ten minutes without a result and is not represented as a pass. The earlier artifact-verifier sensor gap and CodeRabbit description warning are advisory/instrument/template observations, not defects in this claim.

REST reports zero inline comments and GraphQL reports zero review threads. Droid Auto Review remains queued with zero steps and is not a required branch-protection or ruleset check. This review is a COMMENT because the PR author account cannot self-approve.

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review August 13, 2026 04:50
@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!

@EffortlessSteven
EffortlessSteven merged commit 7fd679d into main Aug 13, 2026
41 of 42 checks passed
@EffortlessSteven
EffortlessSteven deleted the agent/3202-evidence-nonvacuity branch August 13, 2026 04:50

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

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm manifest-level invariant enforced at validate_evidence_promotion_honesty_corpus_at before tier dispatch; gates only the typed-assertions branch via case.get('assertions').is_some().
  • Confirm negative regression test rejects py_vacuous_non_promotion while retaining Rust/TS guarded and promoted controls; existing typed-vocab test and dishonest Perl test updated with must_not_report_clean.
  • Confirm tS negative charter example in spec table uses expected_class=weakly_exposed + must_not_report_clean but corpus rows may not be updated to assert the pair uniformly.
  • Confirm artifact-verifier exited 2 in this packet; combined with PR-body claim that cargo xtask check-pr timed out 10m without result, the CI-witness chain for exact head is incomplete. Body disclaims full CI/release readiness.

Refuted

  • TS negative charter in spec table lacks must_not_report_clean pair; refuted because: Spec table only documents the two Rust non-promotion charters' assertion set inline; other TS entries are illustrative, not a typed charter schema. Corpus updates are the authoritative typed source.
  • Invariant may need a shared helper or be duplicated across tiers; refuted because: Single-call, single-site invariant does not warrant extraction; current inline form matches surrounding style and avoids speculative reuse.

Evidence gaps

  • artifact-verifier failed exit 2 combined with check-pr 10m timeout creates incomplete CI witness chain for exact head.
  • Model proof intent was rejected by deterministic validation.

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.

test(gate): make non-promotion charters non-vacuous

1 participant