Skip to content

feat(gh-aw): opt-in CAO research wave evidence gate - #2226

Merged
bradygaster merged 2 commits into
devfrom
bradygaster-squad-cao-wave-evidence-hook-ff3
Oct 14, 2026
Merged

bradygaster merged 2 commits into
devfrom
bradygaster-squad-cao-wave-evidence-hook-ff3

Conversation

@bradygaster

@bradygaster bradygaster commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add an opt-in, trusted CAO farm-evidence provider hook for /squad research.
  • Collect and validate fresh, run-bound evidence before research; restore and validate its immutable artifact before triage/planning.
  • Gate publication on validation and add deterministic evidence provenance.
  • Preserve default behavior for Squad installs without the CAO provider; native v1 requires GitHub App credentials.
  • Regenerate package copies, workflow manifest, ownership metadata, and digests through native integrity tooling.

Validation

  • Focused evidence suite: 41/41 passed.
  • Affected test suites, lint, and gh-aw:integrity:check passed.
  • No hosted or two-wave acceptance run was performed.

Pairs with CAO commit 1d34979a1 in bradygaster/gh-aw-cao. CAO onboarding requires this capability marker in Squad dev.

Add a trusted, opt-in CAO evidence provider hook. Without a
.squad/cao-evidence-provider.json descriptor, Squad behaves exactly as before.

- research: hash-pinned runtime collects run-bound evidence pre-agent (App auth
  only in native v1; PAT fails as unsupported), native validation, immutable
  artifact retention, publication gate, deterministic provenance writer
- triage/plan modes: restore referenced wave artifact, validate natively and via
  CAO --validate-bundle before the agent; failure blocks publication
- manifest capability marker evidence_provider_schema; regenerated package
  copies, aw.yml, manifest and digests via native integrity tooling

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c26cd4b2-4915-4ada-991d-29493af6106d
Copilot AI balanced review requested due to automatic review settings October 14, 2026 21:28
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 52c9438

PR Scope: 🔧 Infrastructure

⚠️ 3 item(s) to address before review

Status Check Details
❌ Single commit 2 commits — consider squashing before review
✅ 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 No .squad/ or docs/proposals/ files
✅ No merge conflicts No merge conflicts
❌ Copilot threads resolved 1 unresolved Copilot thread(s) — fix and resolve before merging
✅ CI passing All checks passing

Files Changed (22 files, +1552 −51)

File +/−
.github/workflows/squad-ci.yml +1 −1
docs/src/content/docs/guide/gh-aw.md +6 −5
scripts/gh-aw-hosted-e2e.mjs +4 −4
test/gh-aw-evidence-provider.test.ts +462 −0
test/gh-aw-hosted-e2e.test.ts +1 −1
test/gh-aw-implement-workflow.test.ts +1 −1
test/gh-aw-lifecycle-upsert.test.ts +10 −1
test/gh-aw-quality.test.ts +4 −2
workflows/README.md +76 −0
workflows/aw.yml +2 −0
workflows/package/squad-bootstrap.md +1 −1
workflows/package/squad-deps-worker.md +44 −1
workflows/package/squad-implement-worker.md +44 −1
workflows/package/squad-retro.md +44 −1
workflows/package/squad.md +162 −1
workflows/shared/squad-evidence-provider.mjs +481 −0
workflows/shared/squad-install-verifier.mjs +8 −1
workflows/shared/squad-planning-ontology.md +10 −0
workflows/shared/squad.md +44 −1
workflows/squad-bootstrap.md +1 −1
workflows/squad-workflows.manifest.json +37 −28
workflows/squad.md +109 −0

Total: +1552 −51


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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #2226

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 22
Files added 2
Files modified 20
Files deleted 0
Modules touched 5

🎯 Risk Factors

  • 22 files changed (21-50 → HIGH)
  • 5 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (1 file)
  • .github/workflows/squad-ci.yml
docs (1 file)
  • docs/src/content/docs/guide/gh-aw.md
root (14 files)
  • workflows/README.md
  • workflows/aw.yml
  • workflows/package/squad-bootstrap.md
  • workflows/package/squad-deps-worker.md
  • workflows/package/squad-implement-worker.md
  • workflows/package/squad-retro.md
  • workflows/package/squad.md
  • workflows/shared/squad-evidence-provider.mjs
  • workflows/shared/squad-install-verifier.mjs
  • workflows/shared/squad-planning-ontology.md
  • workflows/shared/squad.md
  • workflows/squad-bootstrap.md
  • workflows/squad-workflows.manifest.json
  • workflows/squad.md
scripts (1 file)
  • scripts/gh-aw-hosted-e2e.mjs
tests (5 files)
  • test/gh-aw-evidence-provider.test.ts
  • test/gh-aw-hosted-e2e.test.ts
  • test/gh-aw-implement-workflow.test.ts
  • test/gh-aw-lifecycle-upsert.test.ts
  • test/gh-aw-quality.test.ts

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

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

Authoritative evidence: base-controlled pull_request_target reporter.

⚠️ Architectural review: 1 warning(s), 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/
🟡 warning sweeping-refactor This PR touches 22 files (22 modified/added, 0 deleted). Large PRs are harder to review — consider splitting if possible. —

Automated architectural review — informational only.

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.

🟡 Changes recommended

Source-path validation rejects valid filenames, restoration checks the wrong run attempt, and existing research-writer fixtures lack the required checkout.

3 open findings
What changed in this PR

Adds opt-in CAO evidence collection and validation to Squad’s research and planning workflows, preserving behavior when no provider is installed.

Changes:

  • Collects run-bound evidence and restores it for downstream planning.
  • Gates publication and adds trusted evidence provenance.
  • Updates package metadata, documentation, and tests.
File Description
workflows/​squad.md Adds evidence preparation and publication gates.
workflows/​squad-workflows.manifest.json Registers provider capability and updated digests.
workflows/​squad-bootstrap.md Updates verifier digest.
workflows/​shared/​squad.md Adds evidence validation and research provenance.
workflows/​shared/​squad-planning-ontology.md Documents downstream evidence lineage.
workflows/​shared/​squad-install-verifier.mjs Extends integrity and ownership contracts.
workflows/​shared/​squad-evidence-provider.mjs Implements provider validation, collection, and restoration.
workflows/​README.md Documents opt-in setup and evidence constraints.
workflows/​package/​squad.md Regenerates packaged evidence gates.
workflows/​package/​squad-retro.md Regenerates shared research writer.
workflows/​package/​squad-implement-worker.md Regenerates shared research writer.
workflows/​package/​squad-deps-worker.md Regenerates shared research writer.
workflows/​package/​squad-bootstrap.md Updates packaged verifier digest.
workflows/​aw.yml Registers evidence runtime resource.
test/​gh-aw-quality.test.ts Updates resource contract assertions.
test/​gh-aw-implement-workflow.test.ts Updates documented resource count assertion.
test/​gh-aw-hosted-e2e.test.ts Updates expected package topology.
test/​gh-aw-evidence-provider.test.ts Adds evidence validation and workflow-contract tests.
scripts/​gh-aw-hosted-e2e.mjs Updates topology checks.
docs/​src/​content/​docs/​guide/​gh-aw.md Updates installation resource inventory.
.github/​workflows/​squad-ci.yml Updates installed resource count check.

Review effort: Balanced

const paths = new Set();
for (const file of repository.files) {
keys(file, ['path', 'truncated'], 'source file');
safeRelative(file.path);
Comment thread workflows/shared/squad.md
Comment on lines +94 to +96
const root = join(process.env.GITHUB_WORKSPACE, '.squad-evidence-trusted-base');
const evidence = await import(pathToFileURL(join(root,
'.github/workflows/shared/squad-evidence-provider.mjs')).href);
Comment on lines +457 to +459
const { data: run } = await github.rest.actions.getWorkflowRun({
owner, repo, run_id: reference.run_id,
});
Restore the trusted checkout in legacy research writer fixtures without
changing no-provider publication. Validate descriptive source paths separately
from extracted bundle paths so spaces and bracketed route names are accepted.
Restore the referenced successful workflow attempt rather than the latest
rerun, retaining exact producer identity and all bundle validation gates.

Add direct path and retry regressions and regenerate the runtime digest.
Closes #2226 review findings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c26cd4b2-4915-4ada-991d-29493af6106d
@bradygaster
bradygaster merged commit 3d0c834 into dev Oct 14, 2026
18 checks passed
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