Skip to content

fix(config): actionable first-run errors and a shareable workspace config - #119

Merged
lg2m merged 3 commits into
mainfrom
fix/eng-859-first-run-config-ux
Sep 22, 2026
Merged

lg2m merged 3 commits into
mainfrom
fix/eng-859-first-run-config-ux

Conversation

@lg2m

@lg2m lg2m commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: ENG-859

What changes for users

Before: a fresh clone (or any directory with no global config) exits with error: model must be configured, and every clone of this repo failed with credential `executor/lg2m` is not registered because the tracked .qq/config.ron referenced one developer's credential store.

After:

error: no model is configured. Choose one with any of:
  --model PROVIDER/MODEL on the command line
  QQ_MODEL=PROVIDER/MODEL in the environment
  model: "PROVIDER/MODEL" in /home/you/.config/qq/config.ron (every project) or .qq/config.ron (this project)
For example openai/gpt-5.6; then authenticate with `qq auth login openai` or set OPENAI_API_KEY.

and the shared .qq/config.ron keeps only shareable settings: the policy grants and the default model. The personal executor MCP server, the bedrock/bedrock-mantle/litellm providers with Stored(...) credentials, and the openai-codex reviewer_model moved to the gitignored .qq/config.d/*-local.ron. A fresh clone now passes qq trust && qq config check with no global config and no credentials; the first qq ask needs only an xAI key (or --model/QQ_MODEL for another built-in provider).

Design

  • ConfigError::ModelRequired gains a global_config: PathBuf field so the message names this machine's actual path; the loader passes paths.global_dir/config.ron into MergeState::finish. One Display impl covers the TUI, ask, run, and config show entrypoints.
  • ConfigLoader::check still treats ModelRequired { .. } as "valid apart from the selection" (headless contract unchanged).
  • Anything referencing a Stored(...) credential is per-developer by construction and belongs in the gitignored .qq/config.d/*-local.ron; a comment in the shared file says so. Built-in providers need no declaration.

Verification

  • New missing_model_error_names_every_way_to_set_one pins the variant payload and every hint in the message.
  • cargo fmt --check, cargo clippy --workspace --all-targets --all-features -D warnings, cargo test --workspace pass. (headless::tests::hard_cost_budget_cancels_an_unmetered_looping_child flaked once, passes on rerun and on unmodified main.)
  • Manual: qq ask hi with XDG_CONFIG_HOME pointed at an empty dir prints the message above. A copy of the tracked .qq/ with no config.d/ and no global config passes qq trust && qq config check (model: xai/grok-4.6).

Impact

Error-path only; no hot-path change. No wire or schema changes.

Stack

  1. This PR — ENG-859
  2. #TBD — ENG-860 open the TUI without a configured model
  3. #TBD — ENG-861 degrade an MCP server with an unregistered credential

…rkspace config

The executor declaration used bearer: Stored("executor/lg2m"), a name that
only resolves in one developer's credential store. Every other clone failed
its first run with "credential `executor/lg2m` is not registered".
Personal Stored(...) MCP servers belong in the gitignored
.qq/config.d/*-local.ron fragment; the shared config now says so.
Running qq with no model used to exit with the bare "model must be
configured". ModelRequired now carries this machine's global config path
and its message lists every way to choose a model (--model, QQ_MODEL, the
global config.ron, .qq/config.ron), an example route, and how to
authenticate. ConfigLoader::check still treats it as "valid apart from the
selection". The README quick start states the two first-run requirements.
The tracked .qq/config.ron also declared bedrock, bedrock-mantle, and a
litellm gateway with Stored(...) credentials plus a reviewer_model on
openai-codex, all of which resolve only against one developer's credential
store. A fresh clone now carries just the policy grants and the default
model; built-in providers need no declaration, and personal providers,
reviewer/worker models, and MCP servers live in the gitignored
.qq/config.d/*-local.ron fragment.
@lg2m lg2m changed the title fix(config): actionable first-run errors for a missing model and a personal MCP credential fix(config): actionable first-run errors and a shareable workspace config Sep 22, 2026
@lg2m
lg2m merged commit ef57760 into main Sep 22, 2026
4 checks passed
@lg2m
lg2m deleted the fix/eng-859-first-run-config-ux branch September 22, 2026 04:21
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.

1 participant