Skip to content

fix(web): kick refusals reach the caller, and correct a stale comment - #338

Merged
cvince merged 1 commit into
feat/portabilityfrom
claude/web-refusal-kick-connect
Aug 28, 2026
Merged

fix(web): kick refusals reach the caller, and correct a stale comment#338
cvince merged 1 commit into
feat/portabilityfrom
claude/web-refusal-kick-connect

Conversation

@cvince

@cvince cvince commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

kick had no wrapper at all — three refusals ended in console.error + process.exit(1), and its own catch blocks did the same, so nothing could route to displayErrorAndExit. This adds the execute()_execute() wrapper its siblings already have and turns the refusals into coded throws.

refusal code
member not found MEMBER_NOT_FOUND (minted — distinct from PERMISSION_DENIED, which means the caller may not remove members; here there is simply nobody by that address)
list members failed SERVICE_ERROR
remove member failed SERVICE_ERROR

Terminal behaviour is unchanged — displayErrorAndExit still prints to the terminal and still exits 1. What changes is that a --web caller stops getting nothing.

The stale comment is the part worth reading

KickOpts.web claimed:

src/index.ts does not read it for kick yet, so this path is live and tested but not reachable from argv

index.ts has been threading it all along:

await cmd.execute(email, { web: command.optsWithGlobals().web === true })

So every refusal in this file was reachable under --web while a comment said they were not. This is the second such comment tonightorgCommand carried one making the same false claim about its own web path. Both understated real exposure. A comment cannot notice it has gone out of date.

Not included, with reasons

  • connectCommand — line 174 is reachable under --web (browser picker shown, user declines → refusal with no page). But execute returns { linked: boolean } and calls itself recursively, so a wrapper around a Promise<never> handler changes the return contract. Not contained; needs a deliberate decision.
  • editCommand — its guards fall outside its routing try.
  • recoverCommand — no outer routing try at all; 7 exit sites.

Suite: 1849 pass, 0 fail.

kick had no wrapper at all: three refusals ended in console.error +
process.exit(1), and its own catch blocks did the same, so nothing could route
to displayErrorAndExit. Adds the execute() -> _execute() wrapper its siblings
already have, and turns the three refusals into coded throws.

  member not found        MEMBER_NOT_FOUND (minted; distinct from
                          PERMISSION_DENIED, which means the caller may not
                          remove members — here there is simply nobody by that
                          address)
  list members failed     SERVICE_ERROR
  remove member failed    SERVICE_ERROR

Terminal behaviour is unchanged: displayErrorAndExit still prints to the
terminal and still exits 1. What changes is that a --web caller stops getting
nothing.

ALSO CORRECTS A STALE COMMENT, which is the part worth reading. KickOpts.web
claimed:

    `src/index.ts` does not read it for `kick` yet, so this path is live and
    tested but not reachable from argv

index.ts has been threading it all along:

    await cmd.execute(email, { web: command.optsWithGlobals().web === true })

So every refusal in this file was reachable under --web while a comment said
they were not. This is the second such comment found tonight — orgCommand
carried one claiming its own web path was unreachable from argv, and it was
wired too. Both understated real exposure, and a comment cannot notice it has
gone out of date.

Suite: 1849 pass, 0 fail.
@cvince
cvince merged commit e055fea into feat/portability Aug 28, 2026
2 checks passed
@cvince
cvince deleted the claude/web-refusal-kick-connect branch August 28, 2026 20:27
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