updates: durable-attempt-state — persist the ADR 0067 budget across restarts (#74 ruling + S12) #146
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#146
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?
Parent
Feature spec: #17 (provisioning/P4b updates). Filed by the 2026-07-26 wireframe-vs-built rulings (origin ticket #74) plus spec finding S12 from the same review sweep. Ruling: persist — the durability clause stands.
#74's spec requires durable attempt state, but
internal/updatehas zero file I/O: the ADR 0067 attempt budget ("rolled back twice → quarantined, no further automatic attempts") lives only in memory. An agent restart forgets the first failed attempt and resets the quarantine budget — and a restart is most likely exactly during a failing update. The UI half was #112 (closed); nothing owns this seam half.What to build
internal/update/rollback.go:102):RetryByHandbypasses the maintenance-window queue guard. Reconcile against #74/#62's clauses — if by-hand retry is meant to run immediately, encode that reading in a comment + test; if it must queue for the window, fix it. Read the origin tickets; do not guess.Acceptance criteria
Blocked by
None (soft note on #141's shared store helper — use it if present).
Task manifest
Done in
666dad1(onorigin/main).Durable attempt state (#74 / ADR 0067):
internal/update'sStorenow persists its whole standing document (policy, current, tracked releases with attempt counts + quarantine state, history, last-checked) behind a newBackend— the JSON single-writer load/mutate/save shape founding/rescue use (#141's shared helper had not landed, so the shape is matched, not imported). AddsStoreDoc,OpenStore,MemoryBackend/FileBackend(atomic temp-file rename), andSchemaVersionrefuse-or-migrate (ADR 0050).Poll, the rollback (recordFailure), the applied path, andEndEarly(now(bool, error)) persist on every durable mutation;NewStorestays memory-only for the see-state/review/policy seam tests.Restart tests (
rollback_test.go, over a real temp file): two rollbacks → restart (new store over the same file) → still quarantined, no further automatic attempt, no rollback runs; one rollback → restart → the next failure is still attempt 2 and quarantines (the budget survives). Plusstore_test.go: seed-then-resume, newer-schema refusal, last-checked persistence.S12 (
rollback.go:102): ruled intended —RetryByHandbypassing the maintenance-window gate is what #74's spec text ("retry it by hand without waiting for the second failure", story 35) and ADR 0015 (the operator is never overridden) require; the window gate defers only automatic retries. Encoded in a strengthened doc comment +TestRollback_RetryByHand_RunsImmediately.wireframe: none— seam-side durability; the UI half was #112 (built). Not run locally (no go/nix toolchain in the sandbox); the seam suite runs in CI insidenix develop. STATUS.md updated (header + milestone log).