feat: capture dismissal reasoning in the suppression why#24
Merged
Conversation
A waive/reject's note (the developer's actual reason — "console is
intentional here, it's the CLI logger") was used only to build the
re-match embedding and then discarded as readable text: the suppression
why was a fixed template ("the no-console rule was dismissed in <repo>")
and the incident note was just "waive <findingId>". So the panel could
never tell you WHY something was valid here.
Thread the verdict `note` into both the suppression `why` (on mint) and
the incident provenance note, for the keyed (rule) and first-principles
paths. Falls back to the template when no note is given.
This is the capture half; it's recorded via the existing `record_outcome`
MCP tool (or CLI verdict) — no responder skill required. The reasoning now
sticks as readable provenance, surfaced in the explorer's detail panel.
+ suppression.test.ts: note→why + incident note, and the template fallback.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
A waive/reject's
note— the developer's actual reasoning ("console is intentional here, it's the CLI logger") — was used only to build the re-match embedding and then discarded as readable text. The suppressionwhywas a fixed template ("theno-consolerule was dismissed in<repo>") and the incident note was just"waive <findingId>". So the explorer's detail panel could never tell you why something was valid here.Thread the verdict
noteinto both:why(on mint — keyed/rule and first-principles paths), andFalls back to the template when no note is supplied.
Why
Captured-at-action-time reasoning is the point: it's recorded through the existing
record_outcomeMCP tool (orplex verdict) — nopr-master:respondskill required; that flow is just one optional caller of the same tool. The reasoning now sticks as readable provenance.Scope note (what this does NOT do)
This is the capture half. It does not change suppression scope — a rule waive is still repo-wide. The larger follow-up (tracked separately) is location-scoped suppression: anchor an "intentional here" dismissal to the symbol (via code-path memory) so the rule keeps firing on new instances while this one is never re-asked. This PR is a prerequisite (the reasoning) for that.
How to test
pnpm exec vitest run packages/engine/src/suppression.test.ts— 23 green, incl.note→why+ incident-note capture and the template fallback.pnpm typecheck+pnpm test:unitgreen;pnpm buildok.Checklist
🤖 Generated with Claude Code