Fail activation early for stale provenance workflows by Copilot · Pull Request #70348 · github/gh-aw · GitHub
Skip to content

Fail activation early for stale provenance workflows - #70348

Merged
pelikhan merged 6 commits into
mainfrom
copilot/fix-gh-aw-setup-dependency-issue
Oct 20, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/fix-gh-aw-setup-dependency-issue

Conversation

Copilot AI commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

A setup-only dependency upgrade can introduce a safe-output provenance requirement that older compiled workflows do not satisfy, causing publication to fail after agent execution. Activation now detects this mismatch before the agent runs.

  • Compatibility check: Require compiler version v0.91.10 or newer in runtimes with the provenance requirement. This local check works even when remote compatibility configuration is unavailable and does not change older pinned runtimes.

  • Migration guidance: The activation summary and release documentation direct users to update the compiler, regenerate, and commit workflows:

    gh aw upgrade
    gh aw compile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix setup-only dependency upgrades for compatibility issue Fail activation early for stale provenance workflows Oct 19, 2026
Copilot AI requested a review from pelikhan October 19, 2026 19:56
@pelikhan
pelikhan marked this pull request as ready for review October 19, 2026 20:11
Copilot AI max review requested due to automatic review settings October 19, 2026 20:11
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · sonnet50 · 12 AIC · ⌖ 15 AIC · ◇ 4.45 AIC · ⊞ 12.6K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · gpt56 · 5.85 AIC · ⌖ 5.36 AIC · ⊞ 14.7K · ◷

Generated by Ponytail Reviewer for #70348

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs (triage: bug_fix, confirmed via pr-triage) — requesting changes on a scope issue in the core fix.

📋 Key Themes

Key Themes

  • Root-cause mismatch (blocking issue): check_version_updates.cjs runs for every released-version workflow regardless of whether it declares safe-outputs:. The new PROVENANCE_MINIMUM_COMPILER_VERSION gate fails activation for workflows that never touch GH_AW_JOB_CHECK_RUN_ID / appendExecutionProvenance, which is the opposite of what #70273's proposed-implementation-plan step 1 asks for ("avoid globally blocking older compiler versions that still work with their pinned older runtime"). The compiler already has ctx.data.SafeOutputs != nil available in addActivationVersionCheckStep and could pass that signal through to gate the check precisely.
  • Test gap: no regression test proves a pre-v0.91.10 workflow without safe-outputs configured still passes activation (the actual compatible case the issue asks to preserve). Boundary test at v0.91.9 is also missing.

Positive Highlights

  • ✅ Fail-fast-before-agent-execution approach is the right shape for the bug (avoids wasted agent runs that fail only at publish time).
  • ✅ Local/offline-safe check (works even when remote compat.json is unreachable) is a solid design choice and well tested for that path.
  • ✅ Clear, actionable summary/failure messaging pointing users to gh aw upgrade + gh aw compile.
  • ✅ Docs update in releases.md explains the new requirement for users encountering it via Dependabot-only upgrades.

See inline comments for the specific fix and a suggested regression test.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 92.7 AIC · ⌖ 15.1 AIC · ⊞ 10.1K
Comment /matt to run again

return;
}

if (compareVersions(compiledVersion, PROVENANCE_MINIMUM_COMPILER_VERSION) < 0) {

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.

[/diagnosing-bugs] This unconditionally fails activation for every workflow compiled before v0.91.10 — including workflows with no safe-outputs: configured at all, which never call appendExecutionProvenance and were never affected by the missing GH_AW_JOB_CHECK_RUN_ID. Issue #70273 explicitly says the fix should "avoid globally blocking older compiler versions that still work with their pinned older runtime."

💡 Root cause vs. symptom

check_version_updates.cjs runs in the activation job for all released-version workflows (pkg/workflow/compiler_activation_steps.go:206, gated only on UpdateCheckDisabled / IsReleasedVersion), with no visibility into whether the compiled workflow actually declares safe-outputs. A workflow with zero safe-outputs will now fail activation purely because it predates v0.91.10, even though it never touches GH_AW_JOB_CHECK_RUN_ID.

Consider gating the check on whether safe-outputs publishing is actually present — e.g. pass a GH_AW_HAS_SAFE_OUTPUTS env var from addActivationVersionCheckStep (compiler has ctx.data.SafeOutputs != nil readily available) and only enforce PROVENANCE_MINIMUM_COMPILER_VERSION when that flag is true. This fixes the actual root cause (missing provenance env var reaching add_comment.cjs) instead of a broader compiler-version proxy that over-blocks unaffected workflows.

A regression test for "old compiler + no safe-outputs configured → should NOT fail" would catch this gap; none of the new tests in check_version_updates.test.cjs cover that case.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bc85ee4e: activation now passes GH_AW_HAS_SAFE_OUTPUTS, and the provenance minimum only applies when safe outputs are configured. Regression coverage includes pre-minimum workflows without safe outputs and v0.91.9.

mockFetchError(new Error("ECONNREFUSED"));
await runMain();
expect(mockFetch).not.toHaveBeenCalled();
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("v0.91.10 or newer"));

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.

[/tdd] Good coverage for the reject/accept boundary at v0.91.10, but there is no test for the exact boundary v0.91.9 (one patch below) failing and no test for the scenario above — a pre-v0.91.10 workflow without safe-outputs configured, which this check currently still blocks unnecessarily.

💡 Missing boundary/negative case
it("should reject the patch version immediately below the provenance requirement", async () => {
  process.env.GH_AW_COMPILED_VERSION = "v0.91.9";
  mockFetchError(new Error("ECONNREFUSED"));
  await runMain();
  expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("v0.91.10 or newer"));
});

Exact-boundary tests read as a clearer specification of the cutoff than the current v0.88.7 example alone.

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the exact v0.91.9 rejection test and the older-version/no-safe-outputs regression case in bc85ee4e.

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

The new early return bypasses existing blocked-version warnings and issue notifications.

1 open issue
What changed in this PR

Detects incompatible compiled workflows during activation, before agent execution and safe-output publishing.

Changes:

  • Requires compiler v0.91.10 or newer locally.
  • Adds compatibility and remote-config outage coverage.
  • Documents upgrading, recompiling, and committing regenerated workflows.
File Description
docs/​src/​content/​docs/​reference/​releases.md Adds migration guidance.
actions/​setup/​js/​check_version_updates.test.cjs Tests the local compatibility requirement.
actions/​setup/​js/​check_version_updates.cjs Adds the activation-time compiler minimum.
.changeset/​patch-check-run-provenance-compatibility.md Records the patch release change.

Review effort: Max

return;
}

if (compareVersions(compiledVersion, PROVENANCE_MINIMUM_COMPILER_VERSION) < 0) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bc85ee4e: remote blocked-version handling and issue reporting now run before the provenance failure; the local minimum still applies when config fetching fails. Added a blocked v0.85.3 test asserting the blocked summary and issue notification.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/check_version_updates.cjs:234): [/diagnosing-bugs] This unconditionally fails activation for every workflow compiled before v0.91.10 — including workflows with no safe-outputs: configured at all, which never call appendExecutionProvenance and were never affected by the missing GH_AW_JOB_CHECK_RUN_ID. Issue Setup-only dependency upgrades pass activation but fail safe outputs: GH_AW_JOB_CHECK_RUN_ID #70273 explicitly says the fix should avoid globally blocking older compiler versions that still work with their pinned older runtime. - Fail activation early for stale provenance workflows #70348 (comment)
  3. Review (actions/setup/js/check_version_updates.test.cjs:177): [/tdd] Good coverage for the reject/accept boundary at v0.91.10, but there is no test for the exact boundary v0.91.9 (one patch below) failing and no test for the scenario above — a pre-v0.91.10 workflow without safe-outputs configured, which this check currently still blocks unnecessarily. - Fail activation early for stale provenance workflows #70348 (comment)
  4. Review (actions/setup/js/check_version_updates.cjs:234): Any compiler below v0.91.10 that is also in blockedVersions now returns here before the blocked-version branch. This includes the v0.82.8–v0.85.3 entries in the checked-in compatibility list. Activation still fails, but the security-revocation summary and reportBlockedVersionIssue() notification are lost, bypassing the default on.report-blocked-version behavior. - Fail activation early for stale provenance workflows #70348 (comment)
  5. Fix failing check agent (FAILURE): https://github.com/github/gh-aw/actions/runs/39317240597/job/118282474421.
  6. Fix failing check conclusion (FAILURE): https://github.com/github/gh-aw/actions/runs/39317240597/job/118284254497.
  7. Fix failing check JS Tests (shard 2/4) (FAILURE): https://github.com/github/gh-aw/actions/runs/39317240762/job/118282168153.

Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI.

Sous-chef head: 2c3ec8a
Sous-chef work: 043185828d65a534dd8b2b6b4d00e0d47bf21a2940d3f277c0ed15da7f668648 34f38971738f6a752a646bd7797a6c8d47fb096e4eb6f91e946a91255433c8c4 3bb3e886025662c71743ea6f8f87ec434a0260ec1af7f3155bf4bfb4240d8423 51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf ca94d57d6dd99ab72ac7ab2a8608a6d36284dcbb77468f0df70df6264a887cf6 f36595cf7db34f5b63d43e46792d77c83328a149ae27126e2149dd2093198c66
Sous-chef state: ece3d9b606afc0d05b0a18edebbf4b1218c89cfdb84f6a913a2b6f862c550100

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · 21.2 AIC · ⌖ 8.31 AIC · ⊞ 1.1K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits October 19, 2026 21:06
…up-dependency-issue

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
return;
}

const requiresExecutionProvenance = process.env.GH_AW_HAS_SAFE_OUTPUTS === "true" && compareVersions(compiledVersion, PROVENANCE_MINIMUM_COMPILER_VERSION) < 0;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 6d73d77: missing or unknown GH_AW_HAS_SAFE_OUTPUTS now requires provenance for below-minimum versions, while explicit false remains exempt. Added regression coverage for both missing and unknown signals.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot address the following outstanding work in one pass:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/check_version_updates.cjs:251): The provenance compatibility gate is gated on GH_AW_HAS_SAFE_OUTPUTS === "true", but that environment variable is only emitted by the newer compiler (addActivationVersionCheckStep in pkg/workflow/compiler_activation_steps.go). Workflows compiled with pre-v0.91.10 versions — precisely the stale workflows this check is meant to reject — never set it, so requiresExecutionProvenance is always false and the activation check is a no-op for them. Derive the "has safe outputs" signal from something present in older generated workflows (o... - Fail activation early for stale provenance workflows #70348 (comment)

Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI.

Sous-chef head: bc85ee4
Sous-chef work: 7697e9013aa63647d4adbaefd1ca70553cfaf6f45d563705968010bca9a26c5b
Sous-chef state: 7456a1717b121cd8b61d3d57992707ef8d8eef78a915afb937eb3059d0353ad0

Generated by 👨‍🍳 PR Sous Chef · pi · haiku45 · 4.57 AIC · ⌖ 9.77 AIC · ⊞ 1.1K · ◷
Comment /souschef to run again

…up-dependency-issue

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@pelikhan
pelikhan merged commit ac138cc into main Oct 20, 2026
49 checks passed
@pelikhan
pelikhan deleted the copilot/fix-gh-aw-setup-dependency-issue branch October 20, 2026 01:33
@github-actions

Copy link
Copy Markdown
Contributor

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.

Setup-only dependency upgrades pass activation but fail safe outputs: GH_AW_JOB_CHECK_RUN_ID

5 participants