Implement logical recovery archives and durable plaintext staging #44
No reviewers
Labels
No labels
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/attention-mind-mcp!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/svd-dev-attention-mind-mcp-30-dd-469-6-child-2-7-logical-8f132718"
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?
Export allowlisted SQLite rows from a single transaction, exclude key material, and filter replay outcomes using the provider clock. Validate canonical framing, record budgets, footer integrity, and live-item links on readback.
Reserve staging capacity before writing plaintext, verify the staged archive before exposing it, and retire single-link regular files durably. Startup sweeps only staging-owned files. A plaintext file with multiple links stays in place and quarantines the area. The Forget barrier and charge survive restart. Retirement checks file type and link count with a no-follow stat relative to the pinned directory. A symlink, directory, or other nonregular entry at a plaintext name stays in place. The area quarantines and retains the inventory and custody charge. Cleanup after a failed stage also preserves the original refusal. Unreadable single-link plaintext can still be removed. On Darwin, sweep quarantines after retirement if it cannot verify the ACL.
On Darwin with Python 3.12, all 166 focused archive and staging tests passed. The dedicated ACL run passed all nine cases with zero skips, including the missing-symbol, query-error, and creation-time checks. All 18 named mutations failed their targeted regression tests in separate copies. The lock check, Ruff and strict mypy passed.
Round 4 on Darwin passed 172 focused tests, including 10 ACL cases with zero skips. Mode-000 retirement and sweep both removed the file, and a failed stage under umask 0400 left no plaintext. The regression test checks the resulting 0200 mode and simulates denied reads when it runs as root in CI. The six new tests passed on the control. L06, L08, L10 and L12 each failed its targeted test in a separate copy. The no-follow stat mutation, the prior read-open implementation and the ACL-open error mutation also failed their targeted tests.
Round 5 on Darwin passed 179 focused tests, 660 unit tests, and 66 transport tests. The dedicated Darwin ACL run passed 11 cases with zero skips and covered both plaintext and temporary inventory files. All three unreadable-file tests passed under the simulated-root DAC override model, with denied opens injected independently of the runner's UID. The targeted tests failed in 11 separate mutation copies with a passing control. The variants covered L06, L08, L10 (the ACL open and no-follow stat), L12, M01, M03, skipped retire classification, skipped sweep ACL validation, mishandled ACL-open errors, and the previous read-dependent unlink implementation.
Round 6 on Darwin passed all 180 focused tests. The new unstaged-retirement test passed on the control and failed with
staging_retire_failedunder R06 in a separate copy. The test checks that a reserved slot with no plaintext retires successfully, keeps the area ready, and clears its inventory, barrier, and custody charge.Review dispositions
canonicalfrom.commandsto check that retained replay outcomes match the command serializer. The spec's import list omitted this dependency.recovery_crypto.pydoes not check ACLs and stays frozen under child #31's D7.staged()verifies the file through the pinned directory descriptor and returns a path. A later consumer may open different bytes at that path. The child that encrypts the archive (#32 or #33) must hash the exact bytes it reads and refuse a size or SHA-256 mismatch.Closes #30
Co-Authored-By: gpt-6.2-sol noreply@openai.com
Merge gate record: PR #44 (#30), head
a45112a654Gate run by minds-guide@voyager under the operator's standing grant (delegation
operator-word-d982c2768589). The approved spec is the #30 spec rebaselined onto161d6601(sha256ac5f3039…5b8d). It was amended four times at the merge gate under the rulings below. The final copy isspec-pr44-r5, sha256a2dccad5255c41936f7a397013bcc995d1cc89080396f3faad50b1999c1ce8c4. mind-spec checked each amended copy against the canonical:1f01fa3fa9be727ee193e8cba2dccad5Reviews. Three independent sub-agents with no shared context reviewed a detached worktree at each exact head. Each round after the first was a delta review. Every mutation ran in a separate copy of the tree with its own environment.
72f294d172beb4bcdadd9900586b31d530481a19a45112a6The dispositions for each round are on #30: comments 43725, 43731, 43747 and 43763.
Operator rulings (section 6).
retireunlinked before it validated custody): fix before merge. All fixed.st_nlink): fix all four now. All fixed. The same ACL gap stays inrecovery_crypto, which open risk D7 freezes.staged()verifies through the pinned descriptor but returns a path): no #30 change. The child that encrypts the staged archive (#32 or #33) must hash exactly the bytes it reads and refuse on a size or sha256 mismatch. The PR body records the residual.Red side. The guide re-measured each finding before it went back to the author, and again at the head that fixed it:
72f294d1: opening a 0700 directory holdingattention.sqlite3, its-walandnotes.txtdeleted all three and reported READY. At72beb4bcall three survive and the area quarantines.fullmatchchanged tomatchin the sweep): at72beb4bcthe mutant deleted a<64hex>.plaintext.bakfile and all 57 staging tests passed. Fromdadd9900on, 2 tests fail under it.dadd9900all 71 staging tests passed under it. At586b31d5a suite test fails.dadd9900left one 0o200 plaintext on disk across restart.72beb4bcand586b31d5left none.30481a19, reverting it fails 7 tests.30481a19the 179 staging and archive tests passed under it. Ata45112a6the new test fails under it, and the control passes 180 of 180.The Spec reviewer ran its own mutation sets each round: 94 in round 1, 39 on the round-5 retire hunk, and the earlier survivors again at each head. Each non-equivalent survivor reported in rounds 1 to 5 was killed by the suite alone at a later head.
Spec conditions from Half-A.
invalid_accounting_integer) and D6 (one clock sample; the command is retained across the cutoff range).a45112a6.uv lock --check --offline: green at each head.CI. Pipeline 61 is
successon the exact heada45112a6, and the raw logs were audited:Integrate. The locked-environment integrate on the exact head
a45112a6(run 20261120T044546Z-8f132718, label writes disabled) has these results. The guide checked the receipt hash (0b6de276…4074) and its fields:readyForMergeandlensReadyForMergeare true, andtestResultis green.verifiedCommitShaisa45112a6, in the receipt and in the run state, with 0 rework rounds.161d6601.integrate.r4.jsonl) has 0 hits forcommand not found,errors during collection,= not foundand"is_error":true.The integrate raised four warnings:
Residuals recorded in the PR body.
canonicalfrom.commands, outside the spec's import list (SP6).recovery_crypto(frozen by D7).Observations (not findings).
clock_uscallback that raises escapesexport_archive.Storebehaves the same way, and the spec's refusal rules do not cover it.ctypesandskipifuses.staging_inventory_invalid. This fails closed and predates the merge-gate rounds.ANALYZE(sqlite_stat1) makes export refuse.Carried forward.
floor_us, not the cutoff used, so Restore raises its floor to the export cutoff.ArchiveIdentityacceptscreated_us == expiry, but the crypto code requires created < expiry.key_unavailableis not proof of key loss (comments 43686 and 43689).Merge. Pinned to head
a45112a6withcodex-svd pinned-merge, which refuses while a live SVD run holds this repository.