fix(core+cli+loom): core-0.10.1 / cli-3.49.2 / loom-0.7.1 — every project-wide walker skips nested checkouts (#434) - #440
Merged
Conversation
…ject-wide walker skips nested checkouts (#434) Follow-up to #435 (Baton half). straymark-core's source scanner and two CLI walkers also read another checkout nested in the project — a linked worktree (`.worktrees/<name>/`), a submodule, a nested clone — as the project's own code: on an adopter repo, `architecture generate` invented a `.worktrees` component holding a full copy of it. - core: `walk::is_nested_checkout` (a sub-directory with its own `.git`) used by `architecture::collect_source_files` → architecture generate / sync / validate, status --where, Loom's architecture view + Intent plane, Baton's overlay. - cli: tree_grep (followups verify --claims, analyze declared-vs-wired) and the analyze walker use the same rule. - baton: reuses the core rule (behavior unchanged, no release). - straymark-core bound moved to 0.10.1 in cli, loom AND baton together. Co-Authored-By: Claude Opus 5 (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.
Follow-up to #434. #435 fixed Baton; this PR fixes the rest.
Problem
straymark-core's source scanner, and two CLI walkers, descend into another checkout nested in the project and read it as the project's own code. That covers a linked git worktree (.worktrees/<name>/), a submodule and a nested clone. They only skip a fixed list of names.Demonstrated read-only on an adopter repository with one worktree inside:
straymark architecture generate --out <scratch>produced 15 components, one of them.worktrees(globs: [".worktrees/**"]). That component was a full copy of the repo, 5606 source files against 5235 in the real tree. With this branch: 14 components, no.worktrees.Change
straymark-core0.10.1 addswalk::is_nested_checkout: a sub-directory with its own.git(file or dir) is another checkout. The check is structural, so it needs no gitignore parsing and nothing for adopters to configure.architecture::collect_source_filesuses it, which fixes:architecture generate | sync | validateandstatus --where;tree_grep(behindfollowups verify --claimsandanalyze declared-vs-wired) and theanalyzewalker use the same rule. A worktree copy no longer counts as "callers" of a symbol, and its functions are no longer analyzed twice.corerule instead of keeping its own copy. Its behavior is unchanged, so there is no Baton release.straymark-coremoves to0.10.1in cli, loom and baton in the same commit (the feat(architecture): language/structure-agnostic, configurable seed scanner (#279) #282 lesson).Validation
cargo test --workspace: 1041 passed. The new tests covercore::walkand each of the three walkers, and every walker test fails with the guard removed. Oneanalyzefixture first usedvendor/, whichanalyzealready excludes, so it passed without the fix; it was moved tothird_party/.-D warnings, Loom is clean, and the CLI stays at its baseline (18/24).straymark validatereports 0 errors. AILOG:AILOG-2026-09-18-001.Release after merge
Tag
cli-3.49.2(its workflow publishesstraymark-core0.10.1 to crates.io first) and tagloom-0.7.1.🤖 Generated with Claude Code