backup: the in-place restore rollback asserts a success it never observed, and audit writes are discarded under Logged: true #280
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#280
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?
Two dishonest assertions in the destructive-restore path:
internal/backup/restore_inplace.go:305-323—rollbackInPlacediscards all three verbs' errors (_ = Quiesce,_ = RestoreInPlace(… preRef),_ = Resume) then unconditionally appends a stage markedDone: true("Fell back to the pre-restore snapshot … resumed on the data it had before the restore") and setsRolledBack = true. If the fallback replace fails, the operator is told their data was rolled back while the dataset still holds the half-applied restore — or the service is left quiesced. Silent data loss behind a reassuring message.restore_inplace.go:380,internal/backup/run.go:312,internal/backup/pertarget.go:366—_, _ = o.audit.Record(…)whileInPlaceRestoreResult.Loggedis set true unconditionally (restore_inplace.go:221, documented "always true"). The sink is a real durable file write that genuinely fails (internal/member/auditfile.go:32-43). The same package already checks the identical call atpertarget.go:673and:717.Acceptance
RolledBackreflects reality; the reassuring copy only renders when the fallback replace succeeded.Recorderrors are propagated (or at minimum flipLoggedfalse and surface a fault) at all three sites, matchingpertarget.go:673's idiom.RolledBack == false; failing audit sink ⇒ result does not claimLogged.Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).
Fixed in
2d0a0eb(on origin/main).1. Rollback honesty (
rollbackInPlace,internal/backup/restore_inplace.go): each fallback verb is now observed. A failed fallback replace yields aDone:falsestage and leavesRolledBackfalse; the reassuring "resumed on the data it had" copy renders only when the fallback replace and resume both succeed; a rollback that cannot re-pause a resumed service refuses the fallback rather than replacing live data.inPlaceAuditDetailgrows a third case (unexportedreachedLiveDatamarker) so a failure that touched live data but did not roll back is never worded "could not start".2. Audit writes (
restore_inplace.go,run.go,pertarget.go): the three_, _ = o.audit.Record(...)sites now check the error and publish a newFaultAuditFailed; the in-place result flipsLoggedfalse when its entry does not land, matchingpertarget.go:673s idiom.Tests (
restore_inplace_test.go): failing fallback port ⇒ failed stage +RolledBack == false+ no reassuring copy (TestRestoreInPlace_RollbackFallbackFailsIsNotClaimedRolledBack); failing durable audit sink ⇒ result notLogged+FaultAuditFailedpublished (TestRestoreInPlace_AuditWriteFailureDoesNotClaimLogged).go test/go vet/golangci-lintgreen (backup, control-plane).