feat(bulk): return per-file revisions from /fs/bulk#64
Merged
khaliqgant merged 1 commit intomainfrom Apr 24, 2026
Merged
Conversation
The existing /fs/bulk response only returned {written, errorCount, errors,
correlationId}. Mount clients had to follow every bulk write with N GET /fs/file
requests to learn the new revisions for If-Match. That made the post-migration
total request count N+1 for an N-file batch.
Extend the response with a per-file results array:
{"path":..., "revision":..., "contentType":...}
Purely additive — existing fields unchanged. Mount now uses the inline revision
and skips the ReadFile fallback. The e2e proof TestBulkMigrationReducesHTTPCalls
tightens from "0 POST /fs/file" to "0 total requests on /fs/file".
12eb7d4 to
105b859
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.
Summary
Extend /fs/bulk response with per-file results so mount clients do not need a follow-up GET /fs/file per batched write to learn new revisions.
Why
Workflow 060 migrated the mount daemon from per-file POST /fs/file to POST /fs/bulk. That eliminated per-file WRITES but left per-file GETs for revision read-back, because the /fs/bulk response did not carry per-file revisions. Total request count for an N-file batch was still N+1.
Server already computes per-file revisions in Store.BulkWrite / Store.BulkWriteFork. This PR surfaces them in the HTTP response as an additive results array.
Backward compatibility
Purely additive — existing response fields unchanged. Clients on older SDKs ignore the extra field; the mount code already handles missing results by falling back to ReadFile.
Proof
TestBulkMigrationReducesHTTPCalls now asserts 0 total requests on /fs/file (previously only 0 POST /fs/file, because GET fallbacks were expected). See docs/bulk-per-file-revisions-boundary.md for scope and docs/bulk-per-file-revisions-review.md for the approved review.
Authored by workflows/061-bulk-write-per-file-revisions.ts.