Repository navigation
refs: an ADR id and a symbol of a missing package are references too - #43
Merged
Merged
Conversation
spin held its storage prose with a second gate in shell for these two rules alone. An ADR-NNNN resolves to a file under -decisions (docs/decisions by default); a Symbol of internal/<pkg> is a finding when that package's own path was found missing, anywhere in the files read - every x.Y would report json.Unmarshal. Co-Authored-By: Claude Opus 5.5 <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 and why
spin checked its storage prose with a second gate, written in shell (
hack/storage-refs.sh), and that gate existed only for two rules. Both rules now live ininternal/refs, so spin can drop the shell gate and use onetask refs:ADR-NNNNhas to resolve to a file underOptions.Decisions. This is the new-decisionsflag, and it defaults todocs/decisions.pkg.Symbolis a finding when the path of itsinternal/<pkg>was reported missing somewhere in the files read. The check is limited to those packages so that it does not flag everyjson.Unmarshal.The README and the cmd doc are updated.
Verification
TestADecisionAndASymbolOfAMissingPackageis a table test with 8 cases. Three planted bugs each turned it red: the ADR check inverted, the wrong key in the missing-package set, and the one-segment check removed.nice -n 19 task mutate BASE=origin/main: 14 refused, 0 survived. The first run had one survivor: if the symbol pattern got an empty alternative,.Unmarshalwould be reported next to a missing package. A new case now covers that.task lintandtask testpass. Coverage is 83.5%, floor 60%.Followup
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.