Repository navigation
fix(api): drop diff data from checkpoint row metadata for non-full views - #539
Merged
Merged
Conversation
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
force-pushed
the
fix/checkpoint-meta-visibility
branch
from
November 20, 2026 04:12
aceee76 to
d710cb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) returnedmeta.diffsto any viewer withcheckpoint.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:
meta.diffsmeta.pathsmeta.storagemeta.warnings[].path.gitignorehides the pathcommitHash,parentCheckpointId,rootCheckpointIdmeta.stats,sourceTaskRunId,timingsThe checkpoint list route is unchanged; its rows carry no
meta.resolveFileViewVisibilitymoves fromfs.route.tstopermissions.tsso the checkpoint row can use it. No behavior change there.Evidence
meta.diffswith patch lines to non-full viewers. With the redaction disabled, the row test fails.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
GET /checkpoints/:id) only. It includes the shared pieces it needs (resolveFileViewVisibilitymoved topermissions.ts,createCheckpointVisibilityFilter,resolveCheckpointFsVisibility) with the same names and bodies as fix(api): apply the guest file view to checkpoint file routes #538, so fix(api): apply the guest file view to checkpoint file routes #538 rebases onto it with identical hunks; the remaining conflicts are the test list inapps/api/package.jsonand import/signature lines incheckpoint-fs.tsandspaces.route.ts..gitignorefiltering for checkpoint file reads, including old snapshots committed before a rule existed (fs/tree,fs/file), and filtering offs/diff/fs/diff/file, which still return paths and patch text for hidden files until fix(api): apply the guest file view to checkpoint file routes #538 lands.