feat(sell): register by default with explicit opt-out#349
Open
bussyjd wants to merge 4 commits intofeat/x402-pre-merge-followupfrom
Open
feat(sell): register by default with explicit opt-out#349bussyjd wants to merge 4 commits intofeat/x402-pre-merge-followupfrom
bussyjd wants to merge 4 commits intofeat/x402-pre-merge-followupfrom
Conversation
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.
Summary
Replaces the warning-only UX with the actual stronger design:
obol sell httpnow registers by default--no-registeris the explicit opt-outOffChainOnlyas "registered and ready"Why
The previous UX was not coherent:
obol sell http --registercould still mean "only publish an off-chain document"Registered=True / OffChainOnlylooked like success even when nothing was on-chainsell httpandsell registeras two unrelated commandsThat is the wrong model.
The product model should be:
Flow
Old behavior
flowchart TD A[obol sell http --register] --> B[Create ServiceOffer] B --> C[Controller publishes off-chain registration doc] C --> D{Controller signing key configured?} D -- yes --> E[Register on ERC-8004] D -- no --> F[Registered=True / OffChainOnly]New behavior
flowchart TD A[obol sell http] --> B[Create ServiceOffer] B --> C[Ensure public route is live] C --> D{--no-register?} D -- yes --> E[Skip on-chain registration intentionally] D -- no --> F[Resolve signer] F --> G[Register on ERC-8004] G --> H[Controller observes on-chain registration] H --> I[Registered=True]Seller UX
sequenceDiagram participant User participant CLI as obol sell http participant Ctrl as serviceoffer-controller participant Chain as ERC-8004 User->>CLI: sell http ... CLI->>Ctrl: create ServiceOffer CLI->>CLI: ensure tunnel / route CLI->>CLI: resolve signer CLI->>Chain: register agent + metadata Ctrl->>Chain: recover registration by owner + URI Ctrl-->>User: Ready with Registered=TrueWhat changed
CLI
sell httpnow enables registration by default--no-registerto skip the automatic on-chain registration step--registeronly as a compatibility no-op / deprecated path--private-key-filetosell httpfor explicit registration signer inputsell registersell status <name>now prints a human summary includingAgent IDandRegistration TxController semantics
OffChainOnlyis no longer considered readyTests / flows
--no-registerconflictssell statussummary outputflow-06to use--no-registerwhere registration is intentionally out of scopeflow-11to use the unified flow instead of a separatesell registerstepDocs
--registerflowmonetize.pyhelp text to mark--registeras legacy metadata publishingValidation
go test ./cmd/obol ./internal/serviceoffercontroller ./internal/x402bash -n flows/flow-06-sell-setup.sh flows/flow-11-dual-stack.shflow-11rerun from clean Obol/k3d state: 41/41 passedFlow-11 artifacts from the passing run
0xC0De030F6C37f490594F93fB99e2756703c4297E5008https://eliminate-counting-bonus-skating.trycloudflare.com0x9aE40E84fb587fB3B526f5542934c3B2d18D67bF0xca98062273d612c700dd036aa2bd68c252f1c71e5da6d2bc469e589a98cc5031User-visible contract
From this PR onward, the intended contract is:
obol sell http ...means sell and registerobol sell http ... --no-registermeans sell without on-chain registration on purposeobol sell registerremains the advanced/manual repair path, not the normal primary flow