Skip to content

fix(cli): drop --remote-config from auth and skip reading it for unsupported commands - #4957

Merged
thymikee merged 1 commit into
callstack:mainfrom
samanyudas:fix/4887-drop-auth-remote-config
Nov 22, 2026
Merged

thymikee merged 1 commit into
callstack:mainfrom
samanyudas:fix/4887-drop-auth-remote-config

Conversation

@samanyudas

@samanyudas samanyudas commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements option (a) from #4887: drop remoteConfig from auth so every session-less command rejects --remote-config, and skip reading --remote-config files before flag validation rejects unsupported commands. Closes #4887.

  • Remove remoteConfig from auth.supportedFlags in packages/command-surface/src/schema/command-overrides.ts (auth was the only command with session: false and remoteConfig: true).
  • Guard shouldApplyRemoteConfigDefaults in src/cli/resolve-cli-options.ts with isFlagSupportedForCommand('remoteConfig', command) so unsupported commands reject --remote-config without reading the file.
  • Update and add parser, resolver, CLI, and leased-session tests covering valid, invalid-JSON, and missing profiles plus help auth.

Before / after

Built CLI, fresh state directory:

  • auth status --remote-config ok.json: before succeeded and ignored the profile; after exits 1 with INVALID_ARGS (Flag --remote-config is not supported for command auth.).
  • auth status --remote-config bad.json / missing.json and web doctor --remote-config missing.json: before failed with JSON or file-not-found errors; after reject --remote-config as unsupported without reading the file.

Validation

  • Head 019972943: pnpm check:affected --run passed (exactCommit=true: format, lint, typecheck, layering, fallow, build, vitest-related, full unit), plus eager-closure-budgets (919/919), check:command-docs, check:doc-prose, and check:doc-links.
  • Controlled revert failed all 5 regression test files.
  • Independent Claude Opus 5.5 verification passed.

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.


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

…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
@thymikee

Copy link
Copy Markdown
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 thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit 52f7c6f into callstack:main Nov 22, 2026
15 of 17 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auth: --remote-config is read but ignored since #4879

2 participants