Skip to content

docs: update Xet spec to V2 reconstruction (v1.1.0)#2262

Closed
XciD wants to merge 1 commit intomainfrom
feat/xet-spec-v2-reconstruction
Closed

docs: update Xet spec to V2 reconstruction (v1.1.0)#2262
XciD wants to merge 1 commit intomainfrom
feat/xet-spec-v2-reconstruction

Conversation

@XciD
Copy link
Member

@XciD XciD commented Mar 3, 2026

Summary

  • Replace V1 reconstruction endpoint with V2 (/v2/reconstructions/{file_id}) as the primary documented endpoint
  • Document multi-range fetching with XorbMultiRangeFetch and XorbRangeDescriptor types
  • Add Accept-Encoding header documentation (gzip + zstd supported)
  • Rewrite download protocol with V2 response format, examples, and pseudocode
  • Bump spec version from 1.0.0 to 1.1.0

Related


Note

Medium Risk
Doc-only change but it updates the documented reconstruction endpoint and response shape (from fetch_info to xorbs) and introduces stricter multi-range Range header requirements; incorrect docs could break downstream client implementations.

Overview
Updates the Xet protocol docs to treat GET /v2/reconstructions/{file_id} as the primary reconstruction endpoint, including support for compressed JSON responses via Accept-Encoding (gzip/zstd).

Replaces the documented reconstruction response from per-term fetch_info to a xorbs map that provides signed multi-range fetch instructions, and rewrites the download protocol (examples, pseudocode, and sequence diagram) to download xorb ranges via a single multipart Range request per xorb fetch entry. The spec version is bumped from 1.0.0 to 1.1.0.

Written by Cursor Bugbot for commit 7c001e6. This will update automatically on new commits. Configure here.

- Replace V1 reconstruction with V2 as the primary endpoint
- Document /v2/reconstructions/{file_id} with multi-range fetching
- Add Accept-Encoding (gzip, zstd) header documentation
- Rewrite download protocol with V2 response format and examples
- Bump spec version to 1.1.0
@XciD XciD marked this pull request as ready for review March 3, 2026 09:26
@XciD XciD requested review from assafvayner and rajatarya March 3, 2026 09:26
@XciD XciD changed the title Update Xet spec to V2 reconstruction (v1.1.0) docs: update Xet spec to V2 reconstruction (v1.1.0) Mar 3, 2026
Copy link
Contributor

@rajatarya rajatarya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes seem reasonable, but not sure if we should keep older docs and mark as deprecated as well. I think the examples should be complete - right now they are partial/pseudocode.

},
...
"url": "https://transfer.xethub.hf.co/xorb/default/a1b2c3d4...?<signed-params>",
"ranges": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example should be complete - meaning the ... should be removed and the need to be spelled out for the example.

"start": 57980,
"end": 1433008
}
"url": "https://transfer.xethub.hf.co/xorb/default/a1b2c3d4...?<signed-params>",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example should be complete, readers/agents need to have something to confirm their client implementations against.


- **Description**: Retrieves reconstruction information for a specific file, includes byte range support when `Range` header is set.
- **Path**: `/v1/reconstructions/{file_id}`
- **Description**: Retrieves reconstruction information for a specific file. Returns URLs optimized for multi-range fetching: multiple byte ranges for the same xorb are combined into a single URL. Supports byte range via the optional `Range` header.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to keep the existing docs for backwards compatibility (marked as deprecated maybe?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was wondering the same. wdyt @assafvayner ? no strong opinion on my side

@rajatarya
Copy link
Contributor

@XciD : Can we close this for now?

@XciD XciD closed this Mar 11, 2026
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.

2 participants