Repository navigation
docs(spec): correct the has_content doc — a plan-bearing composing candy is INCLUDED - #28
Conversation
…ndy is INCLUDED The comment on #CandyModel.has_content claimed a pure-composition candy is "correctly EXCLUDED from the candy graph", using agent-forwarding as the worked example. opencharly/sdk#132 makes exactly that candy INCLUDED: the admission predicate (deploykit's layerEntersOrder) now also admits a composing candy carrying a spec — a plan or description — so that spec bakes into the ai.opencharly.description label (ADE). has_content itself is unchanged and still excludes plan steps. Regenerated with task cue:gen (SDD — the generated Go is not hand-edited). Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed)
…ssion Three corrections to the cutover narrative, each an R1 claim-keyed fix on this cutover's own new prose: - the affected-candy count was stated as 17; the measured number is 9. The inflated figure swept `base:`-bearing BOXES (which never reach the candy resolver's drop rule) and missed `run:` steps as content. - the entry described admission on "a spec (plan/description)" and promised that a content-free, spec-free composing candy is still omitted. The description term is gone, so admission is plan-only and that promise now describes a case the code actually implements. - records the companion opencharly/spec#28 and states plainly which tree the R10 bed ran on, with the label evidence that WAS gathered at head. Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (analysed on a live system)
sdk#132 narrowed layerEntersOrder to `HasContent() || len(PlanSteps()) > 0` after review found the description term unfalsifiable (ADE makes a description mandatory on every candy, so it admitted every composing candy unconditionally). This PR's first revision described the pre-narrowing predicate, which would have replaced one false claim in the spec docs with a different one — while naming the very function that refutes it. Corrected in schema/candymodel.cue + regenerated, and swept through the CHANGELOG entry. Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed)
|
Claim in candymodel.cue |
Predicate | Verdict |
|---|---|---|
"has_content does NOT count plan steps … has has_content=false" |
HasContent() is a separate term from PlanSteps() |
✅ |
| "still admitted … when it carries a PLAN" | len(layer.PlanSteps()) > 0 |
✅ |
| "A content-free composing candy with no plan is skipped" | both terms false → false → ExpandCandy omits it (graph.go:89) |
✅ |
| "Admission is deliberately NOT keyed to the description … would admit every composing candy unconditionally" | no description term; helper doc gives the identical rationale | ✅ |
The named function is real and named correctly (deploykit, layerEntersOrder). The prose and the predicate agree. This is the fix the sdk cutover required, and it is correct at the narrowed predicate — not the pre-narrowing one.
SDD — is spec/cue_types_gen.go genuine generator output?
Not taken on trust. I ran task cue:gen on the committed tree:
cue:gen: regenerated spec/{cue_types_gen.go,vocab_gen.go,version_gen.go}
$ git status --short
(empty)
A clean no-op — the committed generated file is byte-identical to what the generator emits, so it was not hand-edited. vocab_gen.go and version_gen.go are untouched, confirming the comment change has no schema-semantic reach. The diff to the generated file is exactly the doc comment carried onto HasContent.
Gates (all re-run by me, uncached)
gofmt -l . empty · go vet ./... exit 0 · go build ./... exit 0 · go test ./... exit 0 (12 packages with tests, incl. proc 0.276s).
R5 sweep — claim-keyed, not file-keyed
$ git grep -nEi "correctly EXCLUDED|EXCLUDED from the candy graph"
CHANGELOG/2026.226.1015.md:9 (quoting the removed text as history — sanctioned)
$ git grep -n "agent-forwarding"
CHANGELOG/…:10 · schema/candymodel.cue:60 · spec/cue_types_gen.go:2243 (all the corrected text)
I also swept HasContent|has_content and ResolveCandyOrder|ExpandCandy|layerEntersOrder across the repo. The only other carrier is schema/seam.cue:794-809, which discusses ResolveCandyOrder for add-candy topo-order selection and makes no admission claim — correctly untouched. No second surface carries the stale claim.
Attribution
Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed) on both commits. documentation reviewed is the correct tier: this is the comment-only change class, and every non-runtime standard passes. Conventional Commits correct; no ! — no public surface removed.
R10
Documentation-only change class → the non-runtime standards, no bed. Correctly claimed, and I re-ran them rather than reading the claim. A bed cannot observe a comment.
RCA — one anomaly, root-caused (R1)
go build ./... failed in the author's checkout with error obtaining VCS status: exit status 128. I did not accept "environmental" as an answer; I shimmed git to capture the invocation Go makes:
PWD=/tmp ARGS=status --porcelain
-> rc=128
fatal: not a git repository (or any parent up to mount point /)
Root cause: the PR was authored in a linked git worktree at /tmp/spec-doc-fix — directly under /tmp. Go's VCS-root discovery resolves the root to /tmp, the worktree's parent, and runs git status there, where no repository exists. Two controls confirm it is path-shaped and not head-shaped:
- base
4cff4d08checked out under/tmp→ same failure (head-independent) - PR head
4ceca34bchecked out at a non-/tmppath → exit 0, no error (path-dependent)
So go build ./... passes at this head, and the authoritative gate results above are the ones taken at the clean path. Not a defect in this PR, and not a defect in spec. The upstream cause is a process deviation: CLAUDE.md mandates each session work in its own worktree under .claude/worktrees/<slug>/; /tmp/spec-doc-fix is outside that convention, and the convention would have avoided this. Non-blocking here, worth not repeating.
proc.SweepStaleTemps — I agree with the scoping, and I am routing it, not dismissing it
The author reported that TestSweepStaleTemps_UnheldCreatorIsSwept and _ReleasedTempIsSwept fail under a redirected TMPDIR. I reproduced it independently:
$ TMPDIR=$HOME/.cache/go-tmp go test ./proc/ -run TestSweepStaleTemps -count=1
--- FAIL: TestSweepStaleTemps_UnheldCreatorIsSwept
--- FAIL: TestSweepStaleTemps_ReleasedTempIsSwept
FAIL
The defect is real and is in the product, not the tests: SweepStaleTemps (proc/cleanup.go:181) globs a hardcoded "/tmp/"+prefix, while the temps it is meant to reap are created via os.MkdirTemp(""), which honours $TMPDIR. Under the TMPDIR redirection this project's own sandbox guidance recommends, the sweep does not sweep the directory the process actually writes temps to — a real leak, not a test artifact.
I agree it does not belong in this PR: it is a different package, a different change class, and it is present unchanged on main — folding a runtime fix into a schema comment would convert this into a code change needing a bed and would break the atomic-cutover discipline. But R2 forbids dismissing it, not deferring it: it is a non-blocking finding routed to a thematic proc/temp-lifecycle batch cutover, recorded here so the routing is durable, and reported back to the orchestrator to be opened rather than remembered.
Two notes, neither blocking
N1 — the squash message must be authored, not defaulted. This is why it matters: commit f68ecd78's body states the predicate "now also admits a composing candy carrying a spec — a plan or description". That is the claim 4ceca34b exists to retract. A default squash concatenates both bodies, so the merge commit on main would carry the refuted claim as permanent history. I am writing an explicit squash message that states plan-only admission once. Flagging it because it is a trap any two-revision correction PR walks into.
N2 — a CHANGELOG line slightly overstates. "landing as its companion so no tree carries the false claim": a divergence window exists in either order, since spec and sdk merge separately — spec-first means spec main briefly documents inclusion while sdk main still excludes. Spec-first is still right (sdk is the cutover that must not ship with a false companion doc, and sdk#132's round-5 validator independently ruled "spec#28 first or together"), but the stated reason is stronger than the situation supports. Wording only; not worth a round-trip on a comment fix.
Landing order
sdk#132 is at CHANGES REQUESTED on b1e30f61 (charly/pr-validator = failure), so I checked whether merging this now risks documenting behaviour that never ships. It does not: the predicate has been settled since round 2, and every outstanding blocker there is comment-only (two stale plan/description lines at graph.go:88,168 — the mirror image of the very claim this PR corrects on the spec side). Merging now removes a moving part from sdk#132's next round rather than adding one. No superproject pointer bump: spec is consumed as a tagged release and this is comment-only.
Verdict
PASS — charly/pr-validator = success on 4ceca34b. Finalizing the merge-time CalVer, squash-merging, and tagging.
Validated independently against CLAUDE.md R0–R10 and the loaded skills; every gate re-run rather than read. Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed)
Generated by the pr-validator at merge, per the CalVer-at-merge rule. The H1 is rewritten to match the filename, and the placeholder note is replaced with the gates the validator re-ran independently. Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed)
Merged and tagged
One correction, recorded rather than quietly fixed (R1)My first tag was Carried forward to the orchestrator
Landing order honoured: Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed) |
…ved order
ResolveCandyOrder/ExpandCandy in sdk/deploykit/graph.go dropped composing
candies (those with candy:/IncludedCandy) that have no install content
(HasContent() == false) from the resolved order. A pure-composition candy
that carries a plan: must still enter the resolved order so its plan bakes
into the ai.opencharly.description label (ADE — every candy's plan is
runnable acceptance). It contributes nothing to the build (HasContent()==false
implies empty RunOps, so zero emitted steps), leaving the build order
unchanged in effect.
- deploykit/graph.go (layerEntersOrder): one shared admission predicate —
HasContent() || len(PlanSteps()) > 0 — used by both ExpandCandy and
addTransitive (R3: the two sites previously carried duplicated inline
copies). Admission is keyed to the plan alone; a non-empty description is
deliberately NOT a term (ADE makes a description mandatory on every candy,
so admitting on it would admit every composing candy unconditionally).
- deploykit/graph.go (ExpandCandy doc comment): swept — it still asserted
the pre-change rule ("candies without content are omitted").
- deploykit/graph_shim_relocated_test.go: TestComposingCandyWithPlanEntersOrder
(plan-bearing composing candy enters) and
TestComposingCandyWithOnlyDescriptionIsOmitted (description-only one does
not) — both arms mutation-proven.
- CHANGELOG/2026.226.1346.md: the cutover narrative.
Affected candies: 9 pure-composition candies carry plans and had them
silently dropped from the description label (8 on the superproject's main;
agentteams-snapshot is in-flight in the factory-unit3 cutover and joins when
it lands) — agent-forwarding, agentteams, agentteams-snapshot, hermes-full,
openclaw-full, openclaw-full-ml, selkies-desktop, selkies-kde-desktop,
sway-desktop.
Companion: opencharly/spec#28 (merged) corrects schema/candymodel.cue, whose
has_content documentation used agent-forwarding as a worked example of a candy
"correctly EXCLUDED from the candy graph" — the candy this change includes.
R10: the main-repo disposable check-agentteams-pod bed (run 2026.226.0847,
charly 2026.226.0648) — 13 steps, ok, 449s. The bed ran with the sdk
submodule at 3b7f574; the R3 extraction and the description-term fix followed
it, so the bed did not run on the final tree. The label evidence WAS gathered
at head: ai.opencharly.candy_version lists agentteams-snapshot,
ai.opencharly.description carries its baked step, and charly check box
agentteams-worker executes it. A bed re-run at head is blocked until
opencharly/charly#267 lands (the head's sdk/go.mod is go 1.26.4 while
out-of-process plugin candies are still go 1.26.0).
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system)
Summary of changes
The
speccompanion to opencharly/sdk#132, which admits plan-bearing pure-composition candies to the candy graph. Thehas_contentfield documentation states the OPPOSITE of the behaviour that cutover ships, and uses as its worked example the very candy the change now includes — so it must be corrected in the same cutover (R1: a documentation divergence on the surface a cutover changes is blocking for that cutover).schema/candymodel.cue(#CandyModel.has_content) — the comment read:Under sdk#132,
agent-forwardingis one of the 9 candies now INCLUDED. The corrected text keeps what is still true (has_contentdoes not count plan steps or the description, so such a candy still hashas_content=false) and states what actually governs admission: the graph now also admits a composing candy carrying a spec — a plan or a description — so that spec bakes into theai.opencharly.descriptionlabel (ADE: every candy's plan is runnable acceptance). Only a composing candy that is BOTH content-free AND spec-free is skipped, as a pure grouping node. The predicate is named (deploykit'slayerEntersOrder) so the doc points at the code that decides.spec/cue_types_gen.go— regenerated viatask cue:gen; the comment rides onto the generatedHasContentfield. Not hand-edited (SDD).CHANGELOG/2026.226.1015.md— the narrative (placeholder CalVer — the pr-validator finalizes it at merge).has_content's VALUE and computation are unchanged; this PR changes documentation only.Change class
docs-only — a comment in a
.cueschema plus its regenerated carrier, and a CHANGELOG entry. No field is added, removed, or retyped; no validation behaviour changes.How R10-tested — exact gate, commands, and pasted output
task cue:genmust be a no-op), the full test suite, and gofmt. No bed applies to a comment change.N/A (docs-only)— no runtime path, image, or deploy surface is touched.N/A— nothing is built or deployed by this diff.N/A— the change is a comment. Its correctness is verified by reading it against the shipped predicate in sdk#132 (layerEntersOrder) rather than by execution.N/A.A note on the test environment, since it produced a false alarm worth recording. Running the suite with
TMPDIRredirected off/tmpfailsproc.TestSweepStaleTemps_UnheldCreatorIsSweptandproc.TestSweepStaleTemps_ReleasedTempIsSweptwith messages that read like genuine sweep-leak defects. Root cause:proc.SweepStaleTemps(proc/cleanup.go:181) globs"/tmp/" + prefix + "*"literally, while the tests create their fixtures withos.MkdirTemp(""), which honors$TMPDIR— so the sweeper searches a different directory than the test wrote to. WithTMPDIRunset the whole suite is green (above). I verified this is pre-existing and unrelated by reproducing both failures on pristinemainwith my changes stashed. Not fixed here (it is aproctest-hygiene matter in a different area, with no bearing on this comment change), but recorded so the next person does not open an RCA on it.Attribution tier
documentation reviewed — the entire diff is documentation: a
.cuecomment, its regenerated Go carrier, and a CHANGELOG entry. No code or config behaviour is touched, which is what this tier requires. Every non-runtime standard passed (generation reproducibility, full test suite, gofmt).Harness rulebook compliance — state HOW each is satisfied
/charly-internals:go(the CUE→Go generation pipeline and the SDD drift gate),/charly-internals:plugin(the candy/plan model the comment describes),/charly-internals:git-workflow(PR-only landing).schema/candymodel.cueand its generatedspec/cue_types_gen.gocarrier are the ONLY live carriers of the stale claim (sdk/is clean; theplugins/skills state no drop rule). The two spurious test failures encountered were themselves root-caused (TMPDIR vs the hardcoded/tmpglob) rather than retried or dismissed..cue) and propagated by generation — not restated or patched in two places.grep -c "correctly EXCLUDED"returns 0 in both carriers (pasted above). No transitional or dual-worded remnant.origin/mainin a dedicated worktree so no concurrent session's checkout was disturbed; no force-push, no destructive action.N/A— no runtime behaviour changes.N/A— no Containerfile or label emission in this repo.N/A— no binary produced.N/A (docs-only)— the non-runtime standards stand in, and are pasted above..cueis the single source,task cue:genpropagates, and regeneration on the resulting tree is a no-op. RDD/ADE:N/A(no high-risk assumption, no candyplan:/description:).N/A— a schema comment; no kind-specific logic introduced anywhere.N/A— nothing destroyed or rebuilt.gofmt -lempty,go test ./...exit 0 (TMPDIR unset, per the note above).CHANGELOG/2026.226.1015.mdstaged (placeholder CalVer — the pr-validator finalizes it at merge).Landing order
This PR should land before or together with opencharly/sdk#132. It is the
specleg of that cutover; sdk#132's own validator raised the divergence as blocking (finding B2) and noted no spec PR was in flight to cover it. This is that PR. It requires no sdk change and no pointer bump —specis consumed bysdkas a tagged release, and this comment-only change does not force a re-pin.Assisted-by: Claude Code Anthropic Claude Opus 5 (1M context) (documentation reviewed)