Repository navigation
archcheck: one path-scoping option for pattern_ratchet - #687
Merged
Merged
Conversation
Two overlapping scoping keys had accumulated on pattern_ratchet: `include` and `paths`. An instance with both checked only files matching both, and they differed in one way: an empty `include` silently measured nothing while an empty `paths` was rejected. Keep `include` and remove `paths`. An empty `include` is now rejected with its own error (exit 2), since a no-op scope is a footgun. No instance in ARCHITECTURE.toml used an empty `include`; `sbxmgr_sqlite` moves its globs from `paths` to `include`. `cargo arch` findings and baselines are unchanged. The two features' tests are merged into one covering the default scope, a scoped instance, `allow` inside the scope, stale entries outside it, and the empty-list rejection. The README documents the single option.
ac-pplx
force-pushed
the
ac/archcheck-fold-paths-into-include
branch
from
October 20, 2026 04:37
9c32bae to
813d011
Compare
ac-pplx
marked this pull request as ready for review
October 20, 2026 04:38
johnlouie-pplx
approved these changes
Oct 20, 2026
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
pattern_ratchethad two overlapping scoping keys,include(node-manager: prevent signal-driven btrfs send restarts #591) andpaths(the sbx-mgr store stack, sbx-mgr: route every SQLite statement through db/ and fence the rest with cargo arch #561). An instance with both checked only files matching both. This keepsincludeand removespaths.includeis now rejected with its own error (exit 2):include must list at least one glob; omit it to check every production file. Previously an emptyincludesilently measured nothing. No instance inARCHITECTURE.tomlused an emptyinclude.sbxmgr_sqlitemoves its globs frompathstoinclude.sbxmgr_sqlite_schemanever setpaths(it is workspace-wide), so it needed no change; no other instance usedpaths.pattern_ratchet_include_scopes_measurement_without_changing_default. Theinclude = []case becomes the rejection assertion; every other assertion is kept againstinclude. The README drops the "both set" intersection text and documents the single option.Behavior notes
pathsnow fails as an unknown key (exit 2) like any other, because the structs usedeny_unknown_fields.include-only instance now says "is outside the paths ... checks" (whatpathsinstances already said) instead of "has no code lines left". No instance in the repository hits this, andcargo archoutput is unchanged.Validation
cargo archoutput is byte-identical before and after in three modes: plain, with--base-baseline/--base-architecture, and--format rdjson. The baseline that--write-baselinewrites is identical too. The committed baseline'sfile_sizetable has drifted from the tree independently of this change, so the check compares the pre-change and post-change binaries rather than the committed file.bash ci/scripts/run-rust-checks.sh fmt: passcargo clippy --workspace --locked --all-targets --all-features -- -D warnings: passcargo test --locked -p pplx-space-archcheck: pass (7 unit, 47 cli, 5 repository)🤖 Generated with Claude Code