Skip to content

Clarify GitHub CLI prerequisite for AWF installation - #77557

Closed
pelikhan wants to merge 5 commits into
mainfrom
copilot/fix-gh-prerequisite-install
Closed

pelikhan wants to merge 5 commits into
mainfrom
copilot/fix-gh-prerequisite-install

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

AWF installation on self-hosted runners without gh fails with gh: command not found during required release attestation verification. The runner documentation did not list this prerequisite.

  • Installer diagnostic: Check for gh before attestation verification and report how to resolve its absence. Verification remains mandatory.
  • Runner requirements: Document attestation-capable GitHub CLI on PATH for rootless and ARC/DinD installs, specifically in the runner container—not only the DinD sidecar.
  • Regression coverage: Assert missing gh produces an actionable error and fails closed.

@pelikhan pelikhan changed the title [WIP] Fix undocumented prerequisite for AWF installation Clarify GitHub CLI prerequisite for AWF installation Nov 13, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 22:32
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 22:32
@github-actions

github-actions Bot commented Nov 13, 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 · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output. Detected threat types: prompt injection.

Review the workflow run logs for details.

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

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

Generated by PR Specification Reviewer for #77557 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 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 by Ponytail Reviewer for #77557 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-13T22:36:04Z
review_event: COMMENT
top_themes:
  - prerequisite validation should verify gh attestation subcommand support
files_reviewed:
  - actions/setup/sh/release_integrity.sh
  - actions/setup/sh/release_integrity_test.sh
  - docs/src/content/docs/reference/arc-dind-copilot-agent.md
  - docs/src/content/docs/reference/self-hosted-runners.md
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷
Comment /review to run again

@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.

Review completed with one actionable compatibility issue.

Highlights

The new prerequisite check detects a missing gh binary, but not a GitHub CLI version that lacks gh attestation verify; such runners still receive a generic verification failure instead of the documented remediation.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

Comment thread actions/setup/sh/release_integrity.sh Outdated
verify_release_attestation() {
local file="$1" repository="$2" output status now deadline delay reason max_wait
local transient_retries=0 waited=0
if ! command -v gh >/dev/null 2>&1; then

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.

The guard only checks that a gh executable exists, so an older GitHub CLI without gh attestation verify still passes this prerequisite and then fails with the generic verification error this change is intended to make actionable.

💡 Validate the required subcommand before proceeding

Probe gh attestation verify --help (or enforce a documented minimum version) and emit the same prerequisite diagnostic when the subcommand is unavailable, so unsupported installations fail with clear remediation before release verification starts.

@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 to the gh guard and /tdd to its regression test. The guard is correct and fails closed, but the docs overstate the requirement, so requesting changes.

📋 Key Themes and Highlights

Key Themes

  • Docs accuracy: The attestation requirement is gated on AWF v0.29.5 and later (REQUIRE_ATTESTATION in install_awf_binary.sh), not on --rootless. Both docs pages should name that gate.
  • Guard precision: command -v gh passes for gh builds without the attestation subcommand, which then fails with an opaque error.
  • Test scope: The new test covers the function in isolation, not the installer path users hit.

Positive Highlights

  • ✅ The missing-gh path returns 1 before any network call, and the message names the fix. Verification is not skipped.
  • ✅ The test asserts stdout is empty and the diagnostic text is present, so it checks behavior rather than just exit status.
  • ✅ shellcheck --severity=error passes on both changed scripts.

Verification Notes

  • release_integrity_test.sh passes in full on this branch and on the reverted baseline when RUNNER_TEMP is writable. With the default RUNNER_TEMP in this sandbox it exits 1 at run_awf on both, so that failure is environmental and not caused by this PR.
  • Triage used the direct heuristic fallback, not the pr-triage agent.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

Comment thread actions/setup/sh/release_integrity.sh Outdated
verify_release_attestation() {
local file="$1" repository="$2" output status now deadline delay reason max_wait
local transient_retries=0 waited=0
if ! command -v gh >/dev/null 2>&1; then

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] The guard only checks that gh is on PATH. An older gh without the attestation subcommand passes this check and then fails inside gh attestation verify with a generic unknown command error, which is the opaque failure this PR is meant to fix.

💡 Suggested change
if ! command -v gh >/dev/null 2>&1 || ! gh attestation verify --help >/dev/null 2>&1; then

The probe is cheap and keeps the diagnostic accurate for old gh builds.

@copilot please address this.

# shellcheck source=actions/setup/sh/release_integrity.sh
source "$SCRIPT_DIR/release_integrity.sh"

attestation_status=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.

[/tdd] This block covers the guard in isolation. An installer-level case would pin the fail-closed behavior users actually hit: run install_awf_binary.sh for an attestation-required version (v0.29.5 or later) with no gh on PATH, then assert a non-zero exit, no installed awf binary, and the diagnostic in the output.

@copilot please address this.


The runner needs working Docker and Compose access, Node.js for framework scripts, and separate Copilot inference credentials/licensing/policy authorization. See [component prerequisites](/gh-aw/reference/enterprise-configuration/#component-versions-and-validation-evidence). The example chart commands do not pin or certify a chart version; validate and pin the chart, runner image, and pod configuration for your cluster.

Install [GitHub CLI (`gh`)](https://cli.github.com/) with `gh attestation verify` support in the **runner container**, on its `PATH` before the generated **Install AWF binary** step. AWF's rootless installer requires it to verify release attestations; installing it only in the DinD sidecar is insufficient. Verification cannot be skipped.

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.

Accuracy: The requirement is not tied to --rootless. install_awf_binary.sh enforces attestation only for AWF v0.29.5 and later (REQUIRE_ATTESTATION, lines 100–104), in rootless and sudo installs alike. Name that version gate here so older pins are not told to provision gh unnecessarily.

💡 Suggested wording

For AWF v0.29.5 and later, the installer requires gh with gh attestation verify support on PATH in the runner container, before the generated Install AWF binary step. Installing it only in the DinD sidecar is insufficient. Verification cannot be skipped.

@copilot please address this.


Runners must be Linux with Docker support. macOS and Windows are not supported.

AWF installation requires [GitHub CLI (`gh`)](https://cli.github.com/) with `gh attestation verify` support on the runner's `PATH`, including rootless and ARC/DinD installations. Provision it in the runner image or before the generated **Install AWF binary** step. Attestation verification is required and cannot be skipped. GitHub-hosted runners include `gh`; custom self-hosted images may not.

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.

Accuracy: Same version gate as above. Attestation is enforced only for AWF v0.29.5 and later, so this sentence overstates the requirement by naming rootless and ARC/DinD installs as unconditional. Qualify it with the version so operators on older AWF pins are not misled.

@copilot please address this.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-d4db640c-12a7-4b5d-912b-7d0a6ff4f1f8","parents":[],"payload":{"id":"ldg-3dc3f7ad-f5fe-45b1-abbe-e2ad31a2ca1d","operation":"append","value":{"finding_count":1,"head_sha":"f1da29fad6ae68863066969f42772248e1f526d3","outcome":"findings"}},"sha":"sha256:1efffff5770c9cea55670ea0d70a4d0415d4040237396f003040dd7728f11680","timestamp":"2026-11-13T22:42:24.692Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-cfd9169a-8fe5-4cd6-8ddf-a480dabe8ac2","parents":[],"payload":{"id":"ldg-a66f222b-cf2d-4410-a12b-33cbe29b1188","operation":"append","value":{"finding_count":0,"head_sha":"f1da29fad6ae68863066969f42772248e1f526d3","outcome":"aligned"}},"sha":"sha256:b0dae388d65ad6b8742277f7013280221865279dbdb459ae2fe982bf76ca3725","timestamp":"2026-11-13T22:43:42.984Z","type":"ledger_append","version":1}
History

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

Stale SHA-256 pins in workflow sources and compiled locks will reject the updated helper, blocking TLA+ setup in all four workflows and failing TestTLARuntimeWorkflowContracts.

1 open issue
What changed in this PR

Clarifies the GitHub CLI prerequisite for AWF installation on self-hosted runners while preserving mandatory release attestation verification.

Changes:

  • Adds an actionable error when gh is missing from PATH.
  • Documents the prerequisite for self-hosted and ARC/DinD runners, including installation in the runner container.
  • Adds regression coverage confirming missing gh fails closed with clear guidance.
File Description
docs/​src/​content/​docs/​reference/​self-hosted-runners.md Documents attestation-capable GitHub CLI as a runner prerequisite.
docs/​src/​content/​docs/​reference/​arc-dind-copilot-agent.md Specifies that gh belongs in the runner container, not just the DinD sidecar.
actions/​setup/​sh/​release_integrity.sh Checks for gh before attestation verification and reports remediation.
actions/​setup/​sh/​release_integrity_test.sh Checks failure status, diagnostic text, and empty standard output when gh is absent.

Review effort: Max (dynamic)

Comment thread actions/setup/sh/release_integrity.sh Outdated
Comment on lines +271 to +274
if ! command -v gh >/dev/null 2>&1; then
echo "ERROR: GitHub CLI (gh) is required for release attestation verification. Install gh with attestation support on the runner and ensure it is on PATH before running this installer. Verification cannot be skipped." >&2
return 1
fi
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/sh/release_integrity.sh:271): address unresolved feedback - Review comment
  3. Review (actions/setup/sh/release_integrity.sh:271): address unresolved feedback - Review comment
  4. Review (actions/setup/sh/release_integrity_test.sh:12): address unresolved feedback - Review comment
  5. Review (docs/src/content/docs/reference/arc-dind-copilot-agent.md:24): address unresolved feedback - Review comment
  6. Review (docs/src/content/docs/reference/self-hosted-runners.md:12): address unresolved feedback - Review comment
  7. Fix failing check push_evals_state (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "f1da29fad6ae68863066969f42772248e1f526d3",
  "kind": "requested",
  "schema_version": "1",
  "state": "d8f943da26392a453b2671dedea9569201cd69786e885286b651ca4e6875d1ae",
  "work": [
    "1a07b39a7e7083fb54e686df4588e999b70cc571f076ed0c03a29ef6b30f660b",
    "245c66e1e94c2fb96a2a65479ebfdd93bafb8f1840c58fbc391fab6e9fdbd6b9",
    "348310b95e1e5f27aae1a3825bc2522402e2f9cb6478a72c21de300a446d6a77",
    "da53055201c9cdebbb27eee66b2151e542d3388cafce62a79b37dc300e2313d5",
    "def9b0df2b145b4eeeb0c695b3a8225e9dd8127d5a68ee156602d28d59ab1fb5",
    "e498ae32d474404d7b55d3a6ccc5bc4f2ad14c86b99d382a51969a7d187da7e0"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

gh-aw-bot and others added 3 commits November 13, 2026 23:13
…uisite-install

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Copilot AI requested a review from gh-aw-bot November 14, 2026 00:02
@pelikhan pelikhan closed this Nov 14, 2026
@github-actions
github-actions Bot deleted the copilot/fix-gh-prerequisite-install branch November 21, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh is an undocumented prerequisite for installing AWF on self-hosted runners: "Install AWF binary" fails with "gh: command not found" (v1.2.2)

4 participants