Repository navigation
fix(human): name all five stage states in the digest Evidence line (#4324) - #4936
Conversation
…4324) The bounded digest showed the first 2 evidence lines positionally, and evidence ordering is pipeline-ordered (reach, infection, propagation, observation, discriminator), so the decisive stages sat inside the hidden remainder of nearly every real bounded run (#4324). The digest now leads the evidence block with one compact line naming all five stage states, e.g. Evidence: reach yes · infection weak · propagation yes · observation yes · discriminator yes Every stage always carries an evidence line, so no stage is ever silently dropped. The 2-line detail window is unchanged and its remainder disclosure now names the recovery format: - N more detail line(s) in --format human-full JSON output, evidence production and ordering, and human-full are untouched. Human goldens re-blessed; RIPR-SPEC-0122 documents the compact line and the new pinning test is registered in .ripr/traceability.toml.
|
Important Review skippedToo many files! This PR contains 518 files, which is 418 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (518)
You can disable this status message by setting the 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. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements issue #4324 (RIPR-SPEC-0122) by updating the bounded human-readable finding digest to compactly display all five pipeline stage states (reach, infection, propagation, observation, and discriminator) on a single 'Evidence' line. This ensures that decisive stages are always visible and not hidden behind a bare count in the positional 2-line detail window. The remainder disclosure line has also been updated to direct users to --format human-full for more details. The changes include updates to the rendering logic, documentation, tests, and numerous golden fixtures. There are no review comments to address, and the implementation looks complete and well-tested.
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- 257 hand-edited human.txt goldens were updated without a local Rust run; the new pinned test covers only one finding, so the compact five-state line is verified for sample_finding but not end-to-end for the 257 fixtures. CI goldens check is the safety net; the author flagged no local Rust toolchain.
Verification questions
- Confirm the pinned test asserts display budget <= 180 chars per line; the new five-state compact line stays within budget on sample_finding, no truncation risk that would re-expose a stale/partial view.
- Confirm all 257 affected fixtures carry matched updates: new compact Evidence line, two unchanged detail lines, new remainder phrasing, and a ## Pending CHANGELOG entry per xtask goldens bless format.
Refuted
- The new format!() could capture a stale stage value if StageState is mutated mid-format by another thread.; refuted because: findings are produced per-finding by a single render thread; format!() reads each .state.as_str() once and push_str writes the line in one call; no aliasing or resize hazard.
- The compact 'Evidence:' summary line could be parsed as machine-readable and pollute downstream tooling that scrapes the digest.; refuted because: The PR explicitly documents 'no machine format reads the compact line' and the JSON path is not touched; the line is plain human prose and the JSON schema gates (--format json) are unchanged. No attack surface introduced.
Parked follow-ups
- Devin reviewer flagged discriminator_evidence_line may report 'missing' while the compact digest reports 'discriminator yes' for the same finding — possible user-visible contradiction; active-view scope does not subsume this but it reopens a reviewer concern not addressed in the PR.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
…he compact token Review on the #4324 change found the compact stage-states line printed the bare discriminate stage state, so a non-exposed finding with a strong oracle could read 'discriminator yes' while the digest simultaneously named the missing discriminating input. The token now mirrors discriminator_evidence_line: only an exposed finding (or a non-yes grade) prints the bare state; otherwise it reads 'missing' or 'not established', the wording the full evidence line already uses. Adds the regression test digest_compact_discriminator_token_mirrors_the_full_evidence_line and re-blesses the 26 affected digest goldens; RIPR-SPEC-0122 documents the rule.
Sync for #4924: origin/main moved to ec4eee3 (human-output disclosure family #4936/#4942/#4953/#4955 and render progress plumbing #4945). Conflicts: app.rs/check.rs/render.rs semantically unioned (FindingDrillIn param + progress sink); 71 fixture bless CHANGELOGs unioned (both sides' Pending sections kept, numbering deduplicated); human-full goldens and human.rs/sections.rs/triage.rs/navigation.rs auto-merged.
Summary
Before: the bounded digest showed the first 2 evidence lines positionally, and evidence ordering is pipeline-ordered (reach, infection, propagation, observation, discriminator), so the stages that decide
exposedvsweakly_exposedvsreachable_unrevealed— propagation, observation, discriminator — sat inside the- N more evidence line(s) hiddenremainder of nearly every real bounded run. The reader got a class label plus a generic hint and had to rerun with--format human-fullto see the evidence the classification rests on, for every finding, every time.After:
evidence_path_linesbuilds all five stage lines unconditionally, so every stage always carries a state and none is ever silently dropped; there is no "absent stage" case to represent.N more detail line(s) in --format human-full) instead of the bareN more evidence line(s) hidden.--format human-fullare untouched (non-goals respected).How:
render_finding_digest_with_configprints the compact stage-state line from the finding's ownStageStatevocabulary (as_str(), the same tokens the full form uses), then keeps the existing window.RIPR-SPEC-0122documents the compact line; the new pinning testdigest_names_all_five_stage_states_and_keeps_the_remainder_disclosureis registered in.ripr/traceability.toml.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Spec: RIPR-SPEC-0122 (documents the compact five-stage Evidence line)
Governing issue or accepted claim: #4324
Acceptance delta (one sentence): the default
ripr checkdigest shows all five stage states compactly for every finding while keeping the honest 2-line detail window and remainder disclosure; JSON and human-full are unchanged.Testing / verification
goldens check+ full PR matrix.expected/human.txtdigests were re-blessed deterministically by hand: eachEvidence:block's five states were derived from the siblingcheck.json(matched by the digest's ownFile:line, the reach/infection bullet text, theChanged behaviorexpression, and the golden's remainder count), never guessed. Each fixture'sexpected/CHANGELOG.mdgained a## Pendingentry following thextask goldens blessformat.cargo xtask dogfoodis not a CI workflow and could not be run locally; in its place I verified tree-wide that no non-fixture tracked file pins the oldmore evidence line(s) hiddenwording, andRipr Rust Small Resulton the merge commit is the hosted proof gate.Closes #4324. Part of epic #4316 — this does not close #4316.