uninstall: the destructive "Remove anyway" path has never run live — and the live leg does not even record WHICH dialog the operator saw (plain Uninstall vs ⚠ LOSES) #1647
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1647
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?
What's true today (verified on
main@d4056146)The Services-tab Uninstall act (#1590, UI
1abf3fca) has two faces (ADR 0060):[data-field="confirm-uninstall"][data-status="plain"], button "Uninstall", POSTaccept_loses:false.data-status="destructive", the rows shown word for word, button "Remove anyway", POSTaccept_loses:true(CatalogueSurface.vuesends it only when the chosen machine'slosesis non-empty). The seam REFUSES a LOSES removal without it (internal/provision/removal.go:131).Brand-reach's
uninstall-from-card-archiveleg has been green on four consecutive live fires (#1277, runs20260918T193207Z→20260919T035808Z). The destructive face is proven only against fakes:internal/provision/removal_test.go,internal/controlapi/provision_integration_test.go:456,dashboard/tests/unit/catalogueUninstall.test.ts,provisionLive.test.ts.Finding 1 — nobody knows which face ran live
uninstallServiceFromCard(app/tests/e2e/fixtures/brandreach.ts:272-280) is commented "confirm the plain removal" but asserts nothing of the kind: it clicks[data-action="confirm-uninstall"]whatever it says, never readsconfirm-uninstall'sdata-status, never looks for[data-field="loses"], and its frame is taken after the run settles. The green run keeps no trace and the harvested control-plane journal is a tail that no longer holds the POST. So four greens do not say whether the operator saw "Uninstall" or "Remove anyway".Finding 2 — by the code, a single-gateway removal SHOULD be destructive
ReviewImpact(internal/provision/impact.go:151-156) raises the live-copy LOSES row whendatasetHomedBy(datasets, service)finds the service's dataset andlastHolder(ds.Homes, device)— the device is its ONLY home. On the brand-reach world there is one machine, so every dataset-bearing service it removes (archive/Omeka first) has exactly one home. Either:datasetsdoes not carry the archive's dataset (or itsService/Homesdo not match), and an operator deleting their only copy is not warned. That is the failure ADR 0060 exists to prevent.Settle this FIRST; it decides whether this ticket is "add an assertion" or "fix a real defect".
What to build
uninstallServiceFromCard, readconfirm-uninstall'sdata-statusand the[data-field="loses"]rows before clicking; record them on the leg (therunRecordedLegevidence) and take a frame of the OPEN dialog (<leg>-dialog.png) as well as the settled one. No behaviour change — this alone answers finding 2 on the next fire.destructive+ a LOSES row naming that dataset and machine; a dataset-less service must showplain. Assert it. If the live answer disagrees withimpact.go, that is the defect — fix the read (wheredatasetsis assembled forRemovalFor), do not soften the assertion.…/uninstallwithaccept_loses:falsefor a LOSES service over the operator session and assert the failed run with the "confirm Remove anyway" sentence, and that the service is STILL running on the box — nothing half-removed.done; on the guest the service's module file is gone and its unit isnot-found(the #1595 / #1351 same-leg on-the-box shape).Local guest, no spend: rides
provision-brands.live.spec.ts/ #1277's rail — reopening #1277 arms one fire.Out of scope
keepssentence (stays unset, #1590).Acceptance
destructive+ the LOSES row live, and is REFUSED withoutaccept_loseswith the service still runningRelated: #1590, #1589, #1595, #1277, ADR 0060, ADR 0097/0100 (the UI classifies nothing — the face must come from the seam).
Finding 2 SETTLED (by code) — it is the second horn: a real defect. And FIXED.
Traced the whole LOSES chain on
main:SelectDeviceDialog.vue'sdestructive=pickedChoice.loses.length > 0, straight from the removal read.RemovalFor→ReviewImpactraises a live-copy LOSES row only whendatasetHomedBy(o.fleet.Datasets(), service)finds the service's dataset and the device is its onlyHomesentry.o.fleet.Datasets()isProjection.Datasets()=configRepoInventory.Placement().Datasets=fleetstate.DatasetsFromPlacement(nodes), which derives a dataset only from a placementAssignmentwhoseDatasetis non-empty.nodeAssignments(control-plane/.../whole_composition.go) setsAssignment.Datasetonly viacatalogue.LiveDataset(slug), andLiveDatasetreturns a name only for slugs incatalogue.liveDatasetServices— which held{"files": true}and nothing else.So
archive(Omeka S,cycles[0], the service the card-uninstall leg removes) was not a live dataset home. Its placement carried no dataset → no LOSES row → the dialog was PLAIN (data-status="plain", button "Uninstall",accept_loses:false). An operator deleting the community's only copy of its sovereign archive was not warned — the exact last-copy loss ADR 0060 exists to prevent. Same for document-archive, whakapapa, surveys, data-collections, newsletters, video. This is why the four green fires' plain confirms went through without complaint: the seam classified nothing to warn about.fileswas the only entry because it was Phase 5's whole subject (ADR 0210 ruling 6 usesfilesas the example, not a files-only rule); the registry was never grown as the data-homing ports landed.whole_composition.goitself anticipates the growth ("richer placement rides the catalogue slices that grow the inventory").Fix (Ruled by agent under ADR 0174 — veto anytime)
Registered every brand-reach service that keeps community data on its own declared dataset in
catalogue.liveDatasetServices(archive, document-archive, whakapapa, surveys, data-collections, newsletters, video). TheDatasetsFromPlacementmechanism was always general; only the registry lagged.internal/catalogue/livedataset_test.go(each service homes its catalogue-Name dataset; chat/code still home none) +control-plane/.../configrepo_inventory_placement_test.go(a gateway carrying the solearchivehomes "Community archive" on it alone — the finding-2 seam through the real placement wiring).go test ./internal/catalogue/... ./internal/provision/... ./internal/fleetstate/... ./internal/backup/... ./internal/controlapi/... ./control-plane/...green, zero breakage.Finding 1 (built, no behaviour change)
uninstallServiceFromCardnow reads[data-field=confirm-uninstall][data-status]+ the ⚠ LOSES rows off the OPEN dialog before confirming, returns them, and theuninstall-from-card-<slug>leg stamps them onto its record (LegMarkers.uninstall) and keeps a<leg>-dialog.pngframe. The next fire will say exactly what the operator saw.Landed
Commit
1776e9c2onmain. GOTCHAS #280; STATUS.md in the same commit; app vitest brandreach 43/43, vue-tsc + gofmt + prettier clean.Acceptance status:
destructive+ the LOSES row live, REFUSED withoutaccept_loseswith the service still running — needs a live guest fireWhy human
The three live-observation clauses (destructive face shown live, the refusal with the service still running, on-box destruction) are not provable by a test a sandcastle run can run — they need a live guest drive on #1277's rail, which a swarm iteration cannot arm ("reopening #1277 arms one fire"). The build is done and the seam is now correct, so that fire will read destructive and green those clauses. Handing back for a human to arm the live re-proof and close.
Ben RULED the conflict this fix opened (in session, 2026-09-20) — ADR 0263, landed
542639c4.1776e9c2made seven services dataset homes, which contradicted #1281 (a service untick is a plain Deploy — nothing on disk is deleted) and would have turned the next brand-reach fire red at its second cycle:confirmRemoveDeploystill demandedplain-deploy, and its own refusal said "re-rule this fixture together with that change, never alone" (GOTCHAS #295). Three options were put to Ben; he ruled: a last live copy is a loss only when NO verified backup of the dataset exists anywhere.ReviewImpactraises the live-copy LOSES row only when the device is the sole home ANDBackupHomesis empty; a backed-up dataset's last live copy is the plain removal (new test). The uninstall dialog reads the same impact. The registry from this ticket stays.destructivewith a LOSES row naming the service's data, and the untick review must bedestructive-confirm/remove-and-deploybeside one. Fixture pins 45/45.BackupHomes, so on a real box the rule always warns today (fails safe) until verified snapshot holders reach the fleet projection.Live re-proof is running by hand on
bens-mac-04(Ben asked for that host; elitebook-03 is busy with an IDIP drive): synced to main, payload rebuilt,smoke-private-path.sh --target local-guest --drive brands. No executor/reporter there, so I will read the leg list + the new-dialog.pngframes and report here. #1277 is reopened to carry it; elitebook's queue was NOT changed, so nothing double-fires.Still not covered by that run: acceptance clause 3's refusal half (POST without
accept_loses, service still running) — the drive clicks the confirm, it never sends the refused request.LIVE: brand-reach GREEN 39/39 on
a13f8b2c— ADR 0263 proven on both removal doorsRun
20260920T223233Z, by hand onbens-mac-04(local guest, no spend), 58.5 min, zero skips,verdict.jsoncommita13f8b2c. Leg list + frames read by me (117 frames, every-w1distinct 39/39).uninstall-from-card-archiverecorded on the leg:{"status":"destructive","loses":["⚠ LOSES Community archive drops to no live copy — gateway holds its only copy."]}; the kept-dialog.pngshows the LOSES row and "Remove anyway"; the removal settleddoneand the card went back to Install. On the four fires before this ticket the same click was an unwarned plain "Uninstall".remove-document-archive,-whakapapa,-surveys,-data-collections,-newsletters,-videoall green through the re-ruled untick door, which now REQUIRESdestructive-confirm/remove-and-deploybeside a LOSES row naming that service's data (it throws otherwise) — so each of the six was warned too. Afterremove-videothe gateway card lists no services.deploy-videogreen again (192 s) — ADR 0257's closure-built plugin, a third host.The first fire there (
20260920T213503Z) proved the same two doors and then went red atdeploy-surveyson a HEALTHY box — a race in the drive's own bar sampler, fixed ina13f8b2c(GOTCHAS #297). Not this ticket's defect.Acceptance
destructive+ the LOSES row liveaccept_loses, the service still running — NOT driven: the walker clicks the confirm, it never sends the unflagged request. Seam-proven only (removal_test.go,provision_integration_test.go:456).What is left is one small leg: before confirming, POST
…/uninstall {service, accept_loses:false}over the operator session, assert the failed run carries "confirm Remove anyway", and assert the service still answers — then confirm as now. Relabelledready-for-agentfor that; the live proof is one more local-guest fire (bens-mac-04 is set up for it:~/drive-logs/brands-20260920b.sh).Also seen, not this ticket: the dialog's machine card read "community archive down" ~3 s after its deploy settled — consistent with monitoring's 30 s aggregation still holding the mid-install verdict (
monitor.go, #1478's note); clears by itself.The refusal leg is BUILT + offline-proven + landed (
ebe5da4fonmain) — handing back for the one live fire that closes the last clauseBen relabelled
ready-for-agentfor "one small leg": the ADR 0060 REFUSAL half of acceptance clause 3. Built it.What landed (
ebe5da4f):refuseUninstallWithoutAccept(app/tests/e2e/fixtures/brandreach.ts) — reads the fleet's one gateway id, POSTs{service, accept_loses:false}over the dashboard's OWN operator session (the same session the dialog's confirm uses), gets 202, then polls the SAME device-scoped deploy snapshot the dialog polls until its terminalfailure.errorcarries the seam'sconfirm Remove anywaysentence (DDR 0156 — the destruction never runs; it lands as a failure frame).refusalNamesRemoveAnywayis pure and grounded inremoval.go's own words (a test reads the Go source so a re-worded seam re-grounds the drive, never leaves it falsely green).expectServiceStillOnGuest— the inverse ofexpectServiceGoneFromGuest: the<slug>-brandunit still readsLoadState=loadedon the guest, so nothing was half-removed (the seam refuses at ReviewImpact, BEFORE any deploy).refuse-uninstall-${svc.slug}leg that runs BEFORE theuninstall-from-cardconfirm oncycles[0](archive), stamping both facts onto the leg (LegMarkers.refusal). The walker's own confirm always sends the flag, so this is the ONLY leg that drives the unflagged request live.Proven offline: red-first vitest → app fixtures
brandreach50/50,vue-tsc+eslint+prettierclean. (The 2 reds inupdatesFeed.test.tsarespawnSync go ENOENT— a Go binary absent from the swarm shell, pre-existing and unrelated; the pre-pushnix develop .#go-cilint gate passed.)Acceptance status:
a13f8b2c)a13f8b2c)destructive+ the LOSES row live (a13f8b2c)accept_loses, the service still running — the leg that drives it is now BUILT + offline-proven; it needs one live local-guest fire to be OBSERVED greena13f8b2c)Why human
The refusal clause is only closed when the new
refuse-uninstall-archiveleg runs GREEN on a live guest — a local-guest fire on #1277's rail (bens-mac-04is already set up:~/drive-logs/brands-20260920b.sh) that a swarm iteration cannot arm ("reopening #1277 arms one fire"). Not a decision and not a test I can run — a human arms the fire, reads the leg + itsrefusalmarker, and checks the last box. No new GOTCHAS (finding 2's hazard is #280).LIVE: every acceptance clause proven — brand-reach GREEN 40/40 — closing
Run
20260921T033507Z, by hand onbens-mac-04(local guest, no spend),verdict.json: 40 legs, 40 green, 0 red, 0 skip, commitce1a72a3(containsebe5da4f). Leg list and frames read in session.refuse-uninstall-archive— green, 0.6 s. Recorded on the leg:failure: "provision: uninstalling Community archive from gateway drops the last copy (Community archive drops to no live copy — gateway holds its only copy.) — confirm Remove anyway to accept it",stillRunning: true. The unflagged request was REFUSED over the operator's own session and the archive's unit was still loaded on the guest — nothing half-removed.uninstall-from-card-archive— green, 29 s.status: destructive, LOSES row as above, open-dialog frame kept; "Remove anyway" removed it.destructive-confirm/remove-and-deploybeside a LOSES row.Acceptance
destructive+ the LOSES row live, and is REFUSED withoutaccept_loseswith the service still runningAn earlier fire the same morning (
20260921T031657Z) went red at foundingenroll-copy— 583/688 store paths, still advancing:mainhad moved and the quick re-fire script refreshes only the tree-built bits, not the payload's warm gateway cache. Re-warmed and re-fired; not a defect (the 09-11 cold-host signature on this machine).Open elsewhere, recorded in ADR 0263: nothing live populates
Dataset.BackupHomes, so on a real box the rule always warns until the backups lane feeds verified snapshot holders into the fleet projection.