Repository navigation
design-bindings:note-witness: a cited file path must exist (X-1207); PB-58 re-cited - #1013
Merged
Merged
Conversation
…k (X-1207)
TODO l.3669 X-1207: note_witness_offenders tested identifier-shaped tokens (>= 8 chars, >= 3
underscores) against the tree's symbols only, so a note citing a FILE PATH that is gone read as
evidence -- and the note that motivated the rule carried one: PB-58 cited
crates/busbar-caps/src/decision.rs, a file folded away with busbar-caps.
verify.rs: cited_paths reads every path a note cites (a run of path characters from a repository
root -- crates/, xtask/, scripts/, qa/, docs/, testing/, conformance/, .ci/, .github/ -- with a :line
suffix and sentence punctuation dropped; a run touching `{` or `*` is a pattern, not a citation),
and note_witness_offenders refuses one that is not on disk.
PB-58 now cites crates/busbar-contract/src/caps/seat_verdict.rs, where OverBudget,
OverdraftCeiling and StaleSlice are declared; qa/design-bindings.json and qa/DESIGN-BINDINGS.md carry
the same note text.
RED: selftest "a note citing a file path that is not on disk is refused (X-1207)" over the green
baseline; control: a note citing a path on disk is accepted; unit test for the path reader.
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.
TODO l.3669 X-1207:
note_witness_offenders(xtask/src/gates/design_bindings/verify.rs:643) checked test-shaped identifiers only. A note citing a file that no longer exists read as evidence. PB-58 citedcrates/busbar-caps/src/decision.rs, a file that went away when busbar-caps was folded.cited_pathsreads every repository path a note cites (globs excluded). The rule now refuses a path that is not on disk.crates/busbar-contract/src/caps/seat_verdict.rs, where the three reason codes live. qa/design-bindings.json and qa/DESIGN-BINDINGS.md are updated in step.DRAFT until #830 lands (coordinator: X-1207 follows #830). The hunks are disjoint: #830 edits verify.rs l.256 and l.403, this PR edits l.633+.