Skip to content

fix(api): drop diff data from checkpoint row metadata for non-full views - #539

Merged
markbang merged 1 commit into
mainfrom
fix/checkpoint-meta-visibility
Nov 20, 2026
Merged

markbang merged 1 commit into
mainfrom
fix/checkpoint-meta-visibility

Conversation

@markbang

@markbang markbang commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Checkpoint row metadata included precomputed diff data for viewers without the full file view; it is now removed.

The checkpoint row (GET /spaces/:id/checkpoints/:checkpointId) returned meta.diffs to any viewer with checkpoint.view. That field holds precomputed per-file patch lines (inline up to 16 KB per file, otherwise an object key). Viewers without the full file view now get the row without it.

Field decisions

Full file view: the row is unchanged.

Without the full file view:

Field Decision Reason
meta.diffs removed Holds precomputed patch lines and unfiltered per-file maps. The filtered diff routes serve filtered data instead.
meta.paths removed Server cache layout. Not used by the client.
meta.storage removed Pack and sequence internals. Not used by the client.
meta.warnings[].path removed when the workspace .gitignore hides the path Path list; same visibility rule as the file routes.
commitHash, parentCheckpointId, rootCheckpointId kept The detail view shows the commit and links the parent.
meta.stats, sourceTaskRunId, timings kept Used by the detail view; no paths.

The checkpoint list route is unchanged; its rows carry no meta.

resolveFileViewVisibility moves from fs.route.ts to permissions.ts so the checkpoint row can use it. No behavior change there.

Evidence

  • Before: the row returns meta.diffs with patch lines to non-full viewers. With the redaction disabled, the row test fails.
  • After: tests/checkpoint-meta-visibility.integration.ts (2 tests, pass). The row test checks the full view is unchanged and the filtered and no-file views drop the patch text, the ignored path and the storage fields. The summary test checks the diff summary payload has paths, status and sizes and never patch lines.

Merge Danger

Door: two-way. The change only removes fields from one response for non-full viewers. The web client does not read them.

Blast Radius: checkpoint detail response for non-full viewers. Owners and full viewers are unchanged.

Independent of #538; #538 will be rebased after this lands.

Relation to #538 and what is not in this PR

The checkpoint row returned meta.diffs to any viewer with checkpoint.view.
The save worker stores per-file patch lines there (inline up to 16 KB per
file, otherwise an object key), so viewers without the full file view could
read patch text for files the workspace .gitignore hides.

For viewers without the full file view, drop meta.diffs, meta.paths and
meta.storage, and drop warnings whose path the workspace .gitignore hides.
Full viewers get the row unchanged. resolveFileViewVisibility moves to
permissions.ts so the checkpoint routes can share it.
@markbang
markbang force-pushed the fix/checkpoint-meta-visibility branch from aceee76 to d710cb6 Compare November 20, 2026 04:12
@markbang markbang changed the title fix(api): hide ignored paths in checkpoint row metadata fix(api): drop diff data from checkpoint row metadata for non-full views Nov 20, 2026
@markbang
markbang changed the base branch from fix/checkpoint-fs-visibility to main November 20, 2026 04:12
@markbang markbang closed this Nov 20, 2026
@markbang markbang reopened this Nov 20, 2026
@markbang
markbang merged commit 467a7f7 into main Nov 20, 2026
4 of 5 checks passed
@markbang
markbang deleted the fix/checkpoint-meta-visibility branch November 20, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant