carlos / platform Public

retire-window-all-deletes-415

Fixes #415: lifetime detach, recovery and the previous owner's cleanup deleted instance records without marking the canary-retire guard's 15-minute deletion window.

What changes (console only)

  • retirementStepsLocked notes the deletion at entry. Its N1 step turns the record into a tombstone, and detach and recovery both reach it.
  • deleteRecordIfMatch notes, then deletes on the ETag. Every lifetime delete of a record goes through it: the stale-body delete, both allocation cleanups (the previous owner's noted under its own app), deleteUnderRetiredSlot, and the migration's corrupt-body delete.
  • The hourly trash sweep with lifetimes off notes before PurgeAppIfTrashedAt (Astra round 1, P2 1).
  • recentRecordDeletion also reads domain-detach audit rows, for a second console process, which has none of the first one's notes. This only adds refusals.

Witness. Every console fixture now checks that a record delete reaching the bucket from console code has a fresh note for its account and app. It reads the notes of every console the test built over the bucket (witnessServer). On main's code it fails the detach, recovery and trash-sweep paths. Mutation-checked: dropping the helper's note fails five recovery tests, and the wrong owner fails the allocation tests.

Tests. TestRetireWaitsAfterLifetimeDetach (no audit row), ...OnAnotherConsole (audit only) and TestTrashSweepNotesTheRecordsItPurges each failed on the old code.

Census. Root-read: internal/console is out of scope since C2, and the census passes. Record-write (9B8): six lifetime units re-pinned, classes unchanged (retire_window_415_census_test.go). Astra approved all six (round 1).

Review. Astra round 1 (docs/superpowers/specs/CODEX-FINDINGS-RETIRE-WINDOW-415.md): READY AFTER FIXES, no P1. Both P2s were fixed in 706696ca without another round, per the stopping rules.

Commits 6
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity