Skip to content

feat: add Hilt S3 commands#44

Merged
alanshaw merged 2 commits into
ash/feat/customer-addfrom
ash/feat/add-hilt-s3-commands
Jul 1, 2026
Merged

feat: add Hilt S3 commands#44
alanshaw merged 2 commits into
ash/feat/customer-addfrom
ash/feat/add-hilt-s3-commands

Conversation

@alanshaw

Copy link
Copy Markdown
Member

Adds the S3 commands as specified in fil-one/RFC#8

A few of the types have some hand-rolled CBOR/JSON encoders/decoders since for some reason cbor-gen (and hence dag-json-gen) do not support slices as map values.

@alanshaw alanshaw force-pushed the ash/feat/add-hilt-s3-commands branch from 7ab4af0 to e316a27 Compare June 29, 2026 14:26
@alanshaw alanshaw changed the base branch from main to ash/feat/customer-add June 29, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces the wire types, command bindings, and (DAG-JSON / DAG-CBOR) codecs for Hilt’s S3 tenant-management UCAN API under /s3/..., including hand-written codecs for slice-valued map types.

Changes:

  • Added shared S3 request / response wire types (s3.Request, s3.VerificationKey, and slice-valued map wrappers).
  • Added /s3/request/authorize and /s3/bucket/{create,delete,info,list} command argument/result types and bindings.
  • Added generated CBOR/JSON codecs plus hand-written codecs (and tests) for slice-valued map wrappers.

Reviewed changes

Copilot reviewed 13 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
commands/s3/types.go Defines shared S3 wire types (request, verification keys, map-wrapper types).
commands/s3/codec.go Hand-written DAG-JSON/DAG-CBOR codecs for slice-valued map wrapper types.
commands/s3/codec_test.go Round-trip tests covering generated + hand-written codecs.
commands/s3/cbor_gen.go Generated CBOR codecs for s3.Request and s3.VerificationKey.
commands/s3/json_gen.go Generated DAG-JSON codecs for s3.Request and s3.VerificationKey.
commands/s3/gen/main.go Codegen driver for commands/s3/*_gen.go.
commands/s3/request/types.go Types for /s3/request/authorize arguments and result.
commands/s3/request/authorize.go Binding for /s3/request/authorize.
commands/s3/request/cbor_gen.go Generated CBOR codecs for request authorize types.
commands/s3/request/json_gen.go Generated DAG-JSON codecs for request authorize types.
commands/s3/request/gen/main.go Codegen driver for commands/s3/request/*_gen.go.
commands/s3/bucket/types.go Types for /s3/bucket/{create,delete,info,list} arguments and results.
commands/s3/bucket/create.go Binding for /s3/bucket/create.
commands/s3/bucket/delete.go Binding for /s3/bucket/delete.
commands/s3/bucket/info.go Binding for /s3/bucket/info.
commands/s3/bucket/list.go Binding for /s3/bucket/list.
commands/s3/bucket/cbor_gen.go Generated CBOR codecs for bucket command types.
commands/s3/bucket/json_gen.go Generated DAG-JSON codecs for bucket command types.
commands/s3/bucket/gen/main.go Codegen driver for commands/s3/bucket/*_gen.go.
Files not reviewed (6)
  • commands/s3/bucket/cbor_gen.go: Generated file
  • commands/s3/bucket/json_gen.go: Generated file
  • commands/s3/cbor_gen.go: Generated file
  • commands/s3/json_gen.go: Generated file
  • commands/s3/request/cbor_gen.go: Generated file
  • commands/s3/request/json_gen.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread commands/s3/types.go
Comment thread commands/s3/gen/main.go
Comment thread commands/s3/request/gen/main.go
Comment thread commands/s3/bucket/gen/main.go
Comment thread commands/s3/codec.go Outdated
@alanshaw alanshaw requested review from Peeja, bajtos, frrist and pyropy June 30, 2026 09:27

@bajtos bajtos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TBH, I am not sure what to review; this seems mostly boilerplate. I don't see any obvious issues, LGTM! :shipit:

@alanshaw alanshaw merged commit 450b888 into ash/feat/customer-add Jul 1, 2026
7 checks passed
@alanshaw alanshaw deleted the ash/feat/add-hilt-s3-commands branch July 1, 2026 16:22
alanshaw added a commit that referenced this pull request Jul 1, 2026
An invocation that Hilt can make to insert a customer directly into the
upload service DB.

Customers added by Hilt are "tenants" that are authenticated, authorized
and billed by fil.one. However they need to be registered in the upload
service to allow spaces to be provisioned and used.

Adds the S3 commands as specified in
fil-one/RFC#8

A few of the types have some hand-rolled CBOR/JSON encoders/decoders
since for some reason `cbor-gen` (and hence `dag-json-gen`) do not
support slices as map values.
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.

3 participants