Repository navigation
fix(config-bundle): say why a missing_sibling reference is absent (#628) - #685
Conversation
…ssoctl#628) `checkSiblingPaths` warned that a referenced path "is not in its directory", which reads as a layout mistake. The reporter saw it for `scripts/build.sh` — a file that exists in their repo, at the root — and reasonably concluded preflight was wrong. Reproduced against their layout: all 4 findings are true positives. The skills ship `scripts/*.py`, so they own `scripts/`; `build.sh` lives at the repo root, which `resolveSkills` never scans and the bundle never carries. A remote turn calling it really would fail on a read miss. So the check is right and the wording was wrong. The message now names non-inclusion and the reason: skill 'fix-ocr' references 'scripts/build.sh', which is not included in the bundle — only files under the skill's own directory travel matching the house phrasing already used by the memory-link and entry findings. The code, the `warn` severity, the ownership gate and the satisfaction test are all unchanged — the finding was never the defect. Searching the whole repo to satisfy these references, as the issue asks, would silence a warning for a turn that still fails remotely. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: cwiklik <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Summary
This PR changes only a message. checkSiblingPaths now says a referenced path "is not included in the bundle — only files under the skill's own directory travel" instead of "is not in its directory". It also adds a doc-comment paragraph and a regression test that uses the #628 reporter's layout. The code, the warn severity, the ownership gate and the satisfaction test are unchanged, so promotion behavior is unaffected (hasErrors gates on error only). The new phrasing matches the existing memory-link findings (preflight.ts:127, :146). The PR is right not to do the broader repo search #628 asks for: that search would hide a real remote read miss.
Areas reviewed: TypeScript (config-bundle preflight + test), docs references
Agent/IDE config (.claude/.vscode): none (".claude" appears only in prose/comments)
Commits: 1 commit, all signed-off: yes; prefix fix(config-bundle): OK
CI status: all 17 checks passing (check, lint, k8s-kind-e2e, deploy-scripts, codeql, trivy, …)
Base: 68465f4 = current main (0 behind); mergeable_state blocked (awaiting review only)
Prompt injection: none found
Verified:
- The old string "not in its directory" no longer appears anywhere in the repo (code search). No docs or tests quote it. The design spec (docs/specs/2026-09-02-…promotion-design.md:406) lists
missing_siblingonly by code, so it still holds. - The new test asserts the path, the code, and both halves of the new message.
| message: `skill '${skill.name}' references '${ref}', which is not in its directory`, | ||
| message: | ||
| `skill '${skill.name}' references '${ref}', which is not included in the bundle` + | ||
| " — only files under the skill's own directory travel", |
There was a problem hiding this comment.
nit: The trailing clause fits the #628 case, where the file exists outside the skill. This check also fires when a file under the skill's own directory is simply missing or misspelled (the existing references/missing.md test). There, "only files under the skill's own directory travel" reads as if the file sits somewhere else. Optional: soften it to something like "(the bundle carries only the skill's own directory)". Not blocking.
Fixes #628.
The report
promotewarnedskill 'detect-missing-figures' references 'scripts/build.sh', which is not in its directory. That reads as a layout mistake — andscripts/build.shdoes exist in the reporter's repo, so the warning looked plainly wrong.What is actually happening
I reconstructed the reporter's layout (
esnible/esnible.github.io: 12 skills under.claude/skills/, a sharedscripts/at the repo root) and ran the realcheckSiblingPathsagainst it. Four findings, and all four are true positives:detect-missing-figuresscripts/build.shdetect-missing-tablesscripts/build.shfix-ocrscripts/build.shrestore-listsscripts/fix_list_starts.rbEach skill ships
scripts/*.py, so it ownsscripts/under the ownership rule. The referenced files live at the repo root, whichresolveSkillsnever scans (findSkillDirsonly treats a directory containingSKILL.mdas a skill root) and the bundle therefore never carries. A remote turn invokingscripts/build.shreally would fail on a read miss.So the check is correct; only the wording was wrong — it described a misplaced file instead of an absent one.
The change
is not included in the bundlematches the phrasing the memory-link and entry findings already use, and the trailing clause answers the obvious objection ("but the file is right there").Deliberately unchanged: the
missing_siblingcode, thewarnseverity, the ownership gate, and the loose satisfaction test. The finding was never the defect, andwarnnever blocked promotion (hasErrorsgates on'error'only) — so this is a message fix, with no effect on the wire format, the stored bundle, or promotion behavior.On the issue's requested behavior
#628 asks preflight to search the repo more broadly and report success. That would silence a warning for a turn that still fails at run time, trading a confusing-but-true local warning for a silent remote failure. I also verified that the shared-directory and cross-skill references the issue mentions do not warn today — the ownership gate already filters them. The only thing firing is the repo-root case above.
Verification
config-bundlesuite: 9 files, 169 tests passing.tsc --noEmitandprettier --checkclean.info, remove the ownership gate).Assisted-By: Claude Code