feat(holds): typed reclaim holds (business/promote-pending/superseded) + hardened snapshot guard #22
+587
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Typed reclaim holds + hardened snapshot guard
Replaces the flat
reclaim_holds.txtwith typed holds so a source is held by why,and hardens the snapshot recoverability check. Engine side only (this repo); the receipt
writer + Teams review card are florasense-tools follow-ups. Based on
main, not stacked.Suite 196 → 222 green. Legacy
.txtholds are unchanged (each line = a business hold).Tiers (verdicts). No auto-reclaim — reclaim is report-only unless
--delete(which confirms per folder).business→HOLD— a human owns it; never reclaimed.promote-pending→HOLDuntil a content-coverage receipt proves the copy landedin
repository/, thenAWAITING-APPROVAL(eligible; a human runs the guarded delete).superseded(DECISIONS feat(restore): Phase-2 full restore capstone (slice 5) #25 / florasense PR #70) →HOLDuntil a supersessionprovenance record exists, then
AWAITING-APPROVAL. The record is human-authored (itsMD5 verdict is human judgment the engine trusts); the engine enforces the machine-checkable
gate feat(restore): Phase-2 full restore capstone (slice 5) #25 requires — the record is present, non-empty, and filled in (not a raw template).
AWAITING-APPROVALis the new "needs approval" verdict the Teams review card (Step C) willsurface. Nothing un-promoted / un-recorded is ever eligible →
HOLD, full stop.Hardened snapshot guard
snapshot_presentnow requires every live file present in the newest NetApp snapshot withmatching size and mtime, not a file-count
≥proxy — which silently passed a filereplaced since the snapshot (same count → old bytes) or renames. Test
test_replaced_file_same_count_failslocks the fix.Removed
The
auto_reclaimflag +AUTO_RECLAIM_ENABLEDswitch — dead/dormant machinery. "Don'treclaim by default" is structural (report-only +
--delete+ per-folder confirm), so there'snothing to disable. A stray
auto_reclaimfield is ignored (test).Files
reclaim.py—load_holds(JSON/typed + legacy .txt),hold_entry_for(str|dict),receipt_valid,supersession_record_valid,classify_hold(the tiers),AWAITING_APPROVALverdict, hardenedsnapshot_present(_attr_catalog),main()order.docs/HOLDS_POLICY.md— the policy, JSON schema, hard gates, and alignment to the deployedflorasense gates (
fs-verify-promotedreceipts,fs-coverage-auditblind-spot watchdog).tests/test_typed_holds.py— 26 tests.Follow-ups (not this PR)
verify_targetonce feat(routing): Phase-2 aggregate reclaim — verify_target (slice 3) #21 lands (routed targets; thepromote-pending/superseded sources are whole-target, so
verify()is the live path today).fs-verify-promotedreceipt writer) + Step C (review-only Teams card), florasense-tools.🤖 Generated with Claude Code