Skip to content

feat(cli): add inference set-owner - #139

Merged
flyworker merged 1 commit into
mainfrom
feat/inference-set-owner
Sep 7, 2026
Merged

flyworker merged 1 commit into
mainfrom
feat/inference-set-owner

Conversation

@flyworker

Copy link
Copy Markdown
Member

Closes the second half of #134. Part 1 (showing both addresses in inference status) shipped in #135.

Why this is not blocked after all

#134 recorded set-owner as blocked, on the grounds that the platform refuses a
provider-initiated owner-address change. That is true of a change, but the
rule only rejects a write when an owner address is already stored — an empty one
is accepted. Providers whose owner address was never set therefore have a
working path today, and this node is one of them (inference status reports
Owner: not set).

So the command is useful now, and correct later: if the platform ever allows a
change, only the already-set branch needs revisiting.

Shape

Matches set-beneficiary — same endpoint, same key, same read-back on success —
with two differences that come from the write being one-way:

  • Reads the current value first. If an owner is already stored, the command
    explains that and stops instead of sending a call the platform will refuse;
    if the stored value already equals the argument, it says so and exits 0.
  • Confirms before writing, because the write cannot be undone. --yes
    skips the prompt for scripts. set-beneficiary has no such prompt and should
    not — running it again corrects a mistake, and this cannot.

Validation

Address checking moves into a shared validateEthAddress, used by both
commands, and now rejects non-hex characters. The previous prefix-and-length
check accepted 0x…93z: a transposed character landing on a letter would have
passed validation and been written to a field with no correction path.

Verified against the live platform

  • malformed address rejected before any network call
  • reaches the platform, reads Owner: not set, and prompts
  • declining leaves everything unchanged

I did not complete a real write: setting an owner address on the production node
is irreversible and is not mine to choose. The already-set branch is likewise
unexercised for the same reason — it is covered by reading the stored value, not
by provoking a server-side refusal.

`set-beneficiary` had no counterpart for the owner address, so an operator
whose owner address was never set had no CLI path to write one.

The platform accepts an owner address only while it is empty and refuses any
later change. Two consequences shape the command:

- It reads the current value first. If an owner is already stored, it explains
  that and stops rather than sending a call that will be refused; if the stored
  value already equals the argument, it says so and exits cleanly.
- It confirms before writing, since the write cannot be undone. `--yes` skips
  the prompt for scripts. set-beneficiary needs no confirmation because running
  it again corrects a mistake.

Address validation moves into a shared validateEthAddress and now rejects
non-hex characters, which the previous prefix-and-length check accepted — a
transposed character landing on a letter would otherwise have been written to a
field that cannot be corrected.

On success it reads the stored value back rather than echoing the argument, as
set-beneficiary does.
@flyworker
flyworker merged commit 6596fa8 into main Sep 7, 2026
1 check passed
@flyworker
flyworker deleted the feat/inference-set-owner branch September 7, 2026 05:17
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