Skip to content

test(honesty): pin Perl advisory enforcement in the promotion-honesty gate (#1729) - #1849

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/random-issue-backlog-sprint-njl92n
Jul 18, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/random-issue-backlog-sprint-njl92n

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

This is test + traceability only, entirely within ripr-swarm tooling. No release/publish surface touched.

Source-of-truth Links

Spec: docs/specs/RIPR-SPEC-0108-evidence-promotion-honesty-meta-gate.md
Issue: #1729

Scope

  • Add one regression test and its RIPR-SPEC-0108 traceability entry. No production code change.

Scope Classification

  • Docs/spec/test-only evidence package

Production delta:

  • None. Investigation (see PR discussion) confirmed corpus iteration in validate_evidence_promotion_honesty_corpus_at is language-agnostic and the Perl case is tier-pure source_report (not clone/flag-gated), so its must_not_promote + expected_class: weakly_exposed assertions already run on every default gate invocation.

Evidence/support delta:

  • New test evidence_promotion_honesty_catches_dishonest_perl_advisory_rebless builds 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 to exposed → must_not_promote violation fires. Registered under RIPR-SPEC-0108 in .ripr/traceability.toml.

Single acceptance criterion:

  • A dishonest re-bless of the Perl advisory finding is caught by the honesty gate, and an honest one is not (proven by the test).

Non-goals:

  • Unifying per-language matchers (AGENTS.md forbids).
  • Adding new Perl corpus entries — this verifies the existing one is enforced.
  • Any classifier behavior change.

Support-tier Impact

  • none

Policy Impact

  • none

Ledger or exception notes:

  • Adds a traceability test entry only; no allowlist changes.

Proof

cargo test -p xtask evidence_promotion_honesty_catches_dishonest_perl_advisory_rebless  # ok (1 passed)
cargo test -p xtask evidence_promotion_honesty                                          # ok (10 passed)
cargo run -p xtask -- check-evidence-promotion-honesty                                  # pass (real corpus green)
cargo fmt --check                                                                       # clean
cargo clippy -p xtask --all-targets -- -D warnings                                      # clean
cargo run -p xtask -- check-static-language                                             # pass

Result, failures, or skipped proof:

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

  • Spec: RIPR-SPEC-0108 (evidence-promotion-honesty meta-gate)
  • Tests: xtask/src/main.rs::tests::evidence_promotion_honesty_catches_dishonest_perl_advisory_rebless
  • Code: xtask/src/main.rs::validate_evidence_promotion_honesty_corpus_at / evidence_promotion_semantic_violations (unchanged)
  • Golden outputs: n/a
  • Metrics: n/a

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.
  • Unknowns include stop reasons where applicable.

CI Economics

  • LEM impact: none
  • Workflows touched: none
  • Required lanes affected: none (adds one unit test to the existing xtask suite)
  • Rollback path: revert the commit

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code.
  • No new panic, unwrap, expect, todo, or unimplemented in tests. (test uses Result/? and assert!, no unwrap/expect)
  • Errors are reported with actionable context.
  • Public JSON/schema changes are documented. (n/a — none)

Gates

Run locally (CI down):

  • cargo fmt --check
  • cargo clippy -p xtask --all-targets -- -D warnings
  • cargo 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

… 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
@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 Jul 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@EffortlessSteven, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dbacb2b8-add5-4ad1-8550-345ad3274568

📥 Commits

Reviewing files that changed from the base of the PR and between fb686e6 and 9140b9d.

📒 Files selected for processing (2)
  • .ripr/traceability.toml
  • xtask/src/main.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/random-issue-backlog-sprint-njl92n

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.24812% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xtask/src/main.rs 99.24% 1 Missing ⚠️

📢 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
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review July 18, 2026 23:41
@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 01e3823 into main Jul 18, 2026
19 of 21 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/random-issue-backlog-sprint-njl92n branch July 18, 2026 23:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread xtask/src/main.rs
// `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> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

2 participants