Skip to content

docs(owner-budget): correct three comments on #1557's code (stacked on #1557) - #1565

Closed
DealAppSeo wants to merge 2 commits into
mainfrom
claude/r2b-owner-budget-comments
Closed

DealAppSeo wants to merge 2 commits into
mainfrom
claude/r2b-owner-budget-comments

Conversation

@DealAppSeo

Copy link
Copy Markdown
Owner

Owner action

Claude merges after you merge #1557 (LOW: comments only, no behaviour change). This PR is stacked on #1557 (base claude/r2-human-sbt-owner-budget). When #1557 squash-merges, retarget this PR with gh pr edit <this> --base main and rebase it. Under D-161, a LOW change still needs Claude, Grok, Strix and CI on one SHA before it auto-merges; none has run yet. No decision is needed from you.

What this is

Three comments on #1557's code said the wrong thing (independent review of #1557). They are fixed here so #1557's reviewed head (58fde210) stays fixed for tonight's packet.

  1. src/services/owner-budget.ts (ownerBuilderOfAgent doc). It said an account "is only created for a wallet that signed (POST /account/connect)". That is false: POST /builder/register inserts one behind an API key, with no signature from the wallet [V src/routes/v1.ts /builder/register → registerBuilder inserts into builders]. The comment now says an account is not proof of consent: what funds the budget is the stake, and two accounts for one wallet are refused as ambiguous [V, the rows.length > 1 throw in the same function].
  2. src/routes/agent-spend.ts (loadOwnerBuilder doc). It said "null if not a builder". A verified human owner now has a funding account when HUMAN_SBT_OWNER_BUDGET_ENABLED=true, so it says "null if there is none" and names both cases.
  3. scripts/e2e/owner-budget-testnet.ts (step 3 comment). It said step 3b answers no_owner_budget. Step 3b (spend limits) runs only in stake mode; in wallet mode step R answers it [V: if (fromStake) around 3b; no_owner_budget is answered by both the spend-limit route and the spend dry run in routes/agent-spend.ts].

Comments only: the diff touches no executable line.

🤖 Generated with Claude Code

DealAppSeo and others added 2 commits November 15, 2026 19:52
…r budget (flag off)

The first live owner-budget run stopped at bind: the owner's wallet holds a proof-of-human SBT, so it
bound as human_sbt, and ownerBuilderOfAgent returned null for every human_sbt owner. The budget is
keyed by builder account, and the run had just created one for the same wallet.

With HUMAN_SBT_OWNER_BUDGET_ENABLED=true (default off), a human_sbt owner's budget is the stake of
the account that holds the binding's wallet. That wallet came from human_sbt_registry at bind, and an
account exists only for a wallet that signed /account/connect. Two accounts matching the wallet is
refused (ambiguous), a failed read is an error, a malformed wallet runs no query. The binding is
unchanged, so the assurance label stays proof-of-human. Every money route (stake spend, spend limit,
wallet-mode budget) already resolves the owner through this one function.

The E2E script now continues past a human_sbt bind; step 3b answers no_owner_budget where the flag
is off, before any USDC moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
's code (review of #1557)

- owner-budget.ts: an account is not proof the wallet signed. POST /builder/register makes one behind
  an API key with no signature, so "only created for a wallet that signed" was false.
- routes/agent-spend.ts: loadOwnerBuilder is null when there is no funding account, not "if not a
  builder"; a human_sbt owner has one with HUMAN_SBT_OWNER_BUDGET_ENABLED=true.
- e2e owner-budget-testnet.ts: no_owner_budget surfaces at step 3b only in stake mode; in wallet mode
  3b does not run and step R answers it.

Comments only; no behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from claude/r2-human-sbt-owner-budget to main November 16, 2026 16:45
@DealAppSeo

Copy link
Copy Markdown
Owner Author

Superseded by #1567. #1557 squash-merged, so this branch conflicted with main, and the guard blocks merging main into a branch. #1567 is the same commit cherry-picked onto main (identical diff, head 684d934). The branch is kept; reopen this if you'd rather keep it here.

🤖 Addressed by Claude Code

@DealAppSeo DealAppSeo closed this Nov 16, 2026
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