The recoverability boundary
The exact promise, what each line of it rests on in the code, and the cases that fall outside it. Read this once, before you need it rather than during.
The promise
Four lines. They are printed on the product pages, in this documentation, and nowhere in a different form:
What GitAegis can put back
- If a recovery capsule was taken, you can roll the operation back.
- If a Flight Recorder event captured a state hash, you can roll back to that state.
- If any reflog entry, ref, branch, stash, or capsule references a commit, Lost Work can recover it.
- Outside those, it cannot, and GitAegis says so instead of pretending otherwise.
What each line rests on
- The capsule line holds because the capsule is written before the first command, and an operation whose capsule cannot be written does not run. What comes back is bounded by what the capsule captured: refs,
HEAD, the index, the staged and working patches, the untracked archive, and the merge, cherry-pick and revert markers. - The state-hash line holds for pointers. An event with a linked checkpoint restores through the full capsule path. An event without one recreates ref pointers only, where no ref exists at that name. Files on disk are untouched, and the operation says so verbatim rather than leaving you to infer it.
- The Lost Work line holds because six sources name commits that no ref points at, and recovery is one
git branch. It is bounded by the object database: if the object is gone, no source can name it back into existence. - The fourth line is the one that makes the first three worth reading. A restore that cannot complete ends as
requires-interventionwith the exact list of what failed. A bounded scan states its bound. A domain the capsule did not capture is disabled rather than offered.
Outside the boundary
These are not edge cases. They are the ordinary limits, stated once:
- Work that was never on disk. An unsaved editor buffer is outside every mechanism here.
- Anything outside the repository. A capsule is a repository snapshot, not a filesystem snapshot.
- A push. Local refs come back; a remote does not un-receive. GitAegis writes
refs/aegis/recover/<branch>-pre-force-pushbefore a force push so the old tip has a name, but restoring the remote is a new operation and depends on the remote still holding the objects. - Objects destroyed elsewhere.
git gc,git pruneandgit reflog expirein your own terminal can delete what every recovery path here depends on. GitAegis never runs them; it cannot stop your shell. - Operations GitAegis did not run. A
reset --hardin your terminal takes no capsule and passes no precondition. The Flight Recorder will record that the refs moved. Nothing could have prevented it. - Data past its retention. Capsules expire 90 days after capture unless pinned or referenced by an unfinished operation, and the deletion is permanent. The Flight Recorder keeps a bounded number of events per repository, and the sweep’s removals do not come back.
- Rebase state. Recorded as a presence marker, never replayed. You continue, skip or abort through Git’s sequencer yourself.
- A lossy content filter. A
filter.<driver>your repository declares runs when a restore writes working-tree content, and a restore inherits whatever that filter does. - Hardware, theft, and everything else a backup is for. Capsules protect you from operations, not from a failed disk. Keep your backups.
Why it is written down at all
A recovery tool that overstates its reach is worse than one that states its reach exactly, because you plan around what you believe it can do. The boundary above is the one the code enforces: the refusal when a capsule cannot be written, the ref update refused rather than overwritten, the bounded scan that says it is bounded, the domain marked not captured. Read it once now, while nothing is wrong, and the sentence that matters during an incident (the fourth one) will already be familiar.