rescue move/rehome ladders attach a render-shipping service through raw AttachService — a phantom clan-core instance that would break the whole community's eval (the #2018/#1418 class) #2020
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#2020
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?
Symptom
The rescue move ladders attach a service to a new device through the LOW-LEVEL clan seam
Config().AttachServicedirectly:internal/rescue/deviceladder.go(rehome) andinternal/rescue/serviceladder.go(move) callAttachService(ctx, target, ServiceInstance{Service: mv.Service, ...})for whatever service is being moved — and the rescue tests exercisechatandfiles.For a render-shipping service (chat, files, code, …) that path writes a phantom clan inventory instance
{module: {name: "chat", input: "clan-core"}}— a module clan-core does not provide (they ship IDSS renders, not clan-core modules). That is the exact same phantom that broke node-req-0002's eval in #2018 (and #351/#428/#1418 before it): a committed phantom instance breaks the WHOLE community'sclan select 'clanInternals.cliChecks'until removed.Cause
The phantom-avoidance logic lives in the PROVISION orchestrator (
internal/provision/deploy.goattachCatalogueServiceWith→renderShippingServicerefuse,PortRoutablerouting). The rescue ladders bypass it and call the raw clan seam, so a move of a render-shipping service would write the phantom.#2018 fixed the member-device backup-copy path (renderless services now land as marker module files, never a clan instance) but deliberately did NOT add a broad "refuse unmapped at the seam" guard to
AttachService, because it would break these existing rescue moves.Fix (proposed)
<slug>.nix, never a phantom instance; ORclan.AttachServicethat refuses a service which ships a render (would be a phantom clan-core instance), and teach the ladders to route accordingly.Found while working
#2018 (member-device backup-copy phantom breaking eval).
Related: #351, #428, #1418, #2018, ADR 0104, GOTCHAS #379.
Ruled by agent under ADR 0174 — veto anytime. Triaged as
bug+ready-for-agent. Verified against the code (rescue ladders call rawConfig().AttachService; the seam writes the phantom for any non-renderlessservice; #2018's commit
47dd93aaexplicitly deferred this here). The onejudgement call — ready-for-agent vs ready-for-human — is a two-way door: it
is a label change, fully revertible, and the fix is provable by an existing/
proposed regression test (a rescue move of a render-shipping service asserting
no phantom clan-core instance is committed, against the real config repo). It is
not on the one-way-door list (no credentials, security widening, member-facing
trust accept, data destruction, or spend). The choice between the two fix
approaches below is likewise ordinary agent implementation latitude — both are
revertible and pinned by the same regression test.
Agent Brief
Category: bug
Summary: The rescue move/rehome ladders attach a moved service through the
raw low-level clan seam
AttachService, which for a render-shipping service(chat, files, code, …) writes a phantom
{module:{name:<slug>,input:"clan-core"}}inventory instance — the #351/#428/#1418 lie that breaks the WHOLE community's
clan select 'clanInternals.cliChecks'eval.Current behavior:
When a node fails, the rescue move ladder and the rehome ladder relocate
each service off the gone node onto a healthy target by calling the low-level
clan seam directly:
Config().AttachService(target, ServiceInstance{Service: svc, …}).That seam writes a marker module file only for a renderless service
(
backup-copy, the setrenderlessModuleServices); for every other service itwrites a clan inventory instance naming module
<slug>with inputclan-core.clan-core provides no such module for a render-shipping service (chat/files/code/
mail/meetings/static-sites/…), so the committed instance is a phantom that fails
evaluation of the whole community — exactly the class #2018 closed for the
renderless backup-copy case but deliberately left open for the rescue ladders
(commit
47dd93aa). The rescue tests exercisechatandfilesbut pass todayonly because they run against a permissive fake
Configthat never evaluatesthe inventory — no test asserts the phantom is absent.
Desired behavior:
A rescue move or rehome of a render-shipping service must land that service's
real render (its own
<slug>.nixmodule) — or be refused — never a phantomclan-core inventory instance. The provision orchestrator already solves this in
its attach router (
attachCatalogueServiceWith): it routes aPortRoutableservice through its real
AttachPortrender, refuses a render-shipping servicethat provisioning cannot yet route, and only lets a genuinely renderless / role
service fall through to the raw declarative
AttachService. The rescue laddersmust gain the same guarantee. Two acceptable approaches (agent's choice):
provision orchestrator uses, so a moved render-shipping service lands its real
<slug>.nix(never a phantom). Note the render-aware router currently livesas a method on the provision
Orchestrator, while the ladders hold only afleet-clan handle — so this likely means lifting the routing switch into a
shared helper or onto the clan seam.
clan.AttachServicethat refuses arender-shipping service (one that ships a real render / whose
Attach*exists)rather than writing the phantom, and teach the ladders to route render-shipping
services through the real render instead. (Note #2018 explicitly did NOT add a
broad seam guard because it would have broken these rescue moves — so a guard
here must be paired with correct routing in the ladders, not added alone.)
Behavior for a renderless service (backup-copy) and role services is
unchanged — they still land as the declarative marker/placement.
Key interfaces (behavioral — no paths/lines, they will drift):
detaching a service from the gone node, attaches it to the target. Today it
calls the raw
AttachServiceseam; it must instead route render-shippingservices through their real render (or refuse), matching the provision
orchestrator's attach-router semantics.
renderShippingService(service) boolandclan.PortRoutable(service) bool—the existing classifiers that decide "ships a real render" and "its render can
be routed today." Reuse these; do not duplicate the service lists.
AttachPort/Attach*dispatch that avoids the phantom) — the reference behavior to shareor mirror, not re-implement divergently.
Config().AttachServiceand its renderless-marker branch(
renderlessModuleServices) — the raw seam; whatever the fix, a render-shippingservice must not reach the phantom-writing branch via a rescue move.
Acceptance criteria:
chat) commits itsreal render (its
<slug>.nixmodule) and no clan inventory instance ofthe form
{module:{name:<slug>,input:"clan-core"}}.phantom clan-core instance is committed.
backup-copy) stilllands as the declarative marker file (unchanged).
asserts NO phantom clan-core instance is committed, run against the real
config repo (not the permissive fake) — the #2018 test shape
(
TestAttachService_BackupCopyLandsAsRenderlessMarkerNeverAPhantomInstance/
backupcopy_test.go) is the model.moved service (its deployed signal) is unchanged.
renderShippingService/PortRoutableservice lists are reused, notforked into rescue.
Out of scope:
AttachServicein isolation (that is what #2018 declined; only pair a guardwith correct ladder routing).
renderlessModuleServicesset (#2018's territory).static-sites) routable — if provisioning cannot route a service's render, the
rescue path should refuse it the same way the orchestrator does, not invent a
new render.
Verified: #351, #428, #1418, #2018, ADR 0104, GOTCHAS #14.
Blocked — needs a human design ruling (asked, no reply within the window).
The phantom fix itself is clear, but what a rescue move/rehome of a render-shipping service should do instead is a flow-contract decision I do not want to rule solo, because it changes a wireframe-backed promise (
docs/ux/flows/p8-rescue.mermaid: "move/rehome services to healthy nodes").The decision
Rescue holds only a fleet-clan handle — no community apex / operators / service secrets — so it cannot itself render a service's real
<slug>.nix. The provision orchestrator's attach-router (internal/provision/deploy.goattachCatalogueServiceWith), which does hold that context, renders routable render-shipping services (files/docs-editing/forward-auth ports) but refuses the render-shipping-but-not-routable ones (chat/code/mail/meetings/static-sites, viarenderShippingServicebackstop). The rescue tests exercise chat — which even the orchestrator refuses.So a render-shipping rescue move cannot land a real render without provisioning's live context, yet acceptance clause 1 wants it to "commit its real render", and the p8-rescue flow promises move/rehome to healthy nodes.
Two sanctioned approaches, very different sizes
(A) SMALL — add the seam guard to
clan.AttachService(refuse a render-shipping service → never the phantom) + teach both ladders to pre-check (before any detach, to avoid orphaning) and produce an honest failed rung ("X ships a render provisioning must place — hand to re-provisioning P4-S1", the same route a returned rehomed device already takes). Fixes the community-breaking phantom now; proven against the real config repo (the #2018 test shape). But render-shipping services (chat and files) can no longer be rescue-moved until their render is routed — a change to the flow's move/rehome promise — and clause 1's "commit real render" is deferred to a follow-up (wiring provisioning's render-aware attach into rescue).(B) LARGE — wire provisioning's render-aware attach into both ladders now (new delegate +
NewServiceLadders/NewDeviceLaddersconstructor params + the 3 wiring sites:whole_composition.go,resting_composition.go,smoke-fleet), so routable services (files) land a real render and non-routable (chat) are refused. Satisfies clause 1 for files, but the rescue test fleets must gain full provisioning context (apex/gateway/operators) to render — a big slice, and it still refuses chat (the service the current tests move).My lean
(A) now — a failed rung is a strict improvement over a community-breaking phantom — plus a filed follow-up for (B). But because (A) changes the p8-rescue flow's move/rehome promise (arguably
needs-design), and (B) is a large re-scope, I'm parking this for a human to choose direction.Why human
A flow-contract / UX change (the p8-rescue move/rehome promise) and a scope decision between a small phantom-fix-with-deferral and a large render-routing slice — beyond a clean two-way door. No prior ruling in comments; the ask (
i15884…) posted to chat but got no reply in the window.