On a large Git workspace the 32 MiB retained-text budget was spent alphabetically on files that never change, so small late edits were recorded with no_patch. The stage-start snapshot now keeps text only for files dirty or untracked at start; a clean tracked file keeps its hash and stage-0 index blob id. When it changes or is deleted, the after capture reads that blob in one `git cat-file --batch` and uses it only if its SHA-256 matches the start read, so stage commits/resets do not move the baseline and filters or assume-unchanged never yield a wrong patch. The after capture shares unchanged files' representation instead of spending budget on them again. FileChange gains no_patch_reason (binary, file_size, budget, lines, evidence_size, git_status, baseline). Non-Git workspaces keep their behaviour.
5.7 KiB
Retained stage file changes
Each newly executed stage visit compares a read-only snapshot of its run directory immediately before execution with a snapshot after execution/cleanup. The server stores the observed changes and unified patches in SQLite alongside the finished step, atomically. Later stages, edits and server restarts do not replace that evidence. Existing historical steps have no retroactive capture.
On Run → Details, select a recorded visit with n/p. Its File changes
section is expanded by default: added lines are green, removed lines red, and hunk
headers accented. d focuses/toggles the diff; ordinary scrolling handles long
patches. Tab still switches only Details ↔ Graph. pipelines inspect RUN_ID --json
includes the same evidence under each step's file_changes field.
Scope and limitations
- This compares stage-start contents, not HEAD or the index. Pre-existing dirty content is the baseline. Changes are retained separately for repeated visits.
- In a Git working tree, capture includes tracked and nonignored untracked files within the run directory. Previously captured files remain eligible after an index/ignore change. Git is only read, never used to stage or revert. Outside Git, capture walks regular files in the run directory.
- In Git, the stage-start snapshot keeps text only for files that are dirty or
untracked at start (
git status); a clean tracked file keeps just its hash and index blob id. If it changes, its start content is read back from that blob (git cat-file --batch) and used only when its SHA-256 matches what was read from disk at start. A commit, reset or index change by the stage therefore does not move the baseline, and the text budget is no longer spent alphabetically on files that never change. A blob that cannot be verified (filters, line-ending conversion,assume-unchanged) is listed withno_patch_reason: "baseline". - Added/deleted files and permission changes are recorded. Renames appear as deletion/addition. Binary changes retain metadata, not binary contents.
- Symlinks, special files, common credential/environment/key/database paths,
secrets/, Git internals andnode_modules/are excluded. This is a path-based precaution, not secret-content scanning; ordinary source patches may contain sensitive text and become part of retained history. - Limits: 10,000 inventoried entries, 1 MiB per file and 32 MiB per snapshot of retained text, 256 MiB per hashed file, five seconds per snapshot, 5,000 combined lines per textual comparison, 64 KiB per patch and 128 KiB serialized file evidence per visit. Oversized, unreadable, omitted or truncated evidence is explicitly flagged partial.
- Over-budget content degrades to a listing, not silence: a text file over 1 MiB,
or beyond the 32 MiB snapshot budget, is still compared by SHA-256 and a change
is listed with
no_patch: true(andtruncated) but no patch. In a Git working tree, a path the snapshot could not compare at all (above 256 MiB, unreadable, or past the time/file limit) is listed the same way when itsgit status --porcelainentry changed during the visit; a path dirty with the same status before and after cannot be proven changed and stays inskipped. Git is only read (--no-optional-locks); protected paths are never listed. - Each content change without a (complete) patch carries
no_patch_reason:binary,file_size(text over 1 MiB),budget(32 MiB snapshot text budget),lines(over 5,000 combined lines),evidence_size(per-visit retained evidence limit),git_status(seen only in Git status) orbaseline. Binary changes staycomplete; the others make the visitpartial. pipelines inspect RUN_ID --jsoncarries a top-levelwarningslist (also printed to stderr) naming every visit whose capture was partial or unavailable.- Failed/canceled stages still retain changes when execution returns. Unconfirmed agent cleanup is flagged partial. A server/process crash cannot guarantee an after-snapshot; recovered steps without capture say “not recorded.”
- Capture is not a transactional filesystem snapshot: concurrent manual edits, other processes or other runs may appear in the diff. Changes outside the run directory, ignored new files, and edits reverted before capture are not observed. The view describes observed changes, not proof of exclusive model authorship.
- Capture failure does not change the pipeline's declared outcome or permissions.
Snapshots are transient server memory. The database retains patches/metadata, not full copies of every workspace file. No new model calls are used for capture.
Server skip fallback
A non-human stage that declares a skipped edge (typically a UI reviewer) is
completed by the server without a model call, and routed along skipped, only
when every earlier visit of the run recorded a complete capture with no
changed files and no image artifact. The step's verdict reason begins
"Server fallback skip (no model run):" and has reason_source: fallback.
Everything else runs the stage's model, which may still choose skipped itself:
- any recorded file change, whatever its path or extension (no repository layout
or "non-UI" extension list is assumed: Go TUIs, Flutter
.dart, Kotlin, Swift, templates, strings and config files can all be rendered surface); - any partial or unavailable capture, or a visit with no capture (a crash, a historical row, a human decision during which the workspace was unobserved, or a checkpoint-retry prefix);
auto_skip=falsein the stage'sconfigs.
A wrong run costs one model call; a wrong skip would ship an unreviewed change, so absent or partial evidence is never read as "nothing changed".