Harden ADE against disk-full and interrupted-write incidents - #797
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Incident response + product hardening for the July 12 disk-full outage, where a full disk during a kvDb table rebuild bricked every subsequent launch and two chats silently lost their Codex threads. This PR makes a full disk an ordinary operating condition: canonical data is never silently lost, ADE recovers automatically when safe, and a nontechnical user gets a guided, jargon-free recovery path.
Durability
migrate(). Also stops the previously unprotected rebuild ofautomation_ingress_eventsthat ran on every startup..lkgprevious generation; provider-pointer changes are journaled to a bounded (64 KiB) ledger; truncated transcript tails are healed instead of corrupting the next append; pre-migration DB backups are headroom-checked, size-verified, and singular.Continuity
Recovery UX
AdeRecoveryErrorCode) survive IPC; the brain writes bounded machine/project last-failure reports, backs off on crash loops, dedupes repeated failure logs, and copytruncates launchd logs at 10 MiB.Storage
ade-*staging.ade storage snapshot/compress, last-failure line inade brain status, storage line inade doctor.Tests & docs
PRAGMA max_page_count.docs/features/storage-and-recovery/README.md(contracts + all retention bounds) plus updates to chat, terminals, search, settings, remote-runtime docs and ARCHITECTURE.Validation
syncHostService.test.ts"streams terminal snapshots…" — reproduces identically at the branch basef9344115on this machine; unrelated to this diff).remoteRuntime.offlineRpc.integration.test.tsis a dormant pre-existing test that no vitest project ran before this branch; the newintegration-mainproject is deliberately scoped so it stays dormant (see comment invitest.workspace.ts).🤖 Generated with Claude Code
Summary by CodeRabbit
ade storage/ade diskCLI commands for snapshot, compress, and maintenance actions (including text output).Greptile Summary
This PR hardens ADE storage, recovery, and continuity paths against disk-full and interrupted-write failures. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
No blocking issues found in the changed code.
What T-Rex did
Important Files Changed
Reviews (8): Last reviewed commit: "Compress at warning level and decompress..." | Re-trigger Greptile