Skip to content

ci: install pinned gh-aw canary and make coverage authoritative - #921

Merged
groupthinking merged 4 commits into
mainfrom
copilot/fix-gh-aw-issue
Jul 22, 2026
Merged

ci: install pinned gh-aw canary and make coverage authoritative#921
groupthinking merged 4 commits into
mainfrom
copilot/fix-gh-aw-issue

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Status

Draft — implementation exists, but exact-head workflows have not been authorized to run. Do not merge or activate the agents yet.

Canonical scope

Focused issue: #920
Parent program: #898
Related governance PR: #899 remains the canonical repository-governance implementation. This PR must not replace or compete with it.

Outcome

Install the pinned gh-aw runtime and a staged EventRelay-specific canary while repairing the repository's false-green Coverage signal.

This branch currently:

  • pins gh-aw v0.82.14 and its setup action;
  • adds compiled lock files and a validation workflow;
  • adds report-first CI Investigator, Canonical PR Remediator, and Focused Coverage Controller sources;
  • removes the obsolete non-gh-aw .aw.yml loop;
  • makes the Coverage test command authoritative instead of suppressing failures;
  • pauses Dependabot auto-merge pending explicit standing authority;
  • adds workflow documentation and focused governance tests.

Verified evidence

  • Exact head: 598de92d37b78dcc97858b7cd90e08062e14c0fb.
  • Verified exact-head Vercel Preview: READY. This proves only the Next.js build, not the Python backend or gh-aw workflows.
  • All eight GitHub workflow runs are action_required; no exact-head CI/coverage/gh-aw result exists yet.
  • Historical Coverage run 29860492747 reported success even though pytest stopped with four collection errors, Qlty lacked OIDC/token configuration, and no coverage artifact was produced. The existing continue-on-error plus || true caused the false green.

Corrections required before workflow approval

  • Align workflow identity text with engine: codex; do not claim the gh-aw runtime itself is Jules.
  • Add a deterministic deduplication key and update-in-place behavior for CI Investigator output.
  • Prove the investigator sees PR-head failures; the current workflow_run.branches: [main] filter is insufficient for that canary.
  • Pin the validation workflow's checkout action to an immutable SHA.
  • Run the truthful Coverage job, repair the four collection failures, produce an artifact, and enforce the repository's declared 90% threshold.
  • Demonstrate three report-only investigator runs with correct classification and no duplicate issues.
  • Keep the remediator and coverage controller report-only until a least-privilege GitHub App identity proves same-branch pushes trigger exact-head CI and verified Vercel previews.

Exact-head workflow runs awaiting human approval

Execution receipt

  • Agent login: Copilot
  • Agent run ID: not exposed by the GitHub connector; no ID has been invented.
  • Canonical branch/PR: copilot/fix-gh-aw-issue / ci: install pinned gh-aw canary and make coverage authoritative #921
  • Claimed: 2026-07-22T03:56:35Z
  • Latest artifact heartbeat: 2026-07-22T04:07:00Z
  • Exact head: 598de92d37b78dcc97858b7cd90e08062e14c0fb

No agent has been disabled. No merge, workflow approval, credential change, production mutation, ruleset weakening, or branch deletion has been performed.

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-uvai Canceled Canceled Jul 22, 2026 4:16am

Copilot AI linked an issue Jul 22, 2026 that may be closed by this pull request
16 tasks
Copilot AI changed the title [WIP] Fix gh-aw runtime and workflow validation issues Harden gh-aw governance activation and make coverage gate authoritative Jul 22, 2026
Copilot AI requested a review from groupthinking July 22, 2026 04:07
Comment thread .github/workflows/dependabot-auto-merge.yml Outdated
…ia `env` in job-level `if` conditions, where the `env` context is unavailable, so both jobs always evaluate to false and never run.

This commit fixes the issue reported at .github/workflows/dependabot-auto-merge.yml:21

## Bug

In `.github/workflows/dependabot-auto-merge.yml`, both the `approve` and `merge` jobs gated their execution on:

```yaml
if: env.DEPENDABOT_AUTO_MERGE_ENABLED == 'true' && ...
```

Per GitHub Actions' [context availability rules](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability), the `env` context is **not** available in `jobs.<job_id>.if`. Only `github`, `needs`, `vars`, and `inputs` contexts can be referenced at the job level; `env` is only available within steps (`jobs.<job_id>.steps.<step_id>.if` and step values).

When an unavailable context is referenced in an expression, it evaluates to an empty string. So the guard became:

```
'' == 'true'  →  false
```

**Failure mode / trigger:** Even if a maintainer sets `DEPENDABOT_AUTO_MERGE_ENABLED` to `"true"` (whether as the workflow-level env default or otherwise), the job-level `if` still reads the empty `env` context, so both `approve` and `merge` jobs are permanently skipped. The feature flag is completely inert — auto-merge can never be enabled.

## Fix

Switched the flag to the `vars` context, which **is** available in job-level `if`:

```yaml
if: vars.DEPENDABOT_AUTO_MERGE_ENABLED == 'true' && ...
```

This makes the flag a repository/organization variable. When the variable is unset (the default), `vars.DEPENDABOT_AUTO_MERGE_ENABLED` is `''`, so the jobs remain disabled — preserving the intended fail-safe/off-by-default behavior. Setting the repo variable to `true` now actually enables the workflow.

The previous workflow-level `env` block (`DEPENDABOT_AUTO_MERGE_ENABLED: "false"`) was removed because it was dead — it could never influence the job-level conditions and was misleading.

The unit test `tests/unit/test_dependabot_automation_workflow.py` was updated to assert the `vars.` form and to verify the flag is not (re)introduced as a workflow-level `env` value. Note the original test only checked for the literal string in the `if` condition and did not validate functional behavior, which is why it never caught the bug.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: groupthinking <garveyht@gmail.com>
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔍 PR Validation

⚠️ Large PR detected (5582 lines changed)

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 404ef24.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/cache/restore 55cc8345863c7cc4c66a329aec7e433d2d1c52a9 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1013 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
actions/actions/cache/save 55cc8345863c7cc4c66a329aec7e433d2d1c52a9 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1013 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
actions/actions/checkout 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 🟢 6.9
Details
CheckScoreReason
Maintained🟢 1024 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
actions/actions/download-artifact 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c 🟢 5.1
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits
actions/actions/github-script 3a2844b7e9c422d3c10d287c895573f7108da1b3 🟢 6.6
Details
CheckScoreReason
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
actions/actions/setup-node 820762786026740c76f36085b0efc47a31fe5020 🟢 6.3
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1017 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 9binaries present in source code
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
actions/actions/upload-artifact 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a 🟢 5.2
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
actions/github/gh-aw-actions/setup b6d1443e05b8716267fa19425b99aa4f12006b4a UnknownUnknown
actions/actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 🟢 6.9
Details
CheckScoreReason
Maintained🟢 1024 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 5branch protection is not maximal on development and all release branches

Scanned Files

  • .github/workflows/focused-coverage-controller.lock.yml
  • .github/workflows/gh-aw-validation.yml

@groupthinking groupthinking changed the title Harden gh-aw governance activation and make coverage gate authoritative ci: install pinned gh-aw canary and make coverage authoritative Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Agent Completion Truth Gate: BLOCKED

Reasons: invalid_payload

Machine-readable verdict
{
  "details": {
    "invalid_fields": [
      "policy.agent_login",
      "policy.run_id"
    ]
  },
  "reasons": [
    "invalid_payload"
  ],
  "verdict": "blocked"
}

Workflow evidence

@groupthinking
groupthinking marked this pull request as ready for review July 22, 2026 04:15
Copilot AI review requested due to automatic review settings July 22, 2026 04:15
@groupthinking
groupthinking merged commit ef9393a into main Jul 22, 2026
23 of 30 checks passed
@groupthinking
groupthinking deleted the copilot/fix-gh-aw-issue branch July 22, 2026 04:16

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

Installs pinned gh-aw canary workflows, makes Python coverage failures authoritative, and pauses Dependabot auto-merge.

Changes:

  • Adds three report-only Codex workflows and generated lock files.
  • Enforces the 90% coverage threshold.
  • Adds gh-aw validation, governance tests, and workflow documentation.

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
.gitattributes Marks generated lock workflows.
.github/agentic/verification-loop.aw.yml Removes obsolete agent workflow.
.github/aw/actions-lock.json Pins gh-aw setup action.
.github/workflows/AUDIT.md Records validation workflow.
.github/workflows/README.md Documents validation and coverage.
.github/workflows/canonical-pr-remediator.lock.yml Generated remediator workflow.
.github/workflows/canonical-pr-remediator.md Defines report-only remediation.
.github/workflows/coverage.yml Enforces coverage failures.
.github/workflows/dependabot-auto-merge.yml Adds auto-merge feature gate.
.github/workflows/eventrelay-ci-investigator.lock.yml Generated investigator workflow.
.github/workflows/eventrelay-ci-investigator.md Defines CI investigation behavior.
.github/workflows/focused-coverage-controller.lock.yml Generated coverage controller.
.github/workflows/focused-coverage-controller.md Defines coverage reporting behavior.
.github/workflows/gh-aw-validation.yml Compiles and validates gh-aw sources.
.github/workflows/verification.yml Updates legacy workflow comments.
tests/unit/test_dependabot_automation_workflow.py Tests the auto-merge gate.
tests/unit/test_gh_aw_workflow_governance.py Tests coverage and gh-aw governance.

Comment thread .github/workflows/gh-aw-validation.yml Outdated
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
Comment thread .github/workflows/gh-aw-validation.yml
Comment on lines +12 to +13
branches:
- main

# EventRelay CI Investigator (report-first)

You are Jules running the EventRelay CI Investigator.
Comment on lines +61 to +63
## Output contract (single deduplicated blocker record)

Publish one deduplicated blocker update that includes:
Comment on lines 19 to 21
| `coverage.yml` | **FIX** | Added a top-level `name:` and the `workflow_dispatch` trigger the README already documented as available. |
| `gh-aw-validation.yml` | **ADD** | Adds pinned gh-aw (`v0.82.14`) validation for EventRelay's custom markdown workflows. Enforces compile/validate plus actionlint, zizmor, and poutine checks, and verifies committed lock files. |
| `dependabot-auto-merge.yml` | KEEP | Comprehensive guards (same-repo, non-draft, SHA match, major excluded). |
jobs:
approve:
if: >-
vars.DEPENDABOT_AUTO_MERGE_ENABLED == 'true' &&
Comment on lines +17 to +21
actions: read
checks: read
contents: read
issues: read
pull-requests: read
Comment on lines +7 to +11
actions: read
checks: read
contents: read
issues: read
pull-requests: read
--cov-report=html:reports/htmlcov \
--cov-fail-under=0 \
-v || true
--cov-fail-under=90 \
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.

Install pinned gh-aw canary and repair false-green coverage

3 participants