Skip to content

ci: split gaze report into PR threshold check and push-only AI report - #69

Merged
jflowers merged 9 commits into
unbound-force:mainfrom
jflowers:ci-gaze-report-v2
Mar 18, 2026
Merged

jflowers merged 9 commits into
unbound-force:mainfrom
jflowers:ci-gaze-report-v2

Conversation

@jflowers

Copy link
Copy Markdown
Collaborator

Summary

  • PR path: gaze report --format=json with thresholds — no AI adapter, no secrets, works from forks
  • Push path: gaze report --ai=opencode — full AI report, runs only on push to main where secrets are available
  • Both paths enforce the same thresholds: --max-crapload=16 --max-gaze-crapload=5 --min-contract-coverage=8

Why

GitHub Actions does not expose secrets to fork PRs. The previous single-step approach required OPENCODE_API_KEY and failed on every fork PR. This splits the concern: PRs get fast pass/fail threshold checking, push to main gets the full AI quality narrative.

Supersedes #67.

Adds a 'Gaze quality report' step that runs gaze report with
--coverprofile (reusing test coverage data) and threshold flags
(--max-crapload=16, --max-gaze-crapload=5). Only runs on Go 1.24
matrix entry to avoid redundant analysis.

Also adds -coverprofile=coverage.out to the test step so coverage
data is available for gaze report to consume.
Uses go build -o gaze ./cmd/gaze to test the built binary directly.
Installs [email protected] (pinned to avoid 1.2.27 auth issue).
Runs with --ai=opencode and OPENCODE_API_KEY secret.
opencode requires auth.json credentials (not just OPENCODE_API_KEY
env var) to resolve the opencode provider model catalog. Without it,
'Model not found: opencode/claude-sonnet-4-6' occurs.
…directly

The auth.json was interfering with opencode 1.2.26's native env var
auth. The get-out CI proved that 1.2.26 works with just the
OPENCODE_API_KEY env var without auth.json.
PR path: gaze report --format=json with thresholds — no AI adapter,
no secrets, works from forks. Catches CRAPload/GazeCRAPload
regressions before merge.

Push path: gaze report --ai=opencode — full AI-formatted quality
report, runs only on push to main where OPENCODE_API_KEY is available.

Both paths enforce the same thresholds (--max-crapload=16,
--max-gaze-crapload=5, --min-contract-coverage=8).

Closes unbound-force#67 (superseded).
CRAPload is 34 (spec 022 added BuildContractCoverageFunc and
pipeline helpers at 0% coverage). Threshold set to 35 as a ratchet
floor — any PR that adds a 35th CRAPload function will fail.
@jflowers
jflowers merged commit 16aa1ce into unbound-force:main Mar 18, 2026
5 checks passed
jflowers added a commit to jflowers/gaze that referenced this pull request Mar 19, 2026
ci-gaze-report: superseded by ci-gaze-report-v2
ci-gaze-report-v2: merged as PR unbound-force#69 (v1.4.5)
target-warning-guidance: merged as PR unbound-force#65
coverage-reason-guidance: merged as PR unbound-force#63
jflowers added a commit that referenced this pull request Mar 19, 2026
ci-gaze-report: superseded by ci-gaze-report-v2
ci-gaze-report-v2: merged as PR #69 (v1.4.5)
target-warning-guidance: merged as PR #65
coverage-reason-guidance: merged as PR #63
@jflowers
jflowers deleted the ci-gaze-report-v2 branch November 15, 2026 21:34
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