Skip to content

fix(cli): show command help with malformed config - #333

Merged
vincentkoc merged 2 commits into
mainfrom
fix/preserve-help-config-precedence
Nov 20, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/preserve-help-config-precedence

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

After cloud-mode routing was added, command help failed whenever an existing config file contained malformed TOML. For example, slacrawl --config broken.toml sync --help reported a config parse error instead of showing usage.

User Impact

People can read command help while repairing a broken config. Commands that need configuration still report their own validation errors, and valid cloud configs still reject unsupported local commands before side effects.

Why This Change Was Made

Keep the early refusal for successfully loaded cloud configuration, but leave config-load errors to each command after its flag parser runs. This restores the existing help and argument precedence without scanning arguments for help-like values. A regression test verifies that cloud-mode init, sync, publish, and users neither rewrite config nor create a local archive. The SDK upgrade check also now expects the new explicit local-mode defaults while preserving its historical v0.10.6 input and exact comparison of the saved configuration.

Evidence

  • The existing command-help and publish-help regression tests failed on the unchanged base with TOML parse errors.
  • Those tests now pass, including help after complete options and the flag-value/end-of-options boundary checks.
  • Full CLI package and scoped vet passed with CGO disabled on macOS.
  • The SDK upgrade test also reproduced a baseline mismatch from the new remote defaults; its corrected expectation, full Slack API package, and scoped vet pass.
  • Independent P0–P3 review of the complete updated candidate: scoped-clean.
  • Full hosted CI passed, including native macOS tests, Linux race tests, lint, dependencies, and snapshot packaging. Docker, CodeQL, and secret scanning passed. Local native/race execution was unavailable because the Xcode license is unaccepted.

@clawsweeper

clawsweeper Bot commented Nov 20, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 20, 2026 10:07
@vincentkoc
vincentkoc merged commit e68a5d5 into main Nov 20, 2026
22 of 24 checks passed
@vincentkoc
vincentkoc deleted the fix/preserve-help-config-precedence branch November 20, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant