Repository navigation
fix(#282): honor --language alone for gaze report external analyzer dispatch - #379
Conversation
The 1.1 delegation's commit flipped the Phase-3 task 3.4 checkbox alongside 1.1 before Phases 1-2 executed. Reverting per supervisor audit; 3.4 is re-marked when Phase 3 runs it.
The Multi-Language Support section claimed Gaze falls back to built-in Go analysis "when no --analyzer flag is set and no analyzer is configured". Since gaze report now dispatches to external analyzer discovery on --language alone (matching crap/quality/docscan), a --language run with nothing configured fails with "no analyzer found for language" instead of using Go analysis. Require both --analyzer and --language to be unset for the Go-native fallback.
- tasks.md checkbox edit marking verification tasks done Assisted-by: Muse-Spark-Open-816B-A42B-NVFP4 Generated with AI assistance (Muse-Spark-Open-816B-A42B-NVFP4)
uf-divisor
left a comment
There was a problem hiding this comment.
Council Review: fix(#282) — honor --language alone for gaze report external analyzer dispatch
Council verdict: APPROVE WITH ADVISORIES — 7 of 7 reviewers completed; 6 returned APPROVE and 1 returned APPROVE WITH ADVISORIES (divisor-testing). One LOW advisory finding; no CRITICAL or HIGH findings.
Summary
Widens the two external-analyzer gates in runReport's extracted helpers (resolveReportModuleDir, applyReportAnalyzeFunc) from --analyzer-only to --analyzer || --language, matching runCrap/runQuality/runDocscan and resolving issue #282. A hermetic regression test (TestReportWithLanguageOnly_TriggersExternalPath) pins the dispatch, the README fallback wording is corrected, and the OpenSpec change report-language-dispatch ships complete with all tasks marked done.
Reviewers
| Reviewer | Verdict |
|---|---|
| divisor-adversary | APPROVE |
| divisor-architect | APPROVE |
| divisor-curator | APPROVE |
| divisor-entropy | APPROVE |
| divisor-gaze-testing | APPROVE |
| divisor-guard | APPROVE |
| divisor-testing | APPROVE WITH ADVISORIES |
Findings
LOW — test-coverage (cmd/gaze/external_analyzer_test.go:814, divisor-testing): the regression test pins language-only dispatch through its failure leg only — see the inline comment. The delta spec's "Language-only inside a Go module" scenario is covered transitively, and the language-only → PATH-discovery → external-report success composition lacks an end-to-end test. The dispatch contract itself is protected (reverting either widened gate fails the paired assertions); the gap is inherited shape, not a regression. Optional strengtheners are listed inline.
All 6 CI checks pass. No CRITICAL or HIGH findings.
This review was generated by /uf.review-pr (AI-assisted).
Summary
gaze reportnow dispatches to the external analyzer pipeline when--languageis set without--analyzer, matchinggaze crap,gaze quality, andgaze docscan. The change widens the two external-analyzer gates inrunReport's extracted helpers (cmd/gaze/main.go) from--analyzer-only to--analyzer || --language— the identical condition the sibling commands already use:resolveReportModuleDir(language-only runs use the working directory instead of requiring a Go module root) andapplyReportAnalyzeFunc(language-only runs build the external-analyzerAnalyzeFunc), with updated GoDoc. A hermetic regression test (TestReportWithLanguageOnly_TriggersExternalPath) pins the dispatch: outside a Go module with the undiscoverable sentinel language, the error must containno analyzer found for languageand must not containfinding module root. Behavior changes:--language-only outside a Go module previously failed with a module-root error — now dispatches externally, or fails with the actionableno analyzer found for language "<lang>"; inside a Go module the flag was silently inert — now dispatches externally; the no-flag Go-native path is byte-identical. No protocol, schema, flag-surface, orinternal/aireportchanges.Closes #282
How to Test
go test -race -count=1 -run TestReportWithLanguageOnly_TriggersExternalPath -v ./cmd/gaze/gaze report --language python .— it must dispatch externally; with no analyzer installed it fails withno analyzer found for language "python", never a module-root error.gaze report --language python ./...— it must take the external-analyzer dispatch path, never silently fall through to Go-native analysis.gaze report --analyzer snake-eyes .—--analyzer-only behavior is unchanged.gaze reportwith no flags — outside a module it still fails with the module-root error; inside a module it still runs Go-native analysis (byte-identical path).go test -race -count=1 -short ./...How to Demo
Run
gaze report --language python .from a directory that is not a Go module — observe external-analyzer dispatch (no analyzer found for language "python") instead of the previous module-root error.Key Files Changed
cmd/gaze/main.go— widened dispatch gates inresolveReportModuleDirandapplyReportAnalyzeFunc(+ GoDoc)cmd/gaze/external_analyzer_test.go— hermetic regression testTestReportWithLanguageOnly_TriggersExternalPathREADME.md— Go-analysis fallback condition correctedopenspec/changes/report-language-dispatch/— proposal, design, specs, tasks8 files changed, 439 insertions(+), 6 deletions(-)
Known Issues
--language-onlygaze reportinside a Go module dispatches externally instead of silently running Go-native analysis.no analyzer found for languagebut not that it names the requested language; a regression that made the diagnostic generic would still pass the test.All CI-parity checks green locally:
go buildclean;go test -race -count=1 -short ./...— 22 packages ok;golangci-lint run— 0 issues; markdownlint/yamllint clean; gaze dogfood gates PASS (CRAPload 23/38, GazeCRAPload 6/6, avg contract coverage 39.8 ≥ 8); e2e self-check pass.This PR was generated by /uf.finale (AI-assisted).