Skip to content

ci: dogfood the AI report with gaze built from the commit under test - #317

Merged
jflowers merged 9 commits into
mainfrom
dogfood-ai-report-from-source
Nov 7, 2026
Merged

jflowers merged 9 commits into
mainfrom
dogfood-ai-report-from-source

Conversation

@jflowers

@jflowers jflowers commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Why

The test.yml gaze-ai-report job doesn't pass gaze-version, so the reusable workflow installs its v2.2.0 default instead of the commit under test. Spec 040 (deterministic AI report rendering) is on main but hasn't been released yet; neither v2.2.0 nor v2.3.0 contains it, so it has never run in CI.

In run 41698377720, Install gaze logged GAZE_RELEASE: v2.2.0. The step summary got one line of agent narration ("The gaze binary is on PATH … Let me inspect the repo's opencode configuration…") instead of a report, and the job passed. This is the same failure as run 41309423609, the one spec 040 was written to fix.

What changes

  • reusable_gaze_ai_report.yml: new optional boolean input build-from-source, default false.
    • When true, Install gaze (source) checks that go list -m is github.com/unbound-force/gaze/v2. If it isn't, it fails with a ::error:: that points the caller at gaze-version.
    • It then runs go install -ldflags "-X main.commit=${GITHUB_SHA}" ./cmd/gaze.
    • When false, Install gaze (release) installs gaze-version as before.
    • Both paths log gaze --version.
  • test.yml: passes build-from-source: true.
  • Docs: docs/guides/ci-integration.md inputs table and AGENTS.md.
  • OpenSpec change: openspec/changes/dogfood-ai-report-from-source/.

Why not gaze-version: ${{ github.sha }}: on PRs, github.sha is the temporary refs/pull/N/merge commit, so it can't be resolved reliably through the Go module proxy. Every push would also publish gaze pseudo-versions to the public proxy and checksum database. The job has already checked out the exact commit, so building from it avoids both problems.

The gaze-version default is unchanged on purpose. Callers pinned to @vX.Y.Z get the default from that tag, so the bump to v2.4.0 must land in the commit that gets tagged.

Expected effect and follow-up

After merge, the dogfood job runs spec 040 for the first time. If the configured model can't meet the strict answer contract, the job will now fail instead of passing on narration. That's the intended signal.

Follow-up order:

  1. Confirm the step summary on main shows the spec 040 report.
  2. Open a PR that bumps the gaze-version default to v2.4.0.
  3. Release with gh workflow run release.yml -f tag=v2.4.0.

Verification

  • actionlint passes. The only remaining notes are two SC2086 warnings that are already on main.
  • yamllint (.yamllint.yml) and markdownlint pass.
  • I ran the source-install script locally with Go 1.25.7. On the gaze checkout it builds and prints gaze version dev (commit fe28ce6…). On a different module it fails with the ::error::. In a directory with no module it also fails.

Process note: /uf.review-council has not run on this PR. It couldn't run in the authoring environment, and the maintainer chose to open the PR anyway.

🤖 Generated with Claude Code

jflowers and others added 2 commits November 5, 2026 11:53
The test.yml gaze-ai-report job omitted gaze-version, so the reusable
workflow installed its v2.2.0 default. Spec 040 is unreleased and had
never run in CI; run 41698377720 published one line of v2.2.0 agent
narration as the step summary and passed.

Add an opt-in build-from-source input to the reusable workflow that
builds ./cmd/gaze from the checkout (guarded to the gaze module, commit
stamped into --version) and enable it in test.yml. The gaze-version
default is unchanged; it is bumped in the commit tagged as the first
spec-040 release, after this is green on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ MARKDOWN markdownlint 2 0 0 0 1.61s
✅ REPOSITORY gitleaks yes no no 4.18s
✅ REPOSITORY git_diff yes no no 0.28s
✅ YAML yamllint 3 0 0 0.87s

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

@uf-divisor uf-divisor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary — APPROVE WITH ADVISORIES

Verdict: APPROVE WITH ADVISORIES (posted as COMMENT)

6 dispatched reviewers, all successful: divisor-adversary APPROVE, divisor-architect APPROVE WITH ADVISORIES, divisor-curator APPROVE WITH ADVISORIES, divisor-entropy APPROVE, divisor-guard APPROVE, divisor-sre APPROVE WITH ADVISORIES. 5 findings (1 MEDIUM, 4 LOW), none blocking.

This PR fixes the dogfood gap where the gaze-ai-report job tested the v2.2.0 pinned default instead of the commit under test — spec 040 (deterministic report rendering) never ran in CI, and run 41698377720 published one line of agent narration to the step summary while passing. The opt-in build-from-source input with the module-path guard leaves consumers unchanged, and the trust-boundary analysis holds: same-repo PR authors already control the executed workflow, so no new secret exposure. All 6 CI checks pass.

The five inline findings are advisory polish: delta-template completeness (MEDIUM), RFC 2119 heading language, deferral traceability to #313, version-stamp coverage of the published artifact, and release-install path coverage. None block merge.

This review was generated by /uf.review-pr (AI-assisted).

with:
coverage-artifact: coverage-out
# Dogfood the commit under test, not a pinned release.
build-from-source: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this caller always passing build-from-source: true, Install gaze (release) — including its newly added gaze --version echo, which has never executed anywhere — no longer runs in gaze's own CI. The consumer-facing release-install path (go install github.com/unbound-force/gaze/v2/cmd/gaze@<tag>) is now validated only reactively by consumer runs. design.md's Risks section accepts this trade-off; a post-release or scheduled canary installing the latest tag and running gaze --version would close the gap proactively.

— divisor-sre · LOW · release-pipeline

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The factual chain is correct — with the dogfood caller always passing build-from-source: true, Install gaze (release) (including its gaze --version echo) never runs in gaze's own CI. We're deliberately not adding a canary in this PR, for three reasons:

  1. The trade-off is documented and accepted. design.md Risks states it explicitly: consumers exercise the release-install path on every use, gaze init --ci scaffolds pin it explicitly, and the step itself is unchanged — the added gaze --version echo is byte-identical to the source-path echo exercised on every push.
  2. The proactive closure is already tracked. A post-release installability smoke test is issue feat: add lightweight post-release Go install smoke test #297, cited in design.md since 69e6983. It's naturally sequenced after ci: bump reusable_gaze_ai_report gaze-version to the first release with deterministic report rendering (spec 040 SC-008) #313's gaze-version bump, once a spec-040 release exists to install. Filing a new issue here would duplicate feat: add lightweight post-release Go install smoke test #297.
  3. Scope. A scheduled canary is a new CI capability; the repo's spec-first mandate requires its own spec, and this review phase permits findings and minor fixes only.

If you'd like to pull that work forward, #297 is the right vehicle.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintaining the rejection from my reply above — all three grounds stand: the documented risk acceptance in design.md (Risks / Trade-offs), the existing tracking vehicle in #297 (post-release smoke test covering the same go install <module>/cmd/gaze@<tag> resolution path), and the spec-first mandate that keeps a new scheduled-canary capability out of the review phase.

This round re-assessed the thread with a four-persona review panel (divisor-adversary, divisor-architect, divisor-guard, divisor-sre) over the full thread and repository evidence. All four returned zero findings and upheld the rejection. The domain reviewer additionally verified that #297's smoke test exercises the same resolution path as the unexercised release-install step, and that the go list -m module guard matches the idiom already shipping in .github/scripts/test-validate-module-major.sh:10-16, which test.yml:43 runs in CI on every push.

No changes land in this PR. #297 remains the vehicle for pulling the proactive validation forward.

jflowers and others added 6 commits November 7, 2026 11:40
Stamp main.version and main.date alongside main.commit in the source
build, matching GoReleaser, so the published report header names the
commit rather than "dev". Complete the spec delta template, retitle the
requirement in MUST form, and link the gaze-version bump deferral to #313.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Addresses PR #317 review feedback from @uf-divisor.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Council iteration-2 advisory fixes on the dogfood-ai-report-from-source
cumulative diff:

- AGENTS.md and design.md D3 quoted the pre-fix single-symbol ldflags
  command; both now quote the three-symbol stamping actually shipped in
  reusable_gaze_ai_report.yml (mirroring .goreleaser.yaml), with the
  report-metadata rationale (Gaze Version names the producing commit).
- design.md Risks release-install acceptance bullet now records the
  compensating control: post-release installability smoke is tracked
  in #297.
- proposal.md Testability section corrected: yamllint validates the
  workflow in CI (via MegaLinter); actionlint was a local-only check.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Learnings submitted by review-council personas during the
dogfood-ai-report-from-source council run (iteration 1):
documentation-accuracy, documentation-traceability x2,
spec-accuracy, structural-entropy.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
Learnings proposed by the review-council iteration-2 dispatch
(adversary, architect, curator personas). Committed post-verdict as
process artifacts; committing iteration-N proposals can only be
reviewed by iteration N+1, which would recurse indefinitely.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
@jflowers
jflowers merged commit 37eb054 into main Nov 7, 2026
6 checks passed
@jflowers
jflowers deleted the dogfood-ai-report-from-source branch November 7, 2026 22:02
jflowers added a commit that referenced this pull request Nov 7, 2026
Addresses PR #317 review feedback from @uf-divisor.

Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
jflowers added a commit that referenced this pull request Nov 7, 2026
Signed-off-by: Jay Flowers <[email protected]>
Assisted-by: glm-5
jflowers added a commit that referenced this pull request Nov 13, 2026
The dogfood gaze-ai-report job builds from source since #317, so the
reusable workflow's `Install gaze (release)` path is exercised only by
consumers. Add a daily (and workflow_dispatch) canary that runs the same
go install + gaze --version commands against the latest GitHub release
and verifies the installed module version via `go version -m`.

Scheduled rather than release-triggered: releases are published with
GITHUB_TOKEN, which does not trigger workflows, and a schedule also
catches breakage between releases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants