Repository navigation
feat: provider-agnostic reusable gaze AI report workflow - #300
Conversation
jflowers
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES (posted as COMMENT — GitHub does not allow the PR author to submit a REQUEST_CHANGES event on their own PR)
A well-executed, fully spec'd CI refactor that improves the security posture (removes id-token: write, unsets tokens in the report step, tightens permissions), with fork-PR gating and artifact handoff empirically validated by this PR's own green dogfood run. All 6 CI checks pass.
Two pre-merge items drive the verdict:
- [MEDIUM] The consumer example pins
@v2.2.0, a ref that verifiably 404s and can never contain this workflow (inline atdocs/guides/ci-integration.md:223) — one-line fix. - [MEDIUM] The AGENTS.md Website Documentation Gate is unsatisfied — no tracking issue exists in
unbound-force/websitefor this new consumer-facing contract (inline atdocs/guides/ci-integration.md:132). Create the issue pre-merge or explicitly waive.
Additional inline findings: design.md D5 misstates PR behavior for same-repo PRs (LOW); no concurrency group (CI-012, LOW).
Findings without a diff anchor:
- [LOW] AGENTS.md documentation impact not addressed — the CI/CD section still enumerates "Three GitHub Actions workflows" (already stale pre-PR) and there is no Recent Changes entry for this capability.
- [LOW] Review Council Gate — the constitution requires
/uf.review-councilAPPROVE from all four reviewers before PR submission; CI workflow changes are not on the exemption list. This review contributes; complete the council or waive explicitly as repo owner. - [LOW] Pre-existing residual — the opencode adapter's empty-output error appends truncated stderr (
formatStderrSuffix); if the pinned opencode-ai ever printed config fragments, GitHub masks the full secret value but not substrings (the bareapiKeyinside the JSON). Consider follow-up stderr scrubbing.
Verified sound (no action needed): secret gating empirically confirmed on the fork-PR dogfood run (install/report steps skipped, notice posted); no artifact-poisoning path (same-run artifacts consumed only in trusted runs); no command injection (env-var indirection throughout); minimal permissions (contents: read); version-pinned toolchain installs (gaze v2.2.0 via go install, opencode-ai 1.19.0 via npm); all 4 action SHAs verified against their tags; thresholds carried through unchanged at 38/6/8 (no gate loosening); spec-first and Spec Commit Gate ordering satisfied.
This review was generated by /uf.review-pr (AI-assisted).
The consumer example pinned @v2.2.0, a tag that predates the workflow file (404 at that ref; Go module proxy immutability prevents re-tagging). Pin @v2.3.0 — the first release that will ship the workflow — and add guidance to pin the latest release tag when adopting. Addresses PR unbound-force#300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
Org secrets resolve for pull_request runs from same-repo branches, so the EnMaaS report and threshold enforcement run on same-repo PRs, not only push to main. Correct design.md D5, the Risks entry, delta-spec R4, and the two-step CI description in ci-integration.md to state the accurate scoping (fork PRs skip via the secret gate). Addresses PR unbound-force#300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
The Test workflow (now the first API-spending workflow via the gaze-ai-report job) lacked a concurrency group (CI-012 [SHOULD]): overlapping runs on the same ref fired redundant paid LLM reports. Add a workflow-level group keyed on ref + workflow name with cancel-in-progress for non-default branches (PR runs cancel on supersede; main runs queue one in-progress plus one pending so the post-merge report record is never lost). Workflow-level concurrency in the workflow_call reusable workflow itself is inert (called workflows never admit runs), so the reusable workflow instead documents the contract: concurrency policy is caller-owned. Addresses PR unbound-force#300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
The CI/CD section said 'Three GitHub Actions workflows' — stale before this PR and now missing the reusable gaze AI report workflow. Describe the actual inventory (Test, MegaLinter, Release, Reusable Gaze AI Report, fullsend/Prioritize) and add a Recent Changes entry for the reusable gaze AI report capability. Addresses PR unbound-force#300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
Review-council pre-flight (CI parity with MegaLinter) found the troubleshooting list missing a surrounding blank line. Add it. Found during /uf.review-council pre-flight for PR unbound-force#300. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
- Add CI-011 purpose header to test.yml (sole workflow without one) - Set persist-credentials: false on checkout so the job token does not persist into .git/config for the AI subprocess to read - Make the skip notice event-aware: genuine fork PRs keep the friendly notice; non-fork runs with a missing secret get a ::warning:: pointing at the secret name and scope - Assert the coverprofile file exists inside the downloaded artifact in the skip step, so every run that reaches the job validates the full handoff contract (name, content, and path) — not just the artifact name - Document the optional-threshold omit behavior (unset type: number inputs render as empty env vars; explicit 0 stays a live threshold) - Reword the coverprofile input description to reflect artifact extraction rather than the checked-out repository Found during /uf.review-council for PR unbound-force#300 (iteration 1). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
- Reconcile the Full Example section: scope the AI-report bullet to the example's actual push-only gating with a pointer to the Reusable Workflow section for same-repo PR runs; pin [email protected]; fix the stale --max-gaze-crapload=5 example value (repo uses 6); frame the section as the manual path - Add a Concurrency section to the Reusable Workflow docs documenting the caller-owned policy with gaze's own pattern (CI-012) - Add a Requirements and limitations section: permission floor (contents: read), Go-module-at-root assumption, GitHub-token providers cannot work, SHA-pinning option for uses: - Reword the coverprofile description to match artifact extraction - Document the coverprofile-file validation and the non-fork missing-secret warning in the fork-skip paragraph - Add a troubleshooting bullet for malformed opencode-config secrets (validate strict JSON with jq) - AGENTS.md: add reusable-gaze-ai-report/ as the active OpenSpec change (the two previously listed entries are archived); fix 'install and report steps' to 'opencode install and report steps' Found during /uf.review-council for PR unbound-force#300 (iteration 1). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
- design.md Risks: provider availability and org-secret integrity now gate same-repo PR runs (with per-run LLM cost); dogfood installs the released gaze (consumer experience), version defaults are known-good floors re-evaluated at release time - tasks.md: record the CI-012 concurrency amendment to test.yml in the section-5 amendment style; extend task 4.5 with the same-repo verification steps (threshold-omit report-only mode, breach negative check) - spec.md: 'the opencode install and report steps' precision; the fork-skip scenario now includes coverprofile validation - proposal.md: record the Website Documentation Gate decision (satisfied via unbound-force/website#311) Found during /uf.review-council for PR unbound-force#300 (iteration 1). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
|
Addressed in |
|
Addressed: |
|
Rejected with evidence — tracked as follow-up #301 instead.
The one real regression this PR introduces — the single-secret shape means GitHub masks only the full JSON document, not an embedded apiKey substring — is exactly what gaze#301 addresses (adapter-level env-value redaction, plus optional org-level masking registration of the bare key as a second secret). |
The consumer example pinned @v2.2.0, a tag that predates the workflow file (404 at that ref; Go module proxy immutability prevents re-tagging). Pin @v2.3.0 — the first release that will ship the workflow — and add guidance to pin the latest release tag when adopting. Addresses PR #300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
Org secrets resolve for pull_request runs from same-repo branches, so the EnMaaS report and threshold enforcement run on same-repo PRs, not only push to main. Correct design.md D5, the Risks entry, delta-spec R4, and the two-step CI description in ci-integration.md to state the accurate scoping (fork PRs skip via the secret gate). Addresses PR #300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
The Test workflow (now the first API-spending workflow via the gaze-ai-report job) lacked a concurrency group (CI-012 [SHOULD]): overlapping runs on the same ref fired redundant paid LLM reports. Add a workflow-level group keyed on ref + workflow name with cancel-in-progress for non-default branches (PR runs cancel on supersede; main runs queue one in-progress plus one pending so the post-merge report record is never lost). Workflow-level concurrency in the workflow_call reusable workflow itself is inert (called workflows never admit runs), so the reusable workflow instead documents the contract: concurrency policy is caller-owned. Addresses PR #300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
The CI/CD section said 'Three GitHub Actions workflows' — stale before this PR and now missing the reusable gaze AI report workflow. Describe the actual inventory (Test, MegaLinter, Release, Reusable Gaze AI Report, fullsend/Prioritize) and add a Recent Changes entry for the reusable gaze AI report capability. Addresses PR #300 review feedback from @jflowers. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
Review-council pre-flight (CI parity with MegaLinter) found the troubleshooting list missing a surrounding blank line. Add it. Found during /uf.review-council pre-flight for PR #300. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
- Add CI-011 purpose header to test.yml (sole workflow without one) - Set persist-credentials: false on checkout so the job token does not persist into .git/config for the AI subprocess to read - Make the skip notice event-aware: genuine fork PRs keep the friendly notice; non-fork runs with a missing secret get a ::warning:: pointing at the secret name and scope - Assert the coverprofile file exists inside the downloaded artifact in the skip step, so every run that reaches the job validates the full handoff contract (name, content, and path) — not just the artifact name - Document the optional-threshold omit behavior (unset type: number inputs render as empty env vars; explicit 0 stays a live threshold) - Reword the coverprofile input description to reflect artifact extraction rather than the checked-out repository Found during /uf.review-council for PR #300 (iteration 1). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
- Reconcile the Full Example section: scope the AI-report bullet to the example's actual push-only gating with a pointer to the Reusable Workflow section for same-repo PR runs; pin [email protected]; fix the stale --max-gaze-crapload=5 example value (repo uses 6); frame the section as the manual path - Add a Concurrency section to the Reusable Workflow docs documenting the caller-owned policy with gaze's own pattern (CI-012) - Add a Requirements and limitations section: permission floor (contents: read), Go-module-at-root assumption, GitHub-token providers cannot work, SHA-pinning option for uses: - Reword the coverprofile description to match artifact extraction - Document the coverprofile-file validation and the non-fork missing-secret warning in the fork-skip paragraph - Add a troubleshooting bullet for malformed opencode-config secrets (validate strict JSON with jq) - AGENTS.md: add reusable-gaze-ai-report/ as the active OpenSpec change (the two previously listed entries are archived); fix 'install and report steps' to 'opencode install and report steps' Found during /uf.review-council for PR #300 (iteration 1). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: glm
Summary
Adds a provider-agnostic reusable workflow that runs the gaze AI quality report with opencode, dogfoods it in Test, and documents the consumer contract.
.github/workflows/reusable_gaze_ai_report.yml): caller uploads a coverprofile artifact; the workflow installs pinned toolchains (gazev2.2.0, opencode-ai1.19.0), runsgaze report ./... --ai=opencode, enforces thresholds, and appends the report to the step summary.opencode-config, exported verbatim asOPENCODE_CONFIG_CONTENT. NoOPENCODE_PROVIDER_KEY, no repo-level provider key for any consumer. The optionalmodelinput overrides the config's top-levelmodelonly when set.HAS_OPENCODE_CONFIGenv indirection); PR runs still validate checkout, toolchain install, and artifact handoff, then post a skip notice.test.yml): replaces the GCP Vertex/claude-opus chain (WIF auth, setup-gcloud, opencode install, quality report) with an Upload coverage step and agaze-ai-reportjob consuming the reusable workflow with thresholds 38/6/8 and the org secret.docs/guides/ci-integration.md): new Reusable Workflow section — contract, inputs table, canonical config shape, consumer example.OpenSpec change:
openspec/changes/reusable-gaze-ai-report/(proposal, design, spec delta, tasks; the Phase 5 amendment records the config-as-org-secret contract).Validation
OPENCODE_CONFIG_CONTENT(literal-key config), no--modelflag — full GLM 5.3 quality report produced, exit 0.openspec validate reusable-gaze-ai-report --strict: valid.Post-merge actions
OPENCODE_CONFIG_CONTENT(unbound-force org, scoped to gaze and consumers) using the canonical config fromdocs/guides/ci-integration.md, with the literal API key inapiKey.