You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve managed recovery and collection; bump tgrep to 1.3.0 - #233
↑ CI passed all ten jobs, including full workspace tests on native Windows ARM64, Windows x64, Linux, and macOS, plus existing lifecycle measurements, Clippy, formatting, and the Windows Rust 1.88 release build. ↑ ARM64 CI reproduced the unsupported /CETCOMPAT linker flag; architecture scoping fixed it while preserving x64 hardening. ↓ Catalog/verifier contention failed two jobs before an unchanged rerun passed; original incident-scale contention remains unverified, and runtime integration predates the follow-ups.
Diagnosis confidence
9.5/10
↑ Native phase-4 replay left the receipt pending on 1.2.10 and recovered it on the first pass with 1.3.0. ↑ Regression tests reproduce deferred-receipt starvation, retained proofs after partial deletion, and malformed receipts blocking resumed recovery before their fixes. ↑ Native ARM64 linking failed with LNK1246 for /CETCOMPAT before the architecture-specific fix.
Evidence fit
8.5/10
↑ Reproduction uses the incident's resumed phase-4 cursor and preparing/not-committed receipt state; the regression suite now also passes natively on Windows ARM64. ↓ The original 411 MB catalog, 8.4 GB cache, and ARM64 disk-contention workload were not replayed; runtime retry fixes are separate.
Summary
Recover interrupted receipts without waiting for a long metadata-cleanup traversal to wrap back to the operation phase. The bounded fast path preserves live producers and leaves half the examination/time budgets for ordinary recovery, preventing deferred receipts from starving cleanup. Malformed receipts and eligibility errors are reported per receipt without blocking unrelated cleanup.
Unlink a fully verified member in one journaled step when it fits the remaining deletion-byte budget; retain bounded truncation for larger members.
Continue productive automatic collection traversals at the base retry interval until a complete traversal changes nothing, then back off.
Reclaim seal rows for confirmed removed members while their object remains pending deletion. Preserve member deletion receipts and surviving members' proofs, allowing collection to resume with exact accounting.
Bump the workspace and both lockfiles to 1.3.0, update release examples, and document the lifecycle behavior.
Add windows-11-arm to the existing full CI test matrix, with checks for an ARM64 runner and native aarch64-pc-windows-msvc Rust host. Scope /CETCOMPAT to Windows x64; retain control-flow guard, static CRT, and /DYNAMICBASE on both Windows architectures.
Validation
Current head e9471af763fe770ee32d7617295528a470a21bd4: all ten CI jobs passed, and all 16 PR checks passed.
Native Windows ARM64 job confirms host: aarch64-pc-windows-msvc and passes the full locked workspace suite, including 525 core unit tests, 399 CLI unit tests (2 existing ignored), 117 shared-daemon tests (4 existing ignored), 3 native Windows catalog tests, 42 managed lifecycle tests, pinned legacy compatibility controls, and vendored tests/doctests. No new skips or relaxed assertions; the existing two-test-thread setting and 40-minute timeout are unchanged.
The first ARM64 build exposed LNK1246 from the unconditional x64-only /CETCOMPAT flag. After scoping that flag, local Windows catalog tests passed 3/3, verbose compiler commands retained all four x64 hardening flags, and native ARM64 compilation succeeded.
The first full-suite attempt at the current head hit busy/catalog-io during an ARM64 migration test and member-verifier-active in a macOS collection fault test. Both failed jobs passed on an unchanged rerun; no automatic test retries were added. These contention failures remain visible in attempt 1 of the linked run.
Review-fix commit af1c02029b75a6974024b4326f52ffdaace938f4: all nine CI jobs passed, including full workspace tests and managed lifecycle measurements on Windows, Linux, and macOS. All 15 PR checks, including CodeQL and CLA, passed at that revision.
The malformed-receipt regression failed before the fix and passed afterward. The macOS prefix-mutation fixture retains its safety assertions with a smaller deletion budget and bounded sweeps; native macOS CI confirms it passes. The Windows polling test now waits for live query publication instead of treating disk evidence as a reader-swap barrier; Windows CI confirms it passes.
Review follow-up local checks: 34 collection/recovery core tests, 6 watcher integration tests, workspace all-target Clippy with managed test hooks, formatting, and diff checks passed.
Initial local verification: 130 managed core unit tests and 399 CLI unit tests passed (2 CLI tests ignored).
At the repository's normal two-thread concurrency: 3 Windows catalog tests, 42 managed lifecycle tests, 12 collection/recovery daemon tests, and 3 metadata/proof daemon tests passed.
Workspace all-target Clippy with managed test hooks, formatting, diff checks, and the locked release build passed.
Windows x64 binary from 1a7b9b281f05eb86f2eef0944cf1cd97243cba06 integrated with the runtime fixes: complete two-file SDK suite 9/9, separate seeded journal probe 1/1, and native phase-4 recovery resolved the predecessor on the first pass. This integration predates the review and CI follow-ups and was not rerun against the current head.
The collection fixture reached zero unreferenced checkpoint bytes with the incident's collection budgets and grace disabled; the tuned-policy fixture also drained successfully. These are small-fixture results, not an original-incident throughput claim.
Compatibility and scope
No protocol or storage-format change; deprecated v1 remains supported. Existing authentication, ownership, byte limits, and conservative accounting remain in force.
Checkpoint deduplication, transaction batching, larger proof blocks/Merkle storage, VACUUM, and new backlog telemetry are not included. Freed SQLite pages are reused, not returned to the filesystem by VACUUM.
Companion runtime recovery/backoff changes were tested separately. Its download pin remains on published 1.2.10 until matching 1.3.0 release assets exist; this PR does not publish a release.
…ection; bump to 1.3.0
- maintenance.recover now resolves unfinished receipts of ended instances,
cancelled or expired operations on every pass, including passes resumed
past the operation phase, after releasing their reservations. Previously
a sweep resumed past phase 3 left such receipts pending until the cursor
wrapped, so offline collection kept deferring on the stuck token.
- Collection unlinks a verified member that fits the remaining deletion
budget in one journaled step instead of chunked tail truncations.
- The daemon starts another collection traversal at the base retry
interval after a productive one, until a traversal changes nothing.
- Document the new behavior and bump the workspace to 1.3.0.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Page through pending receipts and reserve half the pass budget for the ordinary recovery sweep. Preserve live producer reservations and cover one-row and multi-row limits with a regression test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Release proof rows in bounded housekeeping batches while an object remains pending deletion. Keep its member deletion receipts and every surviving member's proofs, and verify collection resumes with exact accounting.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The macOS prefix-mutation test panics after its payload is deleted, and malformed pending receipts can repeatedly abort cleanup, blocking unrelated catalog work.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Resetting the receipt scan position on every pass lets deferred receipts repeatedly consume the fast-path budget, delaying recoverable receipts until the full cleanup traversal wraps.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Deferred receipts can starve recoverable receipts on the fast path
tgrep-core/src/managed/maintenance.rs:1038
Resetting after on every pass lets deferred receipts monopolize the fast path: with max_examined = page_objects = 4, two lower-ID cancelled receipts with live producers consume both slots on every resumed cleanup pass. A recoverable receipt behind them still waits for the full cleanup traversal to wrap, defeating expedited recovery for that receipt. Retain or rotate a separate receipt-scan position across passes while preserving the half-budget cap, and add a regression with a recoverable receipt behind a deferred prefix.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The linked successful CI run excludes the new Windows ARM64 job, leaving native ARM64 validation outstanding for crash-recovery, deletion-accounting, and filesystem-locking changes.
Keep CFG, static CRT and ASLR on both Windows architectures; native ARM64 rejects /CETCOMPAT with LNK1246.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Destructive reclamation and accelerated receipt recovery alter crash-recovery invariants, while the original large-catalog ARM64 contention workload remains unverified and the cited CI run does not cover the added ARM64 job.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
e9471af763fe770ee32d7617295528a470a21bd4↑ ARM64 CI reproduced the unsupported /CETCOMPAT linker flag; architecture scoping fixed it while preserving x64 hardening.
↓ Catalog/verifier contention failed two jobs before an unchanged rerun passed; original incident-scale contention remains unverified, and runtime integration predates the follow-ups.
↑ Regression tests reproduce deferred-receipt starvation, retained proofs after partial deletion, and malformed receipts blocking resumed recovery before their fixes.
↑ Native ARM64 linking failed with LNK1246 for /CETCOMPAT before the architecture-specific fix.
↓ The original 411 MB catalog, 8.4 GB cache, and ARM64 disk-contention workload were not replayed; runtime retry fixes are separate.
Summary
windows-11-armto the existing full CI test matrix, with checks for an ARM64 runner and nativeaarch64-pc-windows-msvcRust host. Scope/CETCOMPATto Windows x64; retain control-flow guard, static CRT, and/DYNAMICBASEon both Windows architectures.Validation
e9471af763fe770ee32d7617295528a470a21bd4: all ten CI jobs passed, and all 16 PR checks passed.host: aarch64-pc-windows-msvcand passes the full locked workspace suite, including 525 core unit tests, 399 CLI unit tests (2 existing ignored), 117 shared-daemon tests (4 existing ignored), 3 native Windows catalog tests, 42 managed lifecycle tests, pinned legacy compatibility controls, and vendored tests/doctests. No new skips or relaxed assertions; the existing two-test-thread setting and 40-minute timeout are unchanged./CETCOMPATflag. After scoping that flag, local Windows catalog tests passed 3/3, verbose compiler commands retained all four x64 hardening flags, and native ARM64 compilation succeeded.busy/catalog-ioduring an ARM64 migration test andmember-verifier-activein a macOS collection fault test. Both failed jobs passed on an unchanged rerun; no automatic test retries were added. These contention failures remain visible in attempt 1 of the linked run.af1c02029b75a6974024b4326f52ffdaace938f4: all nine CI jobs passed, including full workspace tests and managed lifecycle measurements on Windows, Linux, and macOS. All 15 PR checks, including CodeQL and CLA, passed at that revision.1a7b9b281f05eb86f2eef0944cf1cd97243cba06integrated with the runtime fixes: complete two-file SDK suite 9/9, separate seeded journal probe 1/1, and native phase-4 recovery resolved the predecessor on the first pass. This integration predates the review and CI follow-ups and was not rerun against the current head.Compatibility and scope
No protocol or storage-format change; deprecated v1 remains supported. Existing authentication, ownership, byte limits, and conservative accounting remain in force.
Checkpoint deduplication, transaction batching, larger proof blocks/Merkle storage, VACUUM, and new backlog telemetry are not included. Freed SQLite pages are reused, not returned to the filesystem by VACUUM.
Companion runtime recovery/backoff changes were tested separately. Its download pin remains on published 1.2.10 until matching 1.3.0 release assets exist; this PR does not publish a release.