backups: restore-and-coverage-fixes — verify before resume in-place; coverage gates on source health (#91/#82) #118
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#118
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: #20 (backups). Follow-up filed by the 2026-07-26 review sweep (code-review Standards/Spec + design-verify Design axes over
6596977..9e946b7). Two seam defects:internal/backup/restore_inplace.go:271-299resumes the service beforeVerifySample; on verify failure the pre-restore snapshot rolls back onto the running, un-quiesced service, silently destroying member writes made in the resume→verify window. Port contract (backup.go:106): "data is only replaced while quiesced".internal/backup/coverage.go:312gates on the target node'sbackup-copyjob instead of the dataset's source service health; the tests encode the wrong reading.Acceptance criteria
Blocked by
None.
Task manifest
Done in
2d8c313(onorigin/main).#91 — in-place restore write-loss window:
RestoreInPlaceresumed the service beforeVerifySample, so on verify failure the pre-restore-snapshot rollback replaced live data on the running, un-quiesced service — silently destroying any member write made in the resume→verify window (violating the port contractbackup.go: "data is only replaced while quiesced").rollbackInPlacenow takes arunningflag and RE-QUIESCES before the fallback replace on the verify-failure path. The fake port now tracks apausedstate and records any replace-while-running; new seam testTestRestoreInPlaceVerifyFailureLosesNoWriteasserts that window is empty and the rollback still falls back to the pre-restore snapshot. Verified red-then-green (the test fails when the re-quiesce is removed).#82 story 31 / #73 story 16 — coverage gated on the wrong signal:
copyCountsgated a copy on the TARGET node'sbackup-copyjob. Coverage now gates each dataset on its SOURCE service health on the home (newsourceHealthy; Identity control-plane exempt) — a failed source claims no coverage anywhere and the data it protects still shows as an open gap. Story-31 test rewritten (TestFailedSourceServiceClaimsNoCoverage) to assert the source signal and that target health is not it; the run/restore/rebuild seams now health-pass the source service; the now-unusedbackupCopyServiceconst was removed.All acceptance clauses met. Full Go test suite +
go vet ./internal/backup/pass. Evidence:internal/backup/{restore_inplace,coverage,backup}.go+ tests; STATUS.md updated in the same commit.