Repository navigation
Directory: serve every bundle binding by default and page by content-hash cursor - #260
Merged
randomblocker merged 3 commits intoNov 6, 2026
Conversation
…t-hash keyset
GET /api/dacs/bundles/{jobId} capped a plain request at 50 bindings and
paged by offset, so a reindex between pages could make a page skip a
record. With neither limit nor cursor it now returns every BB-4-valid
binding as { bindings }. limit and cursor are an optional extension: the
cursor is the content hash of the last binding read, paged results are
ordered by that hash (not grouped by signer), a cursor whose key is gone
continues from the next key, and a cursor without limit returns the rest.
Closes #155
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…hashing on the default path The bundles route re-verified every stored binding on each GET and hashed and sorted the whole set even for a plain request, which blocks the event loop on a large job. Every writer into the job's binding set (registration route, reindex, chain scan, well-known crawl) already verifies BB-4 before storing, so the route now serves the stored bindings as they are. A request with neither limit nor cursor is served unhashed and unsorted, in unspecified order; only paged replies are ordered by content hash. OpenAPI, README and SPEC_PIN say so. Tests: a default GET calls neither the signature verifier nor the hash function; each write path refuses a binding with a bad signature, a wrong job or a missing member and does not store it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n read; legacy envelopes served as stored Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
GET /api/dacs/bundles/{jobId}returned at most 50 bindings unless the client paged, which differs from the DACS-1 §6.3.6 contract of serving every BB-4-valid binding. Its offset paging could also skip a record when a reindex happened between pages.With neither
limitnorcursor, the route now returns the plain{ bindings }response with every binding. Paging is an optional extension:cursoris the content hash of the last binding read. Paged order is by binding content hash, not by signer.limitreturns everything after it.The store write path is unchanged. README, OpenAPI and SPEC_PIN describe the new behaviour.
Tests: a default request returns more than 50 bindings; paging across a reindex between pages omits nothing; cursor-only returns the rest; a vanished cursor key continues from the next key. Each failed on the old code. Full directory suite: 1667 pass, 0 fail, 1 skipped; typecheck clean.
Closes #155
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.