Repository navigation
fix(cli): drop --remote-config from auth and skip reading it for unsupported commands - #4957
Merged
thymikee merged 1 commit intoNov 22, 2026
Conversation
…pported commands auth stopped running on remote connections in callstack#4879 and already stripped every remote-config profile field in finalizeParsedArgs, making it the only session-less command still listing remoteConfig. Drop remoteConfig from auth.supportedFlags so every session-less command rejects it, and guard resolveCliOptions so --remote-config files are not read before unsupported-flag validation rejects the command. Closes callstack#4887
Member
|
Thanks for the fix. At 0199729 the change looks ready to merge, and the code review found no problems. Not blocking: the 'auth rejects --remote-config' assertion now appears in five test files, and the cases in auth.test.ts and cli-leased-session.test.ts both reach INVALID_ARGS through the CLI entry, so one of those two loops could go, or both can stay. The only checks that did not pass are two cancelled 'Body rules' runs, which look like the PR body workflow cancelling an earlier run after an edit or push, and a re-run should clear them. No conflicts are known. Not verified here: test and script runs, because the behavior was traced by reading the code. |
thymikee
added a commit
that referenced
this pull request
Nov 22, 2026
* origin/main: fix(auth): send a stored CLI session only to the cloud that issued it (#4921) refactor(reasons): declare the daemon reasons in ReasonTable rows (#4936) fix(cli): drop --remote-config from auth and skip reading it for unsupported commands (#4957) refactor(snapshot): deduplicate system-surface projections and warnings (#4959) fix(find): enforce offscreen and non-hittable guarantees on focus (#4954) feat(auth): store a rotated CLI session credential and show the login code (#4833) fix(daemon): report Windows SIGTERM daemon exits as forced (#4659) # Conflicts: # packages/capture-kit/src/snapshot-quality-verdict.ts # packages/command-runtime/src/commands/interaction/runtime/target-visibility-stages.ts # packages/contracts/src/device-inventory.ts # packages/daemon/src/execution/interaction/internal/__tests__/find.test.ts # packages/daemon/src/execution/interaction/internal/find-target-capture.ts # packages/replay-port/src/daemon-port/session-replay-runtime-failure-response.ts # website/docs/docs/error-reasons.md
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.
Summary
Implements option (a) from #4887: drop
remoteConfigfromauthso every session-less command rejects--remote-config, and skip reading--remote-configfiles before flag validation rejects unsupported commands. Closes #4887.remoteConfigfromauth.supportedFlagsinpackages/command-surface/src/schema/command-overrides.ts(authwas the only command withsession: falseandremoteConfig: true).shouldApplyRemoteConfigDefaultsinsrc/cli/resolve-cli-options.tswithisFlagSupportedForCommand('remoteConfig', command)so unsupported commands reject--remote-configwithout reading the file.help auth.Before / after
Built CLI, fresh state directory:
auth status --remote-config ok.json: before succeeded and ignored the profile; after exits 1 withINVALID_ARGS(Flag --remote-config is not supported for command auth.).auth status --remote-config bad.json/missing.jsonandweb doctor --remote-config missing.json: before failed with JSON or file-not-found errors; after reject--remote-configas unsupported without reading the file.Validation
019972943:pnpm check:affected --runpassed (exactCommit=true:format,lint,typecheck,layering,fallow,build,vitest-related, fullunit), pluseager-closure-budgets(919/919),check:command-docs,check:doc-prose, andcheck:doc-links.Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved.
Created with Claude Opus 5.5 and Gemini 4 Neon in T3 Code.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.