Repository navigation
test(honesty): pin Perl advisory enforcement in the promotion-honesty gate (#1729) - #1849
Conversation
… gate (#1729) The evidence-promotion-honesty gate iterates its corpus language-agnostically, so the tier-`pure` `source_report` Perl charter case (`perl_preview_card_advisory_no_repair_packet`, with `must_not_promote` + `expected_class: weakly_exposed` assertions) is already enforced on every default `check-evidence-promotion-honesty` run. But no test pinned that for the Perl surface specifically — the cardinal-sin-seam `must_not_promote` invariant was proven-by-inspection only. Add a regression test that builds a parity-complete corpus plus a Perl advisory case and asserts both directions: an honest advisory report (weakly_exposed) stays clean, and a dishonest re-bless of the advisory finding to `exposed` is caught by the `must_not_promote` assertion. Register the test under RIPR-SPEC-0108 in the traceability map. No production behavior change: the gate already enforced the entry; this proves it and guards against silent regression. Closes #1729 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016bMxofMB3gxzFQuASAtuWp
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… review) Adversarial review follow-up: - Add `perl_advisory_charter_case_stays_enforced_in_live_corpus`, which reads the real `fixtures/evidence-promotion-honesty-corpus/corpus.json` and pins the Perl advisory charter case in the enforced path: tier `pure`, a byte-pinned `source_report`, and the `must_not_promote` + `expected_class: weakly_exposed` assertions. The mechanism test proves the gate catches a dishonest re-bless; this catches the other failure mode #1729 raised — the real entry being silently demoted/removed so the gate stops consuming it. - Reuse the existing `write_evidence_promotion_check` helper for the parity fixtures instead of an inline duplicate (drops a `write`-internal unwrap). - Register the new test under RIPR-SPEC-0108 in the traceability map. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016bMxofMB3gxzFQuASAtuWp
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9140b9d66f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // `source_report`, and the `must_not_promote` + `expected_class: | ||
| // weakly_exposed` assertions. Complements CI's live gate run. | ||
| #[test] | ||
| fn perl_advisory_charter_case_stays_enforced_in_live_corpus() -> Result<(), String> { |
There was a problem hiding this comment.
Keep the live-corpus guard in the honesty test filter
Failure mode: this SPEC-0108 guard is not selected by the established focused command cargo test -p xtask evidence_promotion_honesty; I ran that command and it executed the 10 neighboring evidence_promotion_honesty_* tests while filtering this one out, so future validation of the honesty gate can miss the live Perl corpus regression this PR is meant to pin. Why here: the traceability block registers it under RIPR-SPEC-0108 alongside the prefix-named tests. Fix direction: rename this test to include the evidence_promotion_honesty prefix. Validation: rerun cargo test -p xtask evidence_promotion_honesty and confirm the count includes this guard. Confidence: High.
Useful? React with 👍 / 👎.
Summary
cargo xtask check-evidence-promotion-honestyactually enforces the Perl advisory corpus entry (perl_preview_card_advisory_no_repair_packet) rather than letting it sit inert, by adding a red/green regression test. No production behavior change — the gate already enforced it; gate: verify check-evidence-promotion-honesty enforces the Perl corpus entry (parity-loop coverage) #1729 asked for the proof.Swarm / Source Boundary
ripr-swarmThis is test + traceability only, entirely within
ripr-swarmtooling. No release/publish surface touched.Source-of-truth Links
Spec:
docs/specs/RIPR-SPEC-0108-evidence-promotion-honesty-meta-gate.mdIssue: #1729
Scope
Scope Classification
Production delta:
validate_evidence_promotion_honesty_corpus_atis language-agnostic and the Perl case is tier-puresource_report(not clone/flag-gated), so itsmust_not_promote+expected_class: weakly_exposedassertions already run on every default gate invocation.Evidence/support delta:
evidence_promotion_honesty_catches_dishonest_perl_advisory_reblessbuilds a parity-complete corpus (py/ts/rust non-promoted + rust/ts controls) plus a Perl advisory case, and asserts both directions: honest advisory report (weakly_exposed) → zero violations; dishonest re-bless toexposed→must_not_promoteviolation fires. Registered under RIPR-SPEC-0108 in.ripr/traceability.toml.Single acceptance criterion:
Non-goals:
Support-tier Impact
Policy Impact
Ledger or exception notes:
Proof
Result, failures, or skipped proof:
cargo xtask check-traceabilityfails on pre-existing main debt unrelated to this diff: SPEC-0128 references generatedactive-goal-authority-audit.{json,md}(absent in fresh checkout), and SPEC-0129/0130 (added by slice(#1622): editor integration contract spec + 3-layer support matrix (ratify before implementation) #1774/docs(spec): add RIPR-SPEC-0130 RIPR authority map + legacy conformance fixture (#1761) #1836) are not yet registered in the traceability map. My SPEC-0108 addition is accepted with no error. CI is currently down; gates were run locally.Claim Boundary
After this PR: the honesty gate is proven to catch a dishonest promotion of the Perl advisory finding. This does not claim any new Perl analyzer capability — the Perl surface remains preview/advisory-only.
Rollback
Revert the single commit. Test + traceability only; no runtime surface.
Spec-Test-Code Traceability
xtask/src/main.rs::tests::evidence_promotion_honesty_catches_dishonest_perl_advisory_reblessxtask/src/main.rs::validate_evidence_promotion_honesty_corpus_at/evidence_promotion_semantic_violations(unchanged)Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests. (test usesResult/?andassert!, no unwrap/expect)Gates
Run locally (CI down):
cargo fmt --checkcargo clippy -p xtask --all-targets -- -D warningscargo test -p xtask evidence_promotion_honesty(10 passed)cargo xtask check-evidence-promotion-honesty(real corpus green)cargo xtask check-static-language🤖 Generated with Claude Code
Generated by Claude Code