Skip to content

feat(client): publish a batch of revocations in one request - #22

Open
pyropy wants to merge 1 commit into
mainfrom
srdjan/feat/publish-batch
Open

pyropy wants to merge 1 commit into
mainfrom
srdjan/feat/publish-batch

Conversation

@pyropy

@pyropy pyropy commented Sep 22, 2026

Copy link
Copy Markdown

Summary

RFC 30 (fil-one/RFC#30) has Hilt rotate a principal-bound key's delegations on every policy change and send every revocation produced by one write to Swarf in a single request, so a write waits on one round trip however many keys it touches. The client gains PublishBatch, which builds one self-signed /ucan/revoke invocation per revoked delegation and sends them in one container through ucantone's ExecuteBatch. Every receipt is checked; the first refused one fails the call. The service needs no change: a ucantone server already executes every invocation in a request container.

Change log

  • pkg/client: PublishBatch(ctx, revoker, revoked []ucan.Delegation); the executor is the ucantone HTTP client so both Execute and ExecuteBatch are available.
  • go.mod: ucantone bumped to b59f1d1fcbb6 for execution/batch.
  • Tests: TestPublishBatch (one request for two delegations, an empty batch publishes nothing, a refused revocation fails the call).

🤖 Generated with Claude Code

Hilt rotates a principal-bound key's delegations on every policy change
and needs every revocation of one write sent together, so that the write
waits on one round trip regardless of how many keys it touches.
PublishBatch builds one self-signed /ucan/revoke invocation per revoked
delegation and sends them in a single container through ucantone's
ExecuteBatch, failing on the first refused receipt. ucantone is bumped to
the version that exposes batch execution.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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