Repository navigation
Conversation
Hilt revokes dozens of delegations in one bucket policy write and today sends one `/ucan/revoke` invocation per delegation. Swarf verifies and stores each invocation separately, and that time counts against Hilt's write deadline. `/ucan/revoke/batch` carries a list of revocations, each with the same `revoke` and optional `path` as `/ucan/revoke`, so the service can verify the whole list and store it with one write. The service rejects the batch when any revocation in it is invalid. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The change cleanly adds and wires a new batch revoke command with corresponding generated DAG-JSON/CBOR codecs and a round-trip wire-shape test, and the review notes no outstanding issues requiring further investigation.
No open issues 🎉
2 files not reviewed
commands/ucan/cbor_gen.go: Generated filecommands/ucan/json_gen.go: Generated file
What changed in this PR
Adds a new UCAN command, /ucan/revoke/batch, enabling multiple delegations to be revoked in a single invocation so downstream services can validate and persist the revocations as one unit (reducing per-revocation overhead vs repeated /ucan/revoke calls).
Changes:
- Introduces
RevokeBatchArgumentsto carry a list ofRevokeArgumentsrevocations. - Registers/binds the new
/ucan/revoke/batchcommand alongside existing/ucan/revoke. - Extends generated DAG-JSON and CBOR codecs for
RevokeBatchArguments, plus a codec test pinning the DAG-JSON wire shape for a mixed batch.
This pull request requires changes.
| File | Summary |
|---|---|
commands/ucan/types.go |
Adds the RevokeBatchArguments wire type (batch of RevokeArguments). |
commands/ucan/revoke.go |
Binds/registers the new /ucan/revoke/batch command. |
commands/ucan/json_gen.go |
Adds generated DAG-JSON codec support for RevokeBatchArguments; fix needed where a value-range loop calls RevokeArguments.MarshalDagJSON (pointer receiver) on a non-addressable range variable—iterate by index or take addresses. |
commands/ucan/gen/main.go |
Registers RevokeBatchArguments for codec generation. |
commands/ucan/codec_test.go |
Adds a test pinning the DAG-JSON shape and round-tripping codecs for a mixed (direct + witness-path) batch. |
commands/ucan/cbor_gen.go |
Adds generated CBOR codec support for RevokeBatchArguments; fix needed where a value-range loop calls RevokeArguments.MarshalCBOR (pointer receiver) on a non-addressable range variable—iterate by index or take addresses. |
Review effort: Balanced
|
Closing in favour of fil-forge/ucantone#76 |
Written by Claude.
Add
/ucan/revoke/batch, which revokes several delegations with one invocation.Hilt revokes every delegation a bucket policy write replaces, inside an 8 s deadline. It sends one
/ucan/revokeinvocation per delegation today, and Swarf verifies and stores each one separately; on staging, 1,239 revocations took 10.05 s and the write failed. With one invocation per batch, Swarf can verify the whole list and store it with a single statement.What changes
RevokeBatchArgumentsholds a list ofRevokeArguments, so each entry has the samerevokeand optionalpathas/ucan/revoke, and a witness-path revocation can be batched too./ucan/revokestays as the UCAN revocation spec defines it. The service rejects the batch when any revocation in it is invalid.A codec test pins the DAG-JSON shape of a batch holding a direct revocation and a witness-path one.
Rollout
This is the first of four PRs. The others pin this branch's commit and re-pin to
mainonce this merges: