Repository navigation
fix(generator): resolve a file-sourced skill body in the candy-walk complement - #31
Conversation
…omplement Successor to #30 (auto-closed by the validator's five-verdict threshold): one clean commit carrying the whole change with every finding fixed. collectCandySkills read only the node's inline `content:`, so a moved candy whose body lives in `<repo>/.agents/skills/<name>/SKILL.md` projected a BLANK recipe card, and the module's `go test ./...` gate was red on main and on the released tag (#28). The complement now resolves the file through candywalk.ReadSkillFile — the SAME reader collectSkills uses — and FILLS A MISSING body. It does not reconcile the two forms: refusing a disagreement is the authority's check (the marketplace generator's fillSkillFromFile), and enforcing it here failed the live tree on description drift (cuda-skill, in the charly root manifest). A node with neither an inline body nor a file is SKIPPED with a named stderr line: this complement is a fallback, and the corpus may carry the real body under the same name. Tests (the findings the closed PR still owed): - TestCollectCandySkills_SkipsBodilessNodeVisibly — the bodiless node is omitted, its inline-bodied sibling is kept, and the skip line is captured from stderr. - TestCollectCandySkills_FileBodyAndReferences — the file supplies BOTH the body and the references. Both fail on the pre-fix complement. Verified: `go test ./...` green; a full docs generation with the fixed binary exits 0 and leaves the content tree byte-identical (1556 generated pages, 0 dirty paths). Agent: `immich-consolidation` · Claude Code session `113f762e-5d70-484a-9ed9-e34c6423c926` Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — T1/T2 no injected directives or authority-grabbing prose; T3 the diff adds only a local-file read via the existing Checklist: All applicable rules PASS or NA. Diff is a self-contained code change in the Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Successor to #30, which the validator auto-closed at its five-verdict threshold; this is a clean PR from
maincarrying the whole change with every finding addressed. Closes #28.collectCandySkillsread only the node's inlinecontent:, so a moved candy whose body lives in<repo>/.agents/skills/<name>/SKILL.mdprojected a BLANK recipe card — and the module'sgo test ./...gate was red onmainand on the released tag (TestCollectCandySkills_ProjectsMovedCandySkill).The complement now:
candywalk.ReadSkillFile— the SAME readercollectSkillsuses — and fills a missing body;fillSkillFromFile), and enforcing it here failed the live tree on description drift alone (cuda-skill, in the charly root manifest);How tested
Module gate, GREEN again (it was red on
main):The tests that pin this change (both FAIL on the pre-fix complement):
TestCollectCandySkills_SkipsBodilessNodeVisibly— a node with neither an inline body nor aSKILL.mdis omitted, its inline-bodied sibling is kept, and the skip line is CAPTURED from stderr. (The live byte-identical proof cannot catch a regression in the skip — a blank card is superseded by the corpus — so the unit case is the only proof.)TestCollectCandySkills_FileBodyAndReferences— a node with no inline body takes BOTH its body and its references from the file.TestCollectCandySkills_ProjectsMovedCandySkill(pre-existing, previously red) now passes:projected 1 candy skills incl. ripgrep (family=tools).The live proof: a full docs generation with the fixed binary, on the same pins the site builds from, exits 0 and leaves the content tree byte-identical.
1556reconciles with the five listed categories: the six generated pages outside them are the root narratives (soul,vision,grievances,liberation), the landingindex.md, andrecipes/index.md:Seven routing-only nodes are named on stderr as skipped — the visible record of why they contribute no card.
Rulebook compliance
/charly-build:docs,/charly-internals:plugin,/charly-internals:go,/charly-internals:git-workflow,/charly-internals:strict-policy.candywalk.ReadSkillFile); ONE place that enforces the inline-vs-file contract (the marketplace generator).fix/file-sourced-skill-bodies-2off freshorigin/main; no other session's work touched.charlybinary).Change classification
Generator robustness fix; no published-page change (proven). No
!marker. Rollback: revert, which restores the blank card and the red suite.Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated)