Repository navigation
fix(cli): document --backend in qa setup usage and docs - #434
Conversation
Fleet review (glmflash)Lens: adversarial. This PR fixes both blocking findings of correction issue #336 (stale help line and stale pi-scoped docs) and I could not construct a concrete failure against it. Verified from the head tree: Suggestion (1)
Verdict: ready to merge |
Fleet review (deepseek)Lens: evidence + test design. Both blocking findings of the correction issue are closed at this head. Suggestion (1)
Verdict: ready to merge |
Fleet review (mimo)Lens: requirements. Both acceptance criteria of correction issue #336 are satisfied at head af7b7e1. (1) qa --help / root help: the setup usage is now one shared constant, qaSetupUsageLine (internal/cli/qasetup.go:105), consumed by qaUsage (internal/cli/doctor.go:243), so every surface the issue named (qa --help, root help, qa run refusals, qa setup refusal) prints the line that includes [--backend pi|claude|opencode]; the old stale literal is gone. The new test TestQAHelpDocumentsSetupBackendLikeSetupUsage (internal/cli/qa_test.go:345) pins qa --help and the qa setup refusal against that exact line. (2) docs/operating.md: the walkthrough no longer says 'pi-backend scoped (#328)', the step-2 command now shows [--backend pi|claude|opencode] [--effort ] with explicit pi-less guidance, and the new paragraph after the profile example explains backend-keyed routes. I verified every load-bearing doc claim against the code at head: writeQAProfile merges and preserves other backends' routes per role, only the pi pair is probed at setup (AvailableModels guarded by backend == "pi"), effort defaults to high, route_incomplete refusals print route_missing_backend= with the cortex qa setup --backend remedy (internal/cli/doctor.go:418), and model_probe is a real preflight stage name. A repo-wide sweep (README.md, docs/*, AGENTS.md) shows no other surface mentioning qa setup, so no stale copy remains. One testability suggestion only; no blocking findings. Suggestion (1)
Verdict: ready to merge |
Post-merge QA (glm)The merge closes #336's two acceptance criteria: the single qaSetupUsageLine constant is now shared by qaSetupUsage (setup refusals) and qaUsage (qa --help / root help), so the binary can no longer print two mutually inconsistent setup usage lines, and docs/operating.md no longer describes setup as pi-backend scoped: the walkthrough names --backend, the 'pi-backend scoped (#328)' sentence is replaced by per-backend routing with route preservation, the JSON example's route keying is explained, and the claude/opencode model-probe asymmetry (checked only at run preflight) is documented. TestQAHelpDocumentsSetupBackendLikeSetupUsage pins the exact line on both surfaces (help exit 0 on stdout, bare No findings. Verdict: clean |
Post-merge QA (deepseek)Lens: evidence + test design. Both acceptance criteria are met on read: Question (2)
Verdict: clean |
Pull Request
Linked Issue
Fixes #336
PR Type
type:featureFeaturetype:bugBug fixtype:docsDocumentationtype:refactorRefactoringtype:choreMaintenancetype:breaking-changeBreaking changeSummary
#335 added per-backend routes to
qa setup, butqa --help, the root help anddocs/operating.mdstill described setup without--backendand as pi-only. Help and docs now describe the real options from one shared usage line.Changes
internal/cli/qasetup.go:qaSetupUsageLineconstant, used byqaSetupUsage.internal/cli/doctor.go:qaUsageuses the same constant, soqa --help, the root help andqa setuprefusals print one line:usage: cortex qa setup --catalog <dir> --provider <p> --model <m> [--backend pi|claude|opencode] [--effort <e>].internal/cli/qa_test.go:TestQAHelpDocumentsSetupBackendLikeSetupUsage.docs/operating.md: setup walkthrough shows--backendand--effortdefaults; removes "pi-backend scoped (Bug: qa route profiles are backend-scoped but qa setup can only configure pi routes #328)"; describes routes per role and backend and theroute_incompleterefusal.Focused Tests
--backendgo test ./internal/cli -run TestQAHelpDocumentsSetupBackendLikeSetupUsage -count=1before the fixqa --helpexit 0, empty stderr, exact line;qa setupwith no arguments exits with usage, same line on stderrTestQAHelp,TestQAHelpDocumentsEvidenceSidecarSchemago vet ./...;go test ./... -count=1;python3 -m unittest discover -s testsNot tested:
qa setup --backend claudeoropencodeagainst real runtimes; only help and docs changed.Failed or not done: none.
Warnings: the root help is close to its 2048-byte limit; the next addition may need to shorten it.
Runtime Harness
N/A: help text and documentation.
Rollback
Revert the single fix commit.
Chain Dependencies / Out of Scope
Checklist
status:approved.type:*label is applied.