mail-cohost: provisioning writes a phantom clan-core mail instance — gateway eval dies #1418
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#1418
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?
The failure
mail-cohostis the first and only red of 27 legs (verdict.json:"green": 26, "red": 1, "skip": 0). This is not the KNOWN own-VPS pairing frontier named in the brief:pairis green ({"leg": "pair", "status": "green", "ms": 125}) andlegs.jsoncarries zero skips, so no skip reason in this drive names this red as out of scope. It is a live, actionable defect.The leg ticked Mail on the gateway's P4-S2 change screen and confirmed a plain deploy. Provisioning committed the placement as a declarative inventory instance naming a clan-core module that does not exist, and clan's eval preflight excluded the gateway node:
logs/droplet-journal.txt:1994carries the same fault from the in-guest control plane:Live-box evidence (the box answered; SSH was not refused)
The droplet is still up and the config repo it owns after cutover is
/srv/idss/config. The phantom is sitting in it:Compare the two commit-message shapes: files landed as "attach files (Nextcloud) module" (a real render writing
files.nix), mail as "attach service mail ... as gateway" —configFace.AttachService's format string atinternal/clan/config.go:145.The machine dir and the entry module confirm nothing was rendered or imported:
No unit failed and nothing is broken on the box — consistent with "the node was excluded at the eval preflight — nothing was deployed".
/var/lib/idss/provision-deploy-runs.jsonrecords the run stopping cleanly atdeploy-serviceswith"kind": "config_eval", health checks stillpending.Suspected layer: PRODUCT
The defect is an unrouted service falling through provisioning's dispatch into the phantom-writing fallback — the exact
#351/#428hazard the codebase outlaws by name.mail has a real render but is not registered on the deploy-routing seam.
AttachMailexists (internal/clan/mail_attach.go:83) and mail owns a module file (internal/clan/deployedservices.go:22,mailSlug: MailFileName), butportAttachers(internal/clan/portroute.go:50-72) has nomailentry, soPortRoutable("mail")returns false (portroute.go:211-220). portroute.go's own comment at line 208 says so: "A render-shipping service that is NEITHER (mail, chat, code, …)".So
attachCatalogueServicefalls through to the phantom.internal/provision/deploy.go:932-955switches on files/docs-editing/calendar, then takes theclan.PortRoutable(service)branch — mail matches neither, so it reaches the renderless tail:which writes, at
internal/clan/config.go:154:That is verbatim the instance now in the live inventory. The repo's own rule, stated at
internal/clan/portroute.go:78-81andclan.go:139, is that this must "NEVER [be] a phantom clan-core inventory instance naming a module that does not exist (the #351/#428 lie)" — but it is only enforced insideAttachPort, which mail never reaches.The P4 change-deploy path applies no deployability gate.
provisionCannotDeploy("mail")is true (deploy.go:1727: render-shipping ∧ ¬routable), and the founding path honours it —CommitGatewayServices(deploy.go:272-299) filters onCanDeployServiceand reports mailDeferred. The path this leg drives,deployServicesOnly(deploy.go:474-486), callsattachCatalogueServicefor every added service with noCanDeployServicecheck at all. That asymmetry is what turns a gated service into a committed phantom.The UI is not the bug:
SelectRoleServicesScreen.vue:936documents gated rows as "any row: gated items are explained, never un-tickable" and:1151"advice, never veto" — deliberate wireframe contract. The backend is supposed to be the veto, and on this path it isn't. The Go gate itself is intact and pinned:internal/provision/assess_test.go:523asserts mail must be gated "not ready to set up here yet", andgo test ./internal/provision/passes.Harness note (secondary, not the cause): the drive declares
mail-cohosta LIVE leg citing #1373 / spec #1361 stories 17/19 (app/tests/e2e/journey.droplet.spec.ts:727-741), andportal-memberbehind it depends on a real mailbox. The leg went live ahead of the routing it needs; the codebase still describes mail as "the sibling frontier: render-shipping but not yet routed, so they stay gated" (deploy.go:1712-1726). Either the routing lands or the leg returns to a named skip — but the phantom write is a product defect either way.What plugging it needs
The guard (small, do first — turns a broken fleet-wide eval into an honest refusal). Make
attachCatalogueServicerefuse arenderShippingServicethat is notPortRoutable, instead of falling through toAttachService, and/or apply theCanDeployServicefilter indeployServicesOnlythe wayCommitGatewayServicesalready does. Today one phantom instance breaks the eval preflight for the whole gateway node, so an unroutable tick blocks every subsequent deploy until the commit is reverted.The real plug (what #1373 actually wants). Route mail's existing
AttachMailrender on the deploy seam. This is not a one-lineportAttachersentry: that map is typed for forward-auth ports whose placement is{Node, Apex}, whereasMailLiveSet(internal/clan/mail_attach.go:41-70) additionally needsIDPHost,LDAPURL,LDAPBindDN, and four clan-var secret paths (LDAPBindPassFile,DKIMKeyFile,AdminSecretFile,OIDCClientSecretFile,DBPassFile) that provisioning does not assemble today. Mail is also gateway-colocated with mesh-only transport ports 25/465/587/993 that the gateway TCP-proxies (ADR 0115), not a front-door-only HTTP port — so it needs the co-host compose + proxy-loop wiring, not just the forward-auth route. Expect var-spec generators plus aMailLiveSetassembler ininternal/provision, then registration on the seam soPortRoutable("mail")flips and the P4-S2 gate lifts on its own.Pin it. Extend
assess_test.go:523's list-driven pin to move mail from the gated set to the offered set in the same commit, and add a provisioning test that a render-shipping-but-unroutable slug is refused, never committed as an inventory instance.drive
20260912T045221Zred atmail-cohost:deploy failed (clean-retry): provision: deploy gateway: clan: config_eval on gateway: the node was excluded at the eval preflight — nothing was deployed: error: error: flake input 'clan-core' doesn'evidence:
/home/swarm/session-runner/idss/test-results/drive-droplet/20260912T045221Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedswarm-claim host=matou-dev-server-01 run=22260
(automated multi-host claim — lowest live claim id works this ticket)
mail, which the product GATES out of selection (not routable) — a phantom deploy that reds every drive after renting a box #1419Ruled by agent under ADR 0174 — veto anytime.
Ruling: fix the product defect (the phantom write) with the guard #1418 names as "do first", keep mail GATED, and split the real routing (item 2 — "The real plug") out to its own ticket #1420.
The decision ruled: whether this slice lands the full mail routing (var-spec generators + a
MailLiveSetassembler + the co-host transport-port wiring, ADR 0115) or just the phantom-containment guard. The issue itself frames item 2 as "not a one-line" and an entire feature; item 1 (the guard) is the actual defect ("provisioning writes a phantom clan-coremailinstance — gateway eval dies").Why it is a two-way door: both guards are additive refusals —
deployServicesOnlynow filters added services throughCanDeployService(mirroringCommitGatewayServices), andattachCatalogueServicehard-refuses arenderShippingServicethat is notPortRoutable. They write no new state; when #1420 routes mail's render,PortRoutable("mail")flips and both guards stop firing for mail with zero caller change. Reversible by reverting the commit.What proves it:
internal/provisionpins —TestAttachCatalogueService_UnroutableRenderShipIsRefusedNeverAPhantom(the backstop refuses mail, never commitsattach-service mail) andTestDeploy_UnroutableServiceIsSkippedNotCommittedAsAPhantom(files still deploys, mail is skipped not phantom-written).go test ./internal/provision/ ./internal/clan/green,go vetclean.Effect on the
mail-cohostleg: it returns to a named skip until #1420 lands — the harness note the issue flagged as secondary. The product defect (phantom breaks whole-node eval) is closed either way.close-report for #1418 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
b983114e5bis not reachable from origin/main (not landed)envelope
close-report for #1418 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope