Skip to content

fix(config-bundle): say why a missing_sibling reference is absent (#628) - #685

Merged
cwiklik merged 1 commit into
rossoctl:mainfrom
cwiklik:fix/preflight-missing-sibling-wording-628
Nov 3, 2026
Merged

cwiklik merged 1 commit into
rossoctl:mainfrom
cwiklik:fix/preflight-missing-sibling-wording-628

Conversation

@cwiklik

@cwiklik cwiklik commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #628.

The report

promote warned skill 'detect-missing-figures' references 'scripts/build.sh', which is not in its directory. That reads as a layout mistake — and scripts/build.sh does 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 shared scripts/ at the repo root) and ran the real checkSiblingPaths against it. Four findings, and all four are true positives:

skill reference
detect-missing-figures scripts/build.sh
detect-missing-tables scripts/build.sh
fix-ocr scripts/build.sh
restore-lists scripts/fix_list_starts.rb

Each skill ships scripts/*.py, so it owns scripts/ under the ownership rule. The referenced files live at the repo root, which resolveSkills never scans (findSkillDirs only treats a directory containing SKILL.md as a skill root) and the bundle therefore never carries. A remote turn invoking scripts/build.sh really 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

skill 'fix-ocr' references 'scripts/build.sh', which is not included in the bundle
  — only files under the skill's own directory travel

is not included in the bundle matches 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_sibling code, the warn severity, the ownership gate, and the loose satisfaction test. The finding was never the defect, and warn never blocked promotion (hasErrors gates 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

  • New test uses the reporter's exact shape; red first on the old message.
  • config-bundle suite: 9 files, 169 tests passing. tsc --noEmit and prettier --check clean.
  • Re-probed the reconstructed layout: same 4 findings, now with the corrected wording.
  • Mutation-tested the new assertions, 5/5 killed (restore old wording, drop the explanatory clause, drop the path from the message, downgrade severity to info, remove the ownership gate).

Assisted-By: Claude Code

…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 ingpaolodettori-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_sibling only 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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cwiklik
cwiklik merged commit 2cb6f7b into rossoctl:main Nov 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ai-review Request automated AI code review from clawgenti

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 missing_sibling errors when Claude skill scripts are pre-existing or shared between skills

2 participants