clan: swallowed unmarshals in render can write a machine back with an empty deploy target #283
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/clan/render.go:137, 141, 154—_ = json.Unmarshal(raw, &r)forrole,varsandtargetHost, while every sibling unmarshal in the same function returns a typed&Failure{Kind: FailConfigEval}. Line 157'sdelete(dfields, "targetHost")also drops the unparsed original from the carry-through map, so the nexteditInventorywrites the machine back with an empty deploy target in a clean-looking OurCloud-authored commit — the corruption is laundered into config history.Acceptance
FailConfigEvalfailure their siblings use.targetHost/role/varsfield can never survive a render as silently-emptied output; test with corrupt JSON in each field.Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).
Fixed in
e679ab3(on origin/main).parseClanMachine(internal/clan/render.go) swallowed the unmarshal error on a machinerole,vars,deploy.targetHostand the legacydeploy.target_host—_ = json.Unmarshal(...). A corrupttargetHostparsed to an empty string, and the fallthroughdelete(dfields, "targetHost")dropped the unparsed original from the carry map, so the nexteditInventorywrote the machine back with an empty deploy target — the corruption laundered into config history.All four unmarshals now return the same typed
&Failure{Kind: FailConfigEval}their siblings use. Red-first testTestRender_MalformedMachineFieldsFailLoud(internal/clan/render_test.go) feeds corrupt JSON into each of role/vars/targetHost/target_host and assertsloadInventoryerrors with anerrors.As-matchable*Failure{Kind: FailConfigEval}. go test / go vet green (clan).reset --hard origin/mainmid-run is attributed to the worker and DELETES main-owned machinery (run 57327 lost #2099) #2104reset --hard origin/mainmid-run is attributed to the worker and DELETES main-owned machinery (run 57327 lost #2099) #2104defer res.Body.Close()in internal/controlapi/updates_i18n_seam_test.go:47 (from #2129/6caf5c25) #2153sh -cover ssh — the remote shell re-parses the words,sh -c gitprints usage and the flip faults (Retry then faults at the mv) #2188