Skip to content

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

Draft
DealAppSeo wants to merge 1 commit into
mainfrom
claude/r2b-owner-budget-comments-v2
Draft

DealAppSeo wants to merge 1 commit into
mainfrom
claude/r2b-owner-budget-comments-v2

Conversation

@DealAppSeo

Copy link
Copy Markdown
Owner

Owner action

None needed from you (LOW: comments only, no behaviour change). This replaces #1565, which conflicted with main once #1557 squash-merged; the guard blocks merging main into a branch, so the same commit was cherry-picked onto main instead (identical diff). Under D-161, Claude merges it once Claude, Grok, Strix and all CI pass on one SHA; none has run yet.

What this is

Three comments on #1557's code said the wrong thing (independent review of #1557). #1557 is now merged as dc23512c; these comments still read as below on main.

  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

'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>
@DealAppSeo DealAppSeo added the grok-review Ask the grok-review loop to review this PR (also drafts) label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

grok-review Ask the grok-review loop to review this PR (also drafts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant