-
Notifications
You must be signed in to change notification settings - Fork 2
plat 147
PLAT-147 — the managed backup path can track its own Git bundle, causing every backup to recursively embed prior backups
| Coordination | Value |
|---|---|
| Assigned agent | unassigned |
| Ticket state |
contained — canonical path guard, future-agent Git guidance, bundle deletion, and verified history cleanup shipped; generalized managed external archive lifecycle/health remains separate product work |
| Last synchronized | 2026-08-19 |
- Priority: P0 — unbounded disk growth can make the machine unusable while the resulting backup becomes slow, stale, or impossible to verify.
- Owner: Pulse/finalizer backup contract, backup destination validation, workflow-builder guidance, and backup health reporting.
- Observed on: Tectonic USA Day Trading.
-
backup/wf-backup.bundlewas approximately 67 GB before its explicitly authorized deletion on 2026-08-19. - the workflow repository's
.gitdirectory is approximately 133 GB. -
git ls-filesconfirms the generated bundle is itself tracked. - repository history repeatedly commits that bundle.
- the backup status reports bundle generation timing out and the portable bundle remaining stale.
This forms a self-amplifying graph: a bundle is committed into the repository, then the next bundle includes repository history containing the previous bundle.
The backup contract relies on agent instructions but has no structural guard on the destination. A generated backup may be placed and tracked inside the source repository it snapshots. Git then treats the backup as ordinary source content, and later backups recursively preserve it.
Generated repository backups must live outside the repository being backed up, for example under a platform-owned backup root keyed by workflow identity.
Before running a backup, the platform should:
- canonicalize source and destination paths;
- reject a destination inside the source repository or its
.gitdirectory; - reject a destination reported by
git ls-files; - write to a temporary external path, validate
git bundle verify, then atomically replace the previous good bundle; - report abnormal repository/bundle growth and retain the last verified backup on failure.
The tracked working-tree bundle has now been deleted. On 2026-08-19 the
repository history was rebuilt with only backup/wf-backup.bundle removed.
Before replacing the object store, the cleanup verified that every other path
and blob at main matched the original tree, ran strict object validation, and
preserved all six pre-existing working-tree modifications byte-for-byte. The
resulting repository is approximately 177 MiB instead of 133 GiB.
A complete, verified 166 MiB recovery bundle now lives outside the source
repository at
/Users/mipl/ai-work/.agentworks-backups/tectonicusadaytrading/filtered-history-2026-08-19.bundle.
Cleanup metadata records the old/new heads, tree comparison, status comparison,
and copies of the uncommitted files. The remaining product work is to make this
external, verified, atomic backup lifecycle and its health reporting a normal
platform capability rather than a one-off recovery procedure.
Future workflow agents now receive an explicit Git contract: the ordinary local
checkpoint is the commit itself; generated bundles/ZIPs/tarballs must never be
created in or staged from the source repository; and staged paths must be
inspected before commit. The shell bridge independently blocks relative,
ambiguous, symlink-resolved in-repository, and other in-source git bundle create destinations. This prevents recurrence even if an agent ignores the
guidance.
- Attempting to create a bundle under the source repository fails before write.
- A tracked destination fails with a clear actionable error.
- External temporary generation and atomic replacement preserve the last good bundle when verification or timeout fails.
- Repeated backups of an unchanged repository have bounded, stable size.
- Backup health exposes source size, bundle size, verification status, and timestamp without requiring an agent to inspect Git manually.
Auto-synced from docs/ on main. Edit there, not here.