Repository navigation
fix: stop diagnosing what is inside a nested workspace - #32
Merged
Merged
Conversation
The boundary reporter added in #30 also listed per-skill symlinks under `<repo>/root-config/.claude/skills/` as "planted there by an older setup — safe to delete". Both halves were wrong. They are the ordinary artifact of the skills CLI, which skills:add and skills:update run with cwd set to root-config, and the owning workspace's own setup already deletes them: cleanCliArtifacts(ROOT_CONFIG). Measured on a real nested workspace — 27 such links, all sharing one mtime from a single CLI run months before this code existed, and its own `setup --ensure` cleared all 27 and removed the directory. So the message named a cause the evidence contradicts and asked for a manual cleanup that happens by itself. The two possible causes are indistinguishable from the link alone, which is the point: report the boundary, which is a fact, and say nothing about the contents. Drops strayLinksInForeignRootConfig entirely.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an incorrect “diagnosis” emitted when the skills setup walk encounters a nested workspace: it now reports only the workspace boundary being skipped and no longer inspects or comments on what’s inside that boundary.
Changes:
- Remove nested-workspace “stray link” scanning and the associated advisory output.
- Update
reportForeignWorkspaceto emit a single boundary line (and document why it must not editorialize). - Replace/strengthen tests to assert the boundary is named and that no “planted/stray/safe to delete” claims are emitted, while ensuring nested contents remain unchanged.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/skills/setup-skills.mjs | Stops reporting on nested workspace contents; logs only the boundary skip line and documents the rationale. |
| test/setup.test.mjs | Updates tests to assert boundary-only reporting and verify nested workspace artifacts are left untouched. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 #30. Intended for #31, which merged while I was writing it — so it lands here instead.
The bug I shipped in #30
The boundary reporter didn't stop at naming the boundary. It also scanned
<repo>/root-config/.claude/skills/inside the nested workspace and printed, for each per-skill symlink it found:Both halves of that are wrong.
The cause was a guess. Those links are the ordinary artifact of the skills CLI:
skills:addandskills:updaterun it withcwdset toroot-config/(add-skill.mjs), and the CLI writes its own tool symlinks into the directory it runs in. That is exactly the shape the old walk would also have planted — which is the real point: the two causes are indistinguishable from the link alone. Naming either one is a guess dressed as a diagnosis.The cleanup advice was unnecessary. The owning workspace's own
setup()already removes them —cleanCliArtifacts(ROOT_CONFIG).Measured on a real nested workspace before changing anything:
Jun 18 10:21:01) — a single CLI run, months before fix: stop the project walk at nested workspace boundaries #30's code existed. Outer-setup pollution would not arrive in one batch at a timestamp predating the code.setup-skills.mjs --ensureon a copy cleared all 27 and removed the directory.So the message named a cause the evidence contradicts, and asked for a manual cleanup that happens by itself. In this repo's own parent root it fired for two unrelated nested workspaces on the first run.
The fix
Report the boundary — a fact — and say nothing about the contents.
strayLinksInForeignRootConfigis deleted;reportForeignWorkspacenow emits one line.The docblock records why, so the hint doesn't get reinvented: the shape is a CLI artifact, the owning workspace clears it, and the causes can't be told apart.
Tests
The two tests that asserted the stray claim are replaced by:
root-config/.claude/skills/(a CLI-created symlink and a real tool-written skill dir), then asserts the output contains none of "planted" / "stray" / "safe to delete" and that both survive untouched.309 pass, lint clean. Verified on the real tree: two boundaries named, no diagnosis, the nested workspace's 27 links still at 27.