Skip to content

fix(cli): require explicit init for guidance - #343

Open
neusse wants to merge 1 commit into
mixelpixx:mainfrom
neusse:codex/fix-nonmutating-mcp-startup
Open

fix(cli): require explicit init for guidance#343
neusse wants to merge 1 commit into
mixelpixx:mainfrom
neusse:codex/fix-nonmutating-mcp-startup

Conversation

@neusse

@neusse neusse commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the silent guidance installer from normal piped MCP startup
  • keep --client accepted and validated for command compatibility
  • document that guidance installation requires an explicit konnect init
  • regression-test clean-home and install/uninstall/start sequences for both Claude and Codex with the real CLI process

Closes #242.

Root cause and design

Server startup treated an absent .installed-{client} marker as a first launch and called the silent installer. uninstall deliberately removes that same marker, so the next MCP launch could not distinguish an explicit uninstall from a new installation and recreated the guidance.

This selects the simpler policy approved in #242: server startup performs no guidance installation at all. Installation remains available only through the explicit konnect init [--client ...] command. No tombstone or new persistent state is needed.

Compatibility and migration

  • --client claude and --client codex remain valid server arguments.
  • Existing explicit init, status, and uninstall behavior is unchanged.
  • TTY/double-click setup behavior is unchanged.
  • A fresh MCP registration no longer installs guidance implicitly; users who want bundled guidance run konnect init once.

Tests

  • cargo test --workspace --locked --lib --tests
  • cargo test --workspace --locked --doc
  • cargo clippy --workspace --locked --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • python -m unittest discover -s plugin/tests -v (KiCad 10 bundled Python)

The real-process home-directory regression runs on Linux and macOS. It is intentionally excluded on Windows because dirs::home_dir() uses SHGetKnownFolderPath there and ignores HOME/USERPROFILE; attempting to redirect it would risk the runner's real client configuration. The normal Windows unit/integration suite remains green. Live-KiCad tests retain their repository-defined ignored status.

Risk and rollback

Risk is limited to removing an implicit side effect. Rollback is the single commit, but would restore the destructive post-uninstall behavior. No file format, IPC protocol, packaging, schema, or configuration-key changes are involved.

@neusse
neusse force-pushed the codex/fix-nonmutating-mcp-startup branch from b09329b to f3b4eb6 Compare August 26, 2026 20:13
@neusse
neusse marked this pull request as ready for review August 26, 2026 20:36
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.

[BUG] MCP startup silently reinstalls guidance after uninstall

1 participant