Files
anomalyco_opencode/packages/opencode/test/cli
Kit Langton 4aa2a47ee2 test(cli): tier-A read-only command smoke tests
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.
2026-05-18 21:23:55 -04:00
..
2026-05-18 16:18:29 +00:00
2026-03-23 17:12:55 +00:00
2026-03-10 16:56:30 +00:00