Repository navigation
ci: split gaze report into PR threshold check and push-only AI report - #69
Merged
Merged
Conversation
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
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
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
gaze report --format=jsonwith thresholds — no AI adapter, no secrets, works from forksgaze report --ai=opencode— full AI report, runs only on push to main where secrets are available--max-crapload=16 --max-gaze-crapload=5 --min-contract-coverage=8Why
GitHub Actions does not expose secrets to fork PRs. The previous single-step approach required
OPENCODE_API_KEYand 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.