Tracking issue for the B2 PR (branch feat/change-journal-b2; PR to be opened after review).
Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: B2 — Per-task change journal. Stacked on #1395 (S3) + the B1 per-write checkpoint PR; to be rebased onto main once both land.
Scope
- Append-only
changes.jsonl under the task dir (<globalStorage>/tasks/<taskId>/changes.jsonl): one entry per file write — path (relative), operation, the B1 checkpoint id, diff stats, timestamp.
- The journal append chains onto the B1 per-write checkpoint so it records the real checkpoint hash; the whole tail stays fire-and-forget (no write-path latency, no floating promises).
apply_patch records one entry per file, all referencing the single checkpoint id.
- Torn-tail repair on load: an incomplete final line is discarded and the rest parsed; load never throws on a torn tail (crash mid-append leaves a valid audit list).
Acceptance
- One journal entry per successful write referencing the resolved checkpoint id; none for rejected writes or the task-start baseline
- Load: clean tail, torn tail, empty file, missing file, and a corrupted middle line all resolve without throwing
- Journal is the single per-task audit list and survives a crash mid-write
- CI green (ubuntu unit-test gate), 100% codecov patch coverage
Status
Tracking issue for the B2 PR (branch
feat/change-journal-b2; PR to be opened after review).Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Item: B2 — Per-task change journal. Stacked on #1395 (S3) + the B1 per-write checkpoint PR; to be rebased onto
mainonce both land.Scope
changes.jsonlunder the task dir (<globalStorage>/tasks/<taskId>/changes.jsonl): one entry per file write — path (relative), operation, the B1 checkpoint id, diff stats, timestamp.apply_patchrecords one entry per file, all referencing the single checkpoint id.Acceptance
Status