Skip to content

fix(ci): wire gh aw compile as a real CI gate (#1732) - #1775

Merged
bradygaster merged 1 commit into
devfrom
bradygaster-fido-1732-compile-gate
Aug 20, 2026
Merged

bradygaster merged 1 commit into
devfrom
bradygaster-fido-1732-compile-gate

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

Summary

Fixes the silent-skip defect in the gh aw compile gate. Before this PR, the compile test at test/gh-aw-quality.test.ts:978 used it.skipIf(!ghAwAvailable), and the CI test job never installed the gh-aw extension — so ghAwAvailable was always false and the test always skipped. A gate that always skips is indistinguishable from no gate.

The fix

Added gh extension install github/gh-aw to the test job in .github/workflows/squad-ci.yml, immediately before the Build step.

Why squad-ci.yml (test job), not squad-workflow-lint.yml:
The compile assertion is a Vitest test that runs as part of npm test. squad-workflow-lint.yml runs actionlint/shellcheck and never invokes npm test. Installing the extension there would leave the test still skipping.

Gate rule (Rule 5)

This gate fails if gh aw compile --strict exits non-zero — e.g., a workflow references a missing dispatch target, has invalid frontmatter, or fails any gh-aw strict validation check.

Non-skippability proof

Verified locally with gh aw v0.86.2:

  1. Extension installed → test runs (not skipped): gh aw --version exits 0, so ghAwAvailable = true and it.skipIf(false) executes the test body.

  2. Break test → gate fails: Created a temp workspace mirroring the test setup (git init + copy workflows/ to .github/workflows/), then removed squad-implement-worker.md. Result:

    ✗ squad.md (1 error):
      dispatch-workflow validation failed: workflow 'squad-implement-worker' not found
    ✗ compilation failed
    Exit: 1
    

    The test would have failed. Reverted — intact compile exits 0.

Issue split — three-way

Issue #1732 covers three concerns; this PR ships only one:

Concern Status
✅ Compile gate This PR — SHIP
✅ Prompt-budget gate Already shipped at test/gh-aw-quality.test.ts:637-669 — CLOSE, already done
❌ String-assertion replacement Too vague to action as written — CLOSE, skip

Closes #1732

…-skippable

The compile test at test/gh-aw-quality.test.ts:978 guards with
it.skipIf(!ghAwAvailable). Because squad-ci.yml never installed the
gh-aw extension, ghAwAvailable was always false in CI — the test always
skipped, which is indistinguishable from having no gate.

Fix: add 'gh extension install github/gh-aw' to the test job
immediately before the Build step. Placement rationale: the compile
assertion runs as part of npm test, so the extension must be present
when that command runs. squad-workflow-lint.yml only runs actionlint/
shellcheck and never invokes npm test, making it the wrong home.

Non-skippability verified locally:
- Passing: intact workflows compile --strict → exit 0
- Break: removed squad-implement-worker.md → compile exited 1 with
  'dispatch-workflow validation failed: workflow not found'

This gate fails if: gh aw compile --strict exits non-zero (missing
dispatch target, invalid frontmatter, any gh-aw strict validation error).

Issue #1732 splits three ways; this PR ships only the compile gate:
- SHIP: this gate
- CLOSE/done: prompt-budget gate — already at test:637-669
- CLOSE/skip: string-assertion replacement — too vague to action

Closes #1732

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 19:47
@github-actions

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #1775

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 2
Files added 0
Files modified 2
Files deleted 0
Modules touched 2

🎯 Risk Factors

  • 2 files changed (≤5 → LOW)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/squad-ci.yml
squad-state (1 file)
  • .squad/agents/fido/history.md

This report is generated automatically for every PR. See #733 for details.

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 77f4c01

PR Scope: 🔧 Infrastructure

⚠️ 1 item(s) to address before review

Status Check Details
✅ Single commit 1 commit — clean history
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present No source files changed — changeset not required
✅ Scope clean ⚠️ PR includes 1 .squad/ file(s) — ensure these are intentional
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved No Copilot review threads
✅ CI passing All checks passing

Files Changed (2 files, +16 −0)

File +/−
.github/workflows/squad-ci.yml +8 −0
.squad/agents/fido/history.md +8 −0

Total: +16 −0


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Squad File Leakage Detected

The following .squad/ files were modified in this PR:

  • .squad/agents/fido/history.md

These files affect team routing, agent charters, and decisions.
If intentional, ensure approval from the team lead.

Copilot AI 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.

Pull request overview

This PR makes the gh aw compile --strict quality gate non-skippable in CI by ensuring the gh-aw GitHub CLI extension is installed before npm test runs, so the existing Vitest compile test actually executes in CI.

Changes:

  • Install github/gh-aw in the test job of squad-ci.yml so gh aw --version succeeds and the compile-gate test no longer auto-skips.
  • Record the shipped compile-gate fix details in FIDO’s agent history.
Show a summary per file
File Description
.github/workflows/squad-ci.yml Adds a gh extension install github/gh-aw step in the test job to make the compile gate a real CI failure condition.
.squad/agents/fido/history.md Documents the defect and the rationale/verification for the CI gate fix.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

@bradygaster
bradygaster merged commit f7d0d5d into dev Aug 20, 2026
17 checks passed
@bradygaster
bradygaster deleted the bradygaster-fido-1732-compile-gate branch September 9, 2026 19:44
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.

Phase 0c: Make gh aw compile non-skippable, add prompt-budget gate, replace string-assertion workflow tests

2 participants