Skip to content

refactor(host): move runtime composition from the binary into qq-host - #431

Merged
lg2m merged 2 commits into
docs/desktop-mobile-fleet-planfrom
refactor/qq-host-composition
Oct 25, 2026
Merged

lg2m merged 2 commits into
docs/desktop-mobile-fleet-planfrom
refactor/qq-host-composition

Conversation

@lg2m

@lg2m lg2m commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #418. This is task 1 of P1 in the plan: move composition from src/ into qq-host (ADR-0050).

What changed

  • crates/qq-harness is renamed to crates/qq-host. It now contains everything that turns configuration and credentials into a running runtime:
    • RuntimeFactory: the RuntimeLoader, workspace grant authority and trust.
    • RuntimeHandler: the ServerHandler.
    • ModelApprovalReviewer and RuntimeBuildError.
    • Authenticated model discovery (catalog), built-in provider credential policy (builtin_auth, ADR-0064) and the command-worker client.
    • The plan cache and MCP bridge that were already there.
  • The binary passes in its identity as qq_host::HostBuild { source_revision, version }, so the library doesn't read build-script environment variables. cli::HOST_BUILD is the one place this is built.
  • src/ now holds only argv parsing, TUI and server wiring, the headless driver, doctor, init and output. The src/mcp.rs and src/plan.rs re-export shims are deleted, and the root package drops its direct hmac and qq-mcp dependencies.
  • Feature wiring: qq-host forwards provider-bedrock, and the root provider-bedrock feature enables it. --no-default-features still leaves out the AWS SDK.
  • Test-only constructors the binary's tests use (RuntimeHandler::open, open_with, RuntimeFactory::configured_model_options) are behind a qq-host/test-support feature. Only the root crate's dev-dependencies enable it.

Behaviour doesn't change. The moved code is the same apart from paths, visibility, and threading the build identity through.

Follow-on edits

  • crates/qq-core/build.rs hashes the moved runtime.rs into the process-policy digest at its new path.
  • Legacy test-sleep baseline entries now point at the new paths. The count is unchanged at 69/69.
  • docs_truth checks a module that still lives in src/.
  • Updated docs: AGENTS.md repo map, architecture.md (layout, dependency graph, extension-owner table), providers.md, and the protocol-bump skill path.
  • ADR-0050 gains an implementation note recording the rename and what's still left: the headless driver (AC12.3) and decisions 1, 3 and 4. Its status stays Proposed until it gets the second review it requires.

Verification

  • cargo xtask check passes on the full workspace: fmt, lint, clippy -D warnings, nextest, doctests, and the minimal provider profile.
  • cargo nextest run -p qq-host: 120 passed, 2 skipped (the same tests as before, now running in their own crate).
  • cargo check -p qq --no-default-features builds.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-25T04:35:27.021775Z
We couldn’t complete this review. Comment @codex review to try again.
cff32a5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lg2m
lg2m added this pull request to stack #433 October 23, 2026 03:14
@lg2m
lg2m force-pushed the refactor/qq-host-composition branch from e8a0957 to 9f4cca2 Compare October 23, 2026 03:32
@lg2m
lg2m force-pushed the refactor/qq-host-composition branch 2 times, most recently from 0566314 to f56f4ca Compare October 24, 2026 05:08
@lg2m
lg2m force-pushed the refactor/qq-host-composition branch from f56f4ca to cff32a5 Compare October 25, 2026 04:35
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m
lg2m merged commit 7c25770 into main Oct 25, 2026
15 of 18 checks passed
@lg2m
lg2m deleted the refactor/qq-host-composition branch October 25, 2026 04:52
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