Skip to content

docs(spec-003): clarify, plan, and tasks for test quality metrics - #3

Merged
jflowers merged 3 commits into
mainfrom
003-test-quality-metrics
Feb 23, 2026
Merged

jflowers merged 3 commits into
mainfrom
003-test-quality-metrics

Conversation

@jflowers

Copy link
Copy Markdown
Collaborator

Summary

  • Spec 003 pipeline complete: clarify.md, plan.md, tasks.md for Test Quality Metrics & Reporting
  • Updated Spec 004 T050 to reference quality.ContractCoverageForFunc() integration boundary

Key Decisions

  • CLI: New gaze quality subcommand
  • Test-target pairing: Call graph inference (SSA-based)
  • Assertion mapping: Full SSA data flow analysis
  • 66 tasks across 7 phases

Spec Commit Gate

Per AGENTS.md, spec artifacts must be committed and pushed before implementation begins.

- clarify.md: Resolved 6 ambiguities, 6 design decisions, 4 assumptions
  Key decisions: gaze quality subcommand, call graph inference for
  test-target pairing, full SSA data flow for assertion mapping
- plan.md: 7-phase implementation plan with constitution check
- tasks.md: 66 tasks across 7 phases (types, pairing, detection,
  SSA mapping, metrics, CLI, validation)
- Updated Spec 004 T050 to reference quality package integration
@github-actions

github-actions Bot commented Feb 22, 2026 •

Copy link
Copy Markdown

✅MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ GO golangci-lint yes yes no no 22.07s
✅ GO revive 13 0 0 0.49s
✅ REPOSITORY gitleaks yes no no 0.36s
✅ REPOSITORY git_diff yes no no 0.18s

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Add internal/quality/ package with SSA-based assertion-to-side-effect
mapping, contract coverage computation, over-specification detection,
and the gaze quality CLI subcommand.

Phases 1-6 complete (57/66 tasks). Remaining: T032 (discarded returns),
T052 (CLI integration tests), T058 (multilib fixture), acceptance tests
(SC-001/002/003/005/007), and benchmarks.

Review council approved after fixing 15 findings: deterministic sorting,
per-test threshold semantics, visited-key collision in t.Run detection,
DRY violation (HasTestSyntax), QualitySchema validation tests, per-pair
Duration timing, and error handling conventions.
@jflowers
jflowers merged commit ce1f7b7 into main Feb 23, 2026
2 checks passed
@jflowers
jflowers deleted the 003-test-quality-metrics branch February 23, 2026 12:01
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant