Repository navigation
Add AWF installer failure and platform regression coverage - #76193
Conversation
Co-authored-by: gh-aw-bot <[email protected]>
|
Category: feature | Risk: medium | Score: 54 (Impact 26 + Urgency 14 + Quality 14) | Action: batch_review | Batch: agent-runtime | Summary: installer failure diagnostics and platform regression coverage; important but broad enough for the grouped reliability review.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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 Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ 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: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
Reviewed head 463d3f87a60cbe4d9a8fedef32e2cdb5275c93c2 against security architecture spec TT-01/TT-02 and compiler shell-boundary requirements.
Blocking finding: the new Windows regression assertion requires shell: bash, but the current AWF installer generator emits no shell override, leaving GitHub Actions to select PowerShell for windows-latest; the generated Bash command therefore is not covered by a passing regression. See the inline comment on pkg/workflow/awf_installer_integration_test.go:84.
No specification synchronization is proposed: this is an implementation/conformance gap, not an evidenced intentional contract change. Static review only; tests were not run per review policy.
Generated by PR Specification Reviewer for #76193 · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review-specs to run again
| t.Errorf("generated %s lock file lacks the pinned installer command:\n%s", runner, installStep) | ||
| } | ||
| if runner == "windows-latest" { | ||
| if !strings.Contains(installStep, "shell: bash") { |
There was a problem hiding this comment.
This regression assertion currently fails against the generator in pkg/workflow/copilot_engine_installation.go: the emitted AWF step always has run: bash "${RUNNER_TEMP}/... but no shell: bash, so on windows-latest GitHub Actions uses its default PowerShell shell and does not execute this Bash command as intended. Please update the generator (adding the explicit Bash shell only for Windows) or otherwise make the lock output satisfy this assertion before treating the platform regression as covered. This is especially important for the hardened AWF bootstrap covered by security architecture TT-01/TT-02.
There was a problem hiding this comment.
The lock test now asserts the exact pinned run: bash ... --rootless command, requires shell: bash on Windows, and rejects an explicit shell override on Linux. The focused lock test passes. Commit: b787dc0.
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found two test-quality issues in the added coverage:
- The curl diagnostic assertion checks only fake stderr passthrough, not the installer-generated error details.
- The lock-step extraction can fall back to the rest of the lock file when the install step is last, allowing unrelated content to satisfy shell assertions.
No runtime code issues were identified from the changed lines. Review was static; tests were not run per the review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| t.Fatalf("generated %s lock file lacks the AWF install step:\n%s", runner, lock) | ||
| } | ||
| installStepEnd := strings.Index(lockText[installStepStart+1:], "\n - ") | ||
| installStep := lockText[installStepStart:] |
There was a problem hiding this comment.
If the install step is the final step, installStep falls back to the remainder of the entire lock file. The shell checks can then match unrelated later content, weakening the regression test and potentially causing false results as generated steps change. Please bound the slice at the next step or the end of the steps section, and fail if the boundary cannot be identified.
There was a problem hiding this comment.
The lock test now bounds the install-step slice at the next step or end of the steps section and fails if it cannot identify that boundary. Commit: b787dc0.
| local expected_downloads=2 | ||
| if [ -n "$curl_failure_asset" ]; then | ||
| expected_downloads=$((expected_downloads + 1)) | ||
| if ! grep -qF "simulated curl network failure" "${test_dir}/output"; then |
There was a problem hiding this comment.
The assertion currently proves only that the fake curl stderr was inherited by the captured output. It does not verify the installer actual diagnostic (Failed to download awf-bundle.js plus the curl exit/status), so a change that drops or misformats the installer error could still pass. Please assert the installer-generated error details as well, or narrow the test description to stderr passthrough.
There was a problem hiding this comment.
The optional-download case now checks the installer’s Failed to download diagnostic and HTTP/curl exit details as well as the simulated curl stderr. Commit: b787dc0.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain in the supplied evidence.
No open issues 🎉
What changed in this PR
Adds regression coverage for AWF installer download diagnostics and platform-specific workflow lock generation, including checksum preservation and Windows Bash selection.
Changes:
- Simulates failed AWF bundle downloads and verifies underlying curl errors are retained.
- Adds Linux and Windows lock-generation coverage for checksum pins and shell behavior.
- Requires stronger assertions for the complete Windows Bash command and Linux’s absence of an explicit shell override.
This pull request requires changes.
| File | Summary |
|---|---|
pkg/workflow/awf_installer_integration_test.go |
Adds Linux and Windows lock-generation tests for checksum pins and shell selection. The assertions should verify the complete Windows run: bash ... command and ensure Linux has no step-level shell: override. |
actions/setup/sh/install_awf_binary_test.sh |
Adds simulated curl-failure coverage and verifies that underlying download diagnostics remain in installer output. |
Review effort: Lite (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /diagnosing-bugs. Requesting changes on one counting bug in the new bash case. The Go lock test is solid.
📋 Key Themes & Highlights
Key Themes
- Counting bug: line 248 overwrites the download count added at line 240, so
v0.29.xplus a failing asset expects 3 downloads and gets 4. Fix: use+ 1. - Coverage gap: the new case covers only the optional-bundle fallback. A required download failing (non-zero exit) has no diagnostics assertion.
Positive Highlights
- ✅ The mutation check works: reverting the
2>/dev/nulldiagnostics change makes the new case fail, while the rest of the suite passes at 22/22 on the baseline. - ✅
TestAWFInstallerLockUsesBashOnLinuxAndWindowsran both subtests and passes. It pins the checksum and the Bash-only-on-Windows behavior through the real compiler. - ✅ The
curl_failure_assetparameter is threaded through the harness cleanly and defaults to a no-op.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.3K
Comment /matt to run again
| else | ||
| fail "mismatched release identity was accepted" "$TEST_FAILURE_REASON" | ||
| fi | ||
| if test_curl_retry_all_errors '--retry-all-errors' true false '--retry-all-errors' v24.0.0 Linux v0.28.62 '' v0.28.62 awf-bundle.js; then |
There was a problem hiding this comment.
[/diagnosing-bugs] This case only exercises the optional awf-bundle.js fallback, where the installer recovers. The failure this PR targets, a required download (checksums or the binary) failing and exiting non-zero, has no diagnostics assertion. The harness returns early on a non-zero exit before the output check runs, so that path is currently untested.
💡 Suggested test
Add an expected-failure variant that asserts the installer exits non-zero and that its output contains both the simulated curl error and the ERROR: Failed to download <asset> line with the curl exit code. I confirmed that a failing awf-linux-x64 under Node v18 makes the installer exit non-zero, so this scenario is reachable from this harness.
@copilot please address this.
There was a problem hiding this comment.
Added an expected-failure test for a required checksums download: it requires a nonzero installer exit and checks the simulated curl error, failed asset, HTTP status, and curl exit code. Commit: b787dc0.
| fi | ||
| fi | ||
| if [ "$release_version" = v0.29.5 ] || [ "$release_version" = v0.29.6 ] || [ "$release_version" = v0.29.7 ]; then | ||
| expected_downloads=3 |
There was a problem hiding this comment.
[/tdd] Line 248 overwrites the +1 that the failing-asset block adds on line 240. For v0.29.5, v0.29.6 and v0.29.7 with a failing asset, the harness expects 3 downloads but the installer makes 4, so this combination fails spuriously.
💡 Suggested change
Change line 248 to an increment so both adjustments compose:
expected_downloads=$((expected_downloads + 1))Verified locally: a v0.29.5 run with a failing awf-bundle.js reports expected 3 downloads, got 4 before this change and passes after it. The full suite stays at 22/22.
@copilot please address this.
There was a problem hiding this comment.
The modern-release download count now increments rather than overwriting the failed-asset adjustment; the optional bundle failure test exercises that combined case on v0.29.5. Commit: b787dc0.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "463d3f87a60cbe4d9a8fedef32e2cdb5275c93c2",
"kind": "requested",
"schema_version": "1",
"state": "363f3996da899446210bc3ce1fe6465b675319cd17e5b490b78512f0ef30618f",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"84d44db58e38a1f12953f2030388172a12e3dd0c37d43074de61ddb8a690dff4",
"ce97ddf2bdd4823b9f4410534c4a6f17e955bb6e123d5e7694de7713559e1507",
"e5ab38bbd5181fc7cdc93a127d63135f972f7bf3c24d65204b38957c5e380ad8",
"efe1f598cb3445a811048f1b3e769f9168ef0623bad2928d399863a77a0c26a8",
"fcb34c5837af90ec12f7b590598907b91def766b15b0d61569197d53cdf45864"
],
"workflow": "pr-sous-chef"
}
|
…nary-installation-step Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
|
🍳 The prep is done, but CI needs another taste test. Copilot's assigned task has finished; these checks are still failing: Completed task
Flagging the remaining blockers for maintainer investigation, not starting another copy of the same task. Structured data{
"completed_task": 42625310989,
"head": "b787dc002945ef59c168083fdf558f7a711f4900",
"kind": "ci-follow-up",
"schema_version": "1",
"state": "ea1df1938408fe3816906d54718d203d11c750f772d45d00032b1ced173b16ab",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
|
🎉 This pull request is included in a new release. Release: |
AWF startup failures need actionable download diagnostics, and Windows-generated install steps must use the supported Bash shell. The installer already retries downloads and verifies checksums; this change adds regression coverage for those behaviors and platform-specific lock generation.