Skip to content

feat: implement customer add handler#25

Open
alanshaw wants to merge 3 commits into
mainfrom
ash/feat/customer-add
Open

feat: implement customer add handler#25
alanshaw wants to merge 3 commits into
mainfrom
ash/feat/customer-add

Conversation

@alanshaw

Copy link
Copy Markdown
Member

Implements the /customer/add handler, which allows Hilt to inject customers from fil.one into Sprue.

Depends on:

Copilot AI 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.

Pull request overview

Adds support for the /customer/add UCAN command in Sprue so the service can accept customer records (e.g., from Hilt/fil.one) and persist them via the configured customer store implementation.

Changes:

  • Implement /customer/add handler with subject validation (must target the service DID) and customer-store persistence.
  • Add unit tests covering success, wrong-subject rejection, and duplicate-customer behavior.
  • Wire the new handler into the Fx ucan_handlers group and bump libforge to the required version.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/service/handlers/customer_add.go New /customer/add route handler validating invocation subject and writing to customer.Store.
pkg/service/handlers/customer_add_test.go Tests for handler success, invalid subject failure, and duplicate customer failure.
internal/fx/service/handlers/provider.go Registers NewCustomerAddHandler in the ucan_handlers Fx group.
go.mod Updates github.com/fil-forge/libforge dependency version.
go.sum Adds checksums for the updated libforge version.

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

@alanshaw alanshaw requested review from Peeja, bajtos and frrist June 23, 2026 16:49

@bajtos bajtos 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.

I'd like to resolve the discussion in fil-forge/libforge#40 and fil-forge/hilt#3 before reviewing this one.

@alanshaw alanshaw force-pushed the ash/feat/customer-add branch from 121d680 to 566c8c5 Compare July 1, 2026 16:39
@alanshaw

alanshaw commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@bajtos GTG now?

@bajtos bajtos 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.

:shipit:

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