fix(web): kick refusals reach the caller, and correct a stale comment - #338
Merged
Merged
Conversation
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.
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.
kickhad no wrapper at all — three refusals ended inconsole.error+process.exit(1), and its own catch blocks did the same, so nothing could route todisplayErrorAndExit. This adds theexecute()→_execute()wrapper its siblings already have and turns the refusals into coded throws.MEMBER_NOT_FOUND(minted — distinct fromPERMISSION_DENIED, which means the caller may not remove members; here there is simply nobody by that address)SERVICE_ERRORSERVICE_ERRORTerminal behaviour is unchanged —
displayErrorAndExitstill prints to the terminal and still exits 1. What changes is that a--webcaller stops getting nothing.The stale comment is the part worth reading
KickOpts.webclaimed:index.tshas been threading it all along:So every refusal in this file was reachable under
--webwhile a comment said they were not. This is the second such comment tonight —orgCommandcarried 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). Butexecutereturns{ linked: boolean }and calls itself recursively, so a wrapper around aPromise<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.