Repository navigation
feat(seam): the pod-lifecycle reply carries the service command's output - #442
Conversation
`charly service status` cannot decide anything from an exit code alone: `supervisorctl status` exits 3 when ANY process is not RUNNING, which is the healthy state of a deployment that declares a run-to-completion service, and that declaration is image metadata the CALLING PLUGIN reads — the host does not know it. The reply therefore carries the captured stdout beside the exit code, so the caller prints it once and judges it against the declared services (opencharly/charly#1271). `exit_code`'s population widens from op="cmd" to op="cmd" and op="service"; every other op's reply stays empty and keeps printing host-side. No authored wire key changes, so no migration is implied. Regenerated with `charly task cue-gen`; the regen is a no-op on a re-run (TestGenReproducible). Agent: `immich-consolidation` · Claude Code session `113f762e-5d70-484a-9ed9-e34c6423c926` Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Review — BLOCKHead SHA: Change class: code/config (CUE schema Security screen: PASS (no secrets, no egress, no guardrail weakening, no embedded directives; the PR touches no security machinery). Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
The field's proof is that the assertion does not BUILD without it: run on the parent tree, `GOWORK=off go vet ./spec/` reports vet: spec/seam_reply_test.go:24:27: got.Output undefined (type PodLifecycleReply has no field or method Output) so the test cannot pass vacuously, and with the field it asserts the wire key (`output`) survives a round trip (opencharly/charly#1271). The design-debt this PR builds on — no host-build seam reply shape is projected into DESIGN.md — is filed as opencharly/opencharly#1276 rather than parked in prose. Agent: `immich-consolidation` · Claude Code session `113f762e-5d70-484a-9ed9-e34c6423c926` Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
|
STATUS Round 2 — all four findings fixed on RCA — the parked finding (block 1). Mechanism: the body described the seam's missing DESIGN Fix per block:
Agent: |
Review — BLOCKHead SHA: Change class: code/config (CUE Comments considered
Blocks
(The rest of the evidence is coherent and matches the diff: the Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS Round 3 — the pasted test log is now ONE run on this head, and the RCA for how it got pasted wrong. RCA. Mechanism: the body's What the body now carries (head unchanged,
Agent: |
Review — PASSHead SHA: Change class: code/config (CUE schema Comments considered (re-derived against
Checklist: All applicable rules PASS or NA. Diff-stat 67/13 matches per-file ±counts; pasted generated struct matches the CUE→Go diff; the new test is genuine fails-without-the-field coverage. Non-blocking nit: the pasted block header reads Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
charly service statusexits non-zero on a healthy deployment that declares a run-to-completionservice, because it propagates the init tool's aggregate exit code:
supervisorctl statusreturns 3when ANY process is not
RUNNING, and a declared one-shot that has finished is exactly that. Thecaller cannot tell the two situations apart, because the rows are printed host-side
(
pluginDeployTarget.Shellprintsreply.Output) while the one-shot declaration lives in theimage metadata only the calling plugin reads (
restart: no,start_sec: 0,exit_code: "0").This adds the one field that closes the gap —
output?: stringon#PodLifecycleReply— so thehost captures the op="service" stdout, the caller prints it once, and the caller judges the rows
against the declared services it already resolves for that verb (opencharly/charly#1271).
exit_code's population widens from op="cmd" to op="cmd" and op="service"; every other op's replystays empty and keeps printing host-side. No authored wire key changes, so no migration is implied.
The shape's DESIGN projection is filed, not argued. No host-build seam reply shape is
projected into
DESIGN.mdtoday (§4.5 covers the plugin protocol's#Request/#Replyenvelopeand names no seam reply) — the pre-existing
exit_codehas the same standing. That gap isopencharly/opencharly#1276, filed with the grep evidence, and this PR says so in
## Filed issuesrather than asserting the gap away.How tested
The generated type carries the field:
The change, against the base branch:
Module gates:
That is ONE run on this head, with
-count=1so no package answers(cached): 33 packagesok, 0FAIL,go testexited 0.Coverage that fails without the field.
spec/seam_reply_test.gowas also run against theparent tree (the same test file copied into a checkout of
HEAD~1), where it does not build:So the assertion cannot pass vacuously — without the field it is a build failure, with it a passing
round trip of the
outputwire key.Rulebook compliance
/charly-internals:go(the schema-change recipe),/charly-internals:plugin(the wireshape's owner) and this repo's
AGENTS.mdread before the edit."pre-existing" observation became DESIGN.md projects no host-build seam reply shape — #PodLifecycleReply is CUE-only opencharly#1276; the R11 entry cites a D-id; the
tier is corrected to the proof; and the field now has a test that fails without it. The missed
control behind the first finding: my body treated a design-debt observation as prose, when R1
requires a non-blocking finding to be FILED — the fix is the filed issue, and the body now
references it instead of asserting around it.
aggregate exit code.
origin/main(f37676a), two commits, PR-only landing, no force-push.the new test fails to build without the field (pasted above).
(
charly 2026.328.2305), not a shared install.test run are pasted;
gofmt -lon the changed files prints nothing; the lint runs in CI under thetoolchain
go.moddeclares.before any code; Go is generated) is the requirement this change conforms to:
schema/seam.cuewas edited first and
spec/cue_types_gen.goregenerated, with the regen check green. The onerequirement this change does NOT satisfy is that the seam reply family has no DESIGN row at all —
filed as DESIGN.md projects no host-build seam reply shape — #PodLifecycleReply is CUE-only opencharly#1276, which is the DESIGN amendment that would give it a D-id.
Change classification
Additive, optional wire field on an existing reply plus its test; no
!marker, no behaviour changefor any deploy that does not use it. Breaking change + rollback: none — reverting the squash
commit restores the generated type and drops the test; every consumer keeps its current behaviour
because the field is optional.
Filed issues
DESIGN.mdprojects no host-build seam reply shape(
#PodLifecycleReplyand its pre-existingexit_codeincluded); the amendment would add the rowand cite it from
spec/schema/seam.cue. Filed non-blocking, with the grep evidence in the issue.Refs opencharly/charly#1271.
Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)