Repository navigation
feat: complete Spec 003 remaining tasks and activate GazeCRAP (Spec 004 Phase 7) - #4
Merged
Merged
Conversation
Implement remaining 9 tasks: discarded return detection (T032), multilib fixture with stub testify/go-cmp packages (T058), CLI integration tests (T052), acceptance tests for SC-001 through SC-007 (T059-T065), and benchmarks (T066). Fix walkCalls to follow MakeClosure instructions, enabling target inference inside t.Run closures for table-driven test support.
…tests Wire ContractCoverageFunc into crap.Analyze() to populate GazeCRAP, ContractCoverage, and Quadrant fields when contract coverage data is available (T050). Add gaze self-check command for dogfooding CRAP analysis on Gaze's own source (T054). Complete GazeCRAP formula accuracy tests (T052/SC-002), quadrant breakdown output tests (T053), and self-check tests (T055). Mark all Spec 004 Phase 7 tasks done.
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ GO | golangci-lint | yes | yes | no | no | 22.42s |
| ✅ GO | revive | 12 | 0 | 0 | 0.53s | |
| markdownlint | 1 | 0 | 16 | 0 | 0.84s | |
| ✅ REPOSITORY | gitleaks | yes | no | no | 0.63s | |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.27s | |
| ✅ YAML | yamllint | 1 | 0 | 0 | 0.71s |
Detailed Issues
⚠️ MARKDOWN / markdownlint - 16 errors
AGENTS.md:44 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
AGENTS.md:49:11 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:49:21 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:49:1 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:49:11 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:74 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
AGENTS.md:95:401 error MD013/line-length Line length [Expected: 400; Actual: 409]
AGENTS.md:127:9 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:127:19 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:127:29 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:127:43 error MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"]
AGENTS.md:127:1 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:127:9 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:127:19 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:127:29 error MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"]
AGENTS.md:137 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff
Resolve 14 findings across 3 review iterations: - SC-003 acceptance test: add ratchet floor with t.Errorf and TODO #5 - Package-level cache: move to TestMain-scoped fixtureCache with nil guards - FindTargetCall: add sameFunction() to prevent cross-package false matches - loadTestPackage: return error instead of silent fallback to non-test pkg - TestRunQuality_ThresholdFail: assert err != nil instead of discarding - FR-015 warning: update stale message to actionable guidance - AssertionNilCheck: add missing nil_check constant, kind, and schema enum - runSelfCheck: use findModuleRoot() to walk up to go.mod - checkQualityThresholds: return all failures, not just the first - BuildTestSSA: remove unused ssaProg (Feature Zombie) - QualitySchema: add discarded_returns to ContractCoverage definition - tasks.md T050/T054: document GazeCRAP CLI wiring as deferred
Split the single CI test job into two parallel jobs: - Unit + Integration: runs with -short flag (skips self-check) - E2E: runs TestRunSelfCheck with 20m timeout The self-check tests spawn 'go test -coverprofile' on the full module, which takes 7+ minutes and exceeds the default 10m CI timeout. Running them in a dedicated job with an extended timeout prevents the main test suite from being blocked. Document the test suite convention in AGENTS.md.
The go test subprocess spawned by generateCoverProfile was running the full test suite (including integration tests) without -short, causing 20+ minute runtimes that exceeded CI timeouts. Adding -short skips self-check tests in the subprocess (preventing infinite recursion) while still producing sufficient coverage data for CRAP score computation.
4 tasks
jflowers
added a commit
to jflowers/gaze
that referenced
this pull request
Aug 12, 2026
- Fix skipped test data missing from report pipeline quality JSON: BuildPackageSummary only aggregates report-level data, so SkippedTests/SkippedTestNames are now set post-hoc in runQualityStep and propagated through ReportSummary (#2, unbound-force#5) - Add combined threshold test for --min-contract-coverage + --max-over-specification both set on empty results (#1) - Add divergence edge case test: SkippedTests > len(SkippedTestNames) verifies defensive guard prevents out-of-bounds (unbound-force#3) - Extract shared MaxSkippedTestDisplay constant from quality package, replacing duplicate magic 20 in main.go and report.go (unbound-force#6) - Move totalTestFuncs computation inside text format branch where it is actually used (unbound-force#8) - Wrap WriteJSON/WriteText errors with context per CS-006 (unbound-force#9) - Filed follow-up issue unbound-force#219 for multi-package mixed BDD+normal scenario test (unbound-force#4)
jflowers
added a commit
to jflowers/gaze
that referenced
this pull request
Aug 13, 2026
…nbound-force#4, unbound-force#7) - Align quality zero-result error message to match gaze crap pattern: 'no test-target pairs resolved — cannot evaluate thresholds' (unbound-force#7) - Add TestMergeSummaries_SkippedTestsDivergence to exercise defensive guard when SkippedTests > len(SkippedTestNames) (unbound-force#3) - Add TestMergeSummaries_MultiPackage_AggregatesSkipped for mergeSummaries aggregation coverage - Add TestRunQuality_MixedBDDAndNormalPackages for mixed BDD + normal multi-package scenario (unbound-force#4) - Update 3 existing test assertions for new error message wording
jflowers
added a commit
to jflowers/gaze
that referenced
this pull request
Aug 13, 2026
- Fix skipped test data missing from report pipeline quality JSON: BuildPackageSummary only aggregates report-level data, so SkippedTests/SkippedTestNames are now set post-hoc in runQualityStep and propagated through ReportSummary (#2, unbound-force#5) - Add combined threshold test for --min-contract-coverage + --max-over-specification both set on empty results (#1) - Add divergence edge case test: SkippedTests > len(SkippedTestNames) verifies defensive guard prevents out-of-bounds (unbound-force#3) - Extract shared MaxSkippedTestDisplay constant from quality package, replacing duplicate magic 20 in main.go and report.go (unbound-force#6) - Move totalTestFuncs computation inside text format branch where it is actually used (unbound-force#8) - Wrap WriteJSON/WriteText errors with context per CS-006 (unbound-force#9) - Filed follow-up issue unbound-force#219 for multi-package mixed BDD+normal scenario test (unbound-force#4)
jflowers
added a commit
to jflowers/gaze
that referenced
this pull request
Aug 13, 2026
…nbound-force#4, unbound-force#7) - Align quality zero-result error message to match gaze crap pattern: 'no test-target pairs resolved — cannot evaluate thresholds' (unbound-force#7) - Add TestMergeSummaries_SkippedTestsDivergence to exercise defensive guard when SkippedTests > len(SkippedTestNames) (unbound-force#3) - Add TestMergeSummaries_MultiPackage_AggregatesSkipped for mergeSummaries aggregation coverage - Add TestRunQuality_MixedBDDAndNormalPackages for mixed BDD + normal multi-package scenario (unbound-force#4) - Update 3 existing test assertions for new error message wording
jflowers
added a commit
that referenced
this pull request
Aug 13, 2026
- Fix skipped test data missing from report pipeline quality JSON: BuildPackageSummary only aggregates report-level data, so SkippedTests/SkippedTestNames are now set post-hoc in runQualityStep and propagated through ReportSummary (#2, #5) - Add combined threshold test for --min-contract-coverage + --max-over-specification both set on empty results (#1) - Add divergence edge case test: SkippedTests > len(SkippedTestNames) verifies defensive guard prevents out-of-bounds (#3) - Extract shared MaxSkippedTestDisplay constant from quality package, replacing duplicate magic 20 in main.go and report.go (#6) - Move totalTestFuncs computation inside text format branch where it is actually used (#8) - Wrap WriteJSON/WriteText errors with context per CS-006 (#9) - Filed follow-up issue #219 for multi-package mixed BDD+normal scenario test (#4)
jflowers
added a commit
that referenced
this pull request
Aug 13, 2026
- Align quality zero-result error message to match gaze crap pattern: 'no test-target pairs resolved — cannot evaluate thresholds' (#7) - Add TestMergeSummaries_SkippedTestsDivergence to exercise defensive guard when SkippedTests > len(SkippedTestNames) (#3) - Add TestMergeSummaries_MultiPackage_AggregatesSkipped for mergeSummaries aggregation coverage - Add TestRunQuality_MixedBDDAndNormalPackages for mixed BDD + normal multi-package scenario (#4) - Update 3 existing test assertions for new error message wording
em-redhat
pushed a commit
to em-redhat/gaze
that referenced
this pull request
Sep 1, 2026
- Fix skipped test data missing from report pipeline quality JSON: BuildPackageSummary only aggregates report-level data, so SkippedTests/SkippedTestNames are now set post-hoc in runQualityStep and propagated through ReportSummary (unbound-force#2, unbound-force#5) - Add combined threshold test for --min-contract-coverage + --max-over-specification both set on empty results (unbound-force#1) - Add divergence edge case test: SkippedTests > len(SkippedTestNames) verifies defensive guard prevents out-of-bounds (unbound-force#3) - Extract shared MaxSkippedTestDisplay constant from quality package, replacing duplicate magic 20 in main.go and report.go (unbound-force#6) - Move totalTestFuncs computation inside text format branch where it is actually used (unbound-force#8) - Wrap WriteJSON/WriteText errors with context per CS-006 (unbound-force#9) - Filed follow-up issue unbound-force#219 for multi-package mixed BDD+normal scenario test (unbound-force#4)
em-redhat
pushed a commit
to em-redhat/gaze
that referenced
this pull request
Sep 1, 2026
…nbound-force#4, unbound-force#7) - Align quality zero-result error message to match gaze crap pattern: 'no test-target pairs resolved — cannot evaluate thresholds' (unbound-force#7) - Add TestMergeSummaries_SkippedTestsDivergence to exercise defensive guard when SkippedTests > len(SkippedTestNames) (unbound-force#3) - Add TestMergeSummaries_MultiPackage_AggregatesSkipped for mergeSummaries aggregation coverage - Add TestRunQuality_MixedBDDAndNormalPackages for mixed BDD + normal multi-package scenario (unbound-force#4) - Update 3 existing test assertions for new error message wording
jflowers
added a commit
to jflowers/gaze
that referenced
this pull request
Oct 2, 2026
Wire the Go cognitive complexity provider in the crap Go path, add the --max-cognitive-complexity flag to gaze analyze with exit-code gating, and surface the cognitive gate in printCISummary. Addresses PR unbound-force#294 review feedback from @jflowers (findings unbound-force#3 and unbound-force#4). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
jflowers
added a commit
that referenced
this pull request
Oct 2, 2026
Wire the Go cognitive complexity provider in the crap Go path, add the --max-cognitive-complexity flag to gaze analyze with exit-code gating, and surface the cognitive gate in printCISummary. Addresses PR #294 review feedback from @jflowers (findings #3 and #4). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
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
testing.Short()detection, benchmarks, and edge-case coveragecrap.Analyze()via newContractCoverageFuncoption (Spec 004 T050)gaze self-checkcommand for dogfooding CRAP analysis on Gaze's own source (T054)Changes
Spec 003 — Test Quality Metrics (commit
f4d2866)internal/quality/mapping.go): Recognizeassert.*,require.*,cmp.Equal/Diffas assertion calls in addition totesting.Tmethodstesting.Short()detection (internal/quality/pairing.go): Mark test functions callingtesting.Short()as conditional-skip testsinternal/quality/bench_test.go): 5 benchmarks for core quality assessment functionsinternal/quality/testdata/src/multilib/): New multi-library test fixture exercising testify, go-cmp, and custom assertion patternsinternal/quality/quality_test.go): 322+ lines of new test coverage including multi-assertion, skip detection, and boundary casesSpec 004 Phase 7 — GazeCRAP Activation (commit
90fde1b)ContractCoverageFuncfield oncrap.Options: Callback that provides per-function contract coverage; when set,Analyze()populatesGazeCRAP,ContractCoverage, andQuadranton eachScoregaze self-checkcommand: Runs full CRAP pipeline on Gaze's own source with--format,--max-crapload,--max-gaze-craploadflagsWriteText()renders quadrant section and fits 80-column terminalTesting
All tests pass with
go test -race -count=1 -short ./.... Integration tests (TestRunSelfCheck_TextFormat/JSONFormat) are gated behind!testing.Short()due to running the full coverage pipeline.