Repository navigation
feat(fix): record per-finding lens provenance and add fix --recipe scoping (STA-423) - #255
Merged
Merged
Conversation
record stores each finding's optional lens (validated as a lowercase slug via recipe.ValidLensID); readcommon.Selector gains a fail-closed Lenses filter; fix --recipe <name> resolves the recipe from the bundle's base snapshot and selects only findings whose stored lens matches its lens set, reporting the empty recipe scope instead of widening when the recipe owns no lenses. make size measurements (budget): darwin/amd64 20162960 / 20180000 darwin/arm64 18280914 / 18290000 linux/amd64 19824800 / 19840000 linux/arm64 17825952 / 17840000 windows/amd64 20254208 / 20270000 windows/arm64 18029568 / 18040000
…venance (STA-423 fix R1) Blocking: batchMode returns --selected --recipe <name> (and --all --recipe) so instructions/next/data.next never drop --recipe; batchNothing checks Recipe before Selected so the composite empty intersection names both scopes and preserves data.recipe/selection. Polish: wireTail doc fix, plan.Warnings forwarding, --paths scope in recipe-empty message, lens-less next hint, pattern on Finding.Lens and FindingEntry.Lens with regenerated schemas. New unit and CLI golden coverage for selected+recipe (intersection and empty), MCP recipe tests, lens grammar boundary tests. Size: darwin/amd64 20261952 (budget 20280000), darwin/arm64 18380674 (budget 18390000), linux/amd64 19923104 (budget 19940000), linux/arm64 17957024 (budget 17970000), windows/amd64 20353024 (budget 20370000), windows/arm64 18115072 (budget 18130000).
Bring STA-469 org packs (via cf37f06) and STA-341 MCP query tools (via b5b5a05) into STA-423 recipe-scoped fix. Conflicts resolved: - internal/mcp/schema.go: union of fieldDocs — STA-341 Bundle / query-bundles.Pattern / query-cost.By plus STA-423 Recipe. - internal/mcp/testdata/tools_list_{default,operator}.jsonl: regenerated via -update-tools-list; carries both the six query-* tools and fix's recipe property. - scripts/size-baseline.txt: higher ceiling per platform, then raise crossed / <8192B-headroom ceilings to next 10 kB. Merged binary sizes (make size, trimpath, deps 0): darwin/amd64 20421520 (budget 20500000) darwin/arm64 18516722 (budget 18600000) linux/amd64 20078752 (budget 20100000) linux/arm64 18088096 (budget 18100000) windows/amd64 20511744 (budget 20600000) windows/arm64 18257920 (budget 18300000) All six within budget with >=8192B headroom.
🦋 Changeset detectedLatest commit: 686eb52 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
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. |
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.
Summary
Implements STA-423: records optional per-finding
lensprovenance inrecord, adds a fail-closedLensesfilter toreadcommon.Selector, and addsfix --recipe <name>so operators and agents can scope batch fixes to the findings owned by a named recipe.What changed
lensprovenance (internal/core/record):lensfield (^[a-z0-9][a-z0-9-]{0,63}$, validated via exportedrecipe.ValidLensID) accepted inreview.json, normalized onnull, validated in priorfindings.json(corrupt-storeon corrupt non-string), persisted on new findings, and updated-or-preserved across re-review merges while keeping legacy findings byte-identical when absent.lens+patterntoschemas/review.schema.jsonandschemas/findings.schema.json(all 6promptFilesuntouched).internal/readcommon/rank.go):Selector.Lensesmatches only findings carrying a listedlens(findings withoutlensnever match a non-empty filter).fix --recipe <name>(internal/core/fix/,internal/fix/,internal/mcp/):recipe.Load(never live worktree), preserving typed refusals (unknown-recipe,bad-recipe,controls-unavailable) and forwardingplan.Warnings.--all,--selected,--paths,--min-severity, and--verify-cmd(preserving composite flags ininstructions:,next:,data.next,data.recipe, anddata.selection), while refusing empty--recipe "",--recipe+--sig, and--recipe+--test.fixtool parity (recipearg + updatedtools_list_{default,operator}.jsonl) and shell completions (scripts/verdict-complete.sh).Verification
maxR1 → Muse Ember Fix R1 → DeepSeek FlashmaxR2 APPROVE).158/158evals pass (make evals), fullmake test-racegreen,make build,make vet,make deadcode(0 new),make schemas-check,cmd/tsgen&gen-ts-types.mjs --checkcurrent,make cross(6/6),make size(all 6 targets ≥8 KB headroom),golangci-lint run ./...(0 issues),gofmt -l .empty.Closes STA-423.