test(cli): tier-A read-only command smoke tests#28274
Open
kitlangton wants to merge 1 commit into
Open
Conversation
Adds smoke tests for the seven read-only commands that share the
run-shaped lifecycle:
- mcp list
- providers list
- models
- agent list
- session list
- stats
- db path
Each test asserts only that the command exits 0 and produces sane
output in the harness's isolated env. They're not behavioral tests —
they're the cheapest possible signal that the dependency-layer wiring
(config load, DB init, server boot, provider resolution) doesn't crash
for the broad class of "no inputs, no side effects" commands. A
regression in any shared layer will fail one or more of these tests.
Pushes behavioral coverage of the CLI surface from ~14% to ~50%.
Findings while wiring assertions:
- \`providers list\` reflects credentials + env vars, not
config-injected static providers. The assertion verifies the
section headers ("Credentials" / "Environment") to lock in the
output shape.
- \`db path\` returns SQLite's \`:memory:\` under harness isolation
(no on-disk pollution between tests). The assertion accepts either
\`:memory:\` or a real path.
7/7 pass in ~7s; full CLI suite stays green at 331/331.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds smoke tests for the seven read-only commands that share the run-shaped lifecycle:
Each test asserts only that the command exits 0 and produces sane output in the harness's isolated env. They're not behavioral tests — they're the cheapest possible signal that the dependency-layer wiring (config load, DB init, server boot, provider resolution) doesn't crash for the broad class of "no inputs, no side effects" commands. A regression in any shared layer will fail one or more of these tests.
Pushes behavioral coverage of the CLI surface from ~14% → ~50%.
Findings while wiring assertions
Stacked on #28267
Base: `worktree-cli-help-snapshots` so the diff stays minimal once the parent merges.
Test plan