Skip to content

ci(bench): install PowerShell from the pinned 7.5.4 tarball - #466

Merged
lazyxeon merged 2 commits into
mainfrom
cursor/benchmark-pwsh-a959
Oct 28, 2026
Merged

lazyxeon merged 2 commits into
mainfrom
cursor/benchmark-pwsh-a959

Conversation

@lazyxeon

@lazyxeon lazyxeon commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Rebased onto main 99382af7. Head 3e0d0fef.

benchmark-and-deploy on run 40438097478 finished the benchmarks and then failed in Install PowerShell. Ubuntu 26.04 apt-get install -y powershell exits 100 with Unable to locate package powershell. The ubuntu-26.04 image already has pwsh 7.6.6 on PATH, installed under /opt/microsoft/powershell/7.

The first revision of this branch extracted PowerShell 7.5.4 into that same prefix. That downgraded the image binary, left files that 7.5.4 does not ship, and pinned the job to the .NET 9.0.10 runtime inside the 7.5.4 archive. That install is gone.

The step now runs the image pwsh when command -v pwsh succeeds. It calls apt-get install only when pwsh is absent, the same guard benchmark.yml uses. It does not extract a tarball and does not write /opt/microsoft/powershell/7. The export and threshold steps still call pwsh.

actionlint 1.7.7 reports no findings on .github/workflows/benchmark-dashboard.yml.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement

Security Considerations

  • Does this PR introduce new dependencies? No. It does not download a PowerShell tarball.
  • Does this PR modify how user input is handled? No.
  • Does this PR change authentication or authorization mechanisms? No.
  • Does this PR access sensitive data or modify how it's stored? No.
  • Does this PR introduce new network communication or modify existing protocols? No. apt-get runs only when pwsh is not already on PATH.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • The workflow YAML parses
  • actionlint 1.7.7 reports no findings on benchmark-dashboard.yml
  • Pull-request CI on 3e0d0fef is still running
Open in Web Open in Cursor 

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-27T21:14:31.749341Z 75403f8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Head 75403f8c367826f05057f20a3fd5d347a565b3a3. The SHA-256 pin matches the PowerShell 7.5.4 release. The install prefix is the image's existing PowerShell 7.6.6 tree, so this step downgrades pwsh instead of filling a missing binary.

Holds

  • Official hashes.sha256 and the GitHub asset digest are both 1fd7983fe56ca9e6233f126925edb24bf6b6b33e356b69996d925c4db94e2fef for powershell-7.5.4-linux-x64.tar.gz (75396784 bytes). A local download passed sha256sum -c.
  • set -euo pipefail checks that hash before tar. A mismatch fails the step. No GITHUB_TOKEN is sent with the download.
  • The apt comment matches schedule run 40438097478 (job 121971584242, main 3209fa1f, image ubuntu-26.04 20261012.163): packages.microsoft.com resolute is configured, and apt-get install -y powershell exits with Unable to locate package powershell.
  • No Cargo.lock change, no new crate, no RUSTSEC ignore, no new continue-on-error, and the permissions block is unchanged. benchmark.yml only apt-installs PowerShell when Get-Command pwsh fails, and that step already runs under shell: pwsh, so it is not this failure.

Determinism

Replay crates are untouched. Expected hashes unchanged. Hash jobs were still queued, so they were not treated as green. GPU frame not measured. This workflow does not run on pull_request; the first execution is the push to main that this path filter selects, and that job has contents: write and pages: write.

Commands

  • git diff 07306de0...75403f8c: exit 0 (one file, +16/-2).
  • sha256sum -c on the 7.5.4 tarball: exit 0.
  • Clean 7.5.4 pwsh -NoLogo -Command: exit 0, printed 7.5.4 (this host is Ubuntu 24.04, ICU 74).
  • 7.6.6 tree with 7.5.4 extracted over it: exit 0, printed 7.5.4. 21 paths from 7.6.6 remain.
  • Workflow YAML parse: exit 0. actionlint is not installed here.

Not run: replay cargo test, Gate, and the 1660 Ti capture. This diff does not touch those crates or the renderer. No deferred-failure issue.

Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Ubuntu 26.04 has no powershell apt package, so benchmark-and-deploy
exited 100 after the benchmarks finished. Install the upstream
linux-x64 tarball, check its release hash, and keep the pwsh export
and threshold steps.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/benchmark-pwsh-a959 branch from 75403f8 to ebe7509 Compare October 27, 2026 23:32

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Head ebe75093b5d86341d5366307c89c8e63462d38f9. One file, .github/workflows/benchmark-dashboard.yml. The install prefix thread still stands: this step replaces the image PowerShell with 7.5.4.

Holds

  • SHA-256 1fd7983fe56ca9e6233f126925edb24bf6b6b33e356b69996d925c4db94e2fef matches the downloaded powershell-7.5.4-linux-x64.tar.gz (75396784 bytes), the GitHub release asset digest, and the official hashes.sha256 line (that file is UTF-16).
  • Archive members have no .., no absolute paths, and no setuid bits. The hash is checked before tar.
  • scripts/export_benchmark_jsonl.ps1 and scripts/check_benchmark_thresholds.ps1 do not read $PSVersionTable. On 7.5.4, ConvertTo-Json -Compress and ConvertFrom-Json returned the nested field.
  • This pull request does not change Cargo.toml or Cargo.lock. Permissions are unchanged. No new continue-on-error and no audit ignore.
  • actionlint 1.7.7 exited 0. The workflow YAML parses.

Defect

Run 40438097478 (job 121971584242) is ubuntu-26.04 image 20261012.163.1. Install PowerShell dies with E: Unable to locate package powershell after packages.microsoft.com resolute is already configured. The current image readme (20261023.163.3) still lists PowerShell 7.6.6 and libicu-dev 78.2. install-powershell.sh in actions/runner-images takes the tarball path when is_ubuntu26, extracts into /opt/microsoft/powershell/7, and links /usr/bin/pwsh. pwsh is already on PATH.

sudo tar into that prefix leaves 21 paths from 7.6.6. One of them is Modules/Microsoft.PowerShell.ThreadJob 2.2.0, which Get-Module -ListAvailable reports beside 7.5.4's ThreadJob 2.0.3. On Ubuntu 24.04 (libicu74) a clean 7.5.4 tree and a 7.6.6 tree with 7.5.4 extracted over it both print 7.5.4 / .NET 9.0.10, and both ThreadJob modules import. /usr/bin/pwsh points at the same prefix, so the symlink at /usr/local/bin/pwsh does not keep the image binary. That run was not repeated on ICU 78.

7.5.4's pwsh.runtimeconfig.json includes Microsoft.NETCore.App 9.0.10. The 7.6.6 archive includes 10.0.12. The .NET support policy page, updated 2026-10-25, lists the .NET 9 patch as 9.0.22 (maintenance, end of support 2026-11-10) and the .NET 10 patch as 10.0.14 (LTS through 2028-11-14). A self-contained app keeps its own runtime, so this pin stays on 9.0.10. pwsh.deps.json does not reference System.Security.Cryptography.Cose, so GHSA-qvhc-9v3j-5rfw does not apply to this tarball.

Delete the step and call the image pwsh. A fallback for an image with no pwsh belongs in an empty directory, and 7.5.4 is the wrong pin.

benchmark.yml still apt-installs powershell only when Get-Command pwsh fails, and that step's shell is already pwsh. On this image the guard is false.

Commands

  • sha256sum of the 7.5.4 tarball matched, exit 0. The 7.6.6 tarball digest matched the GitHub asset.
  • Clean and overlaid pwsh -NoLogo exited 0 on Ubuntu 24.04.
  • actionlint 1.7.7 exited 0.

Not run

  • This workflow has no pull_request trigger, so the new step does not run here. Not executed on ubuntu-26.04.
  • Replay hash tests. The diff does not touch a hashed crate. The replay jobs on this SHA were still pending and do not run this workflow.
  • GPU frame budget: not measured. This change does not render.

Replay hashes: expected unchanged. No golden edited.

Deferred: none.

Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

ubuntu-26.04 already has pwsh 7.6.6 on PATH. Extracting 7.5.4 into
/opt/microsoft/powershell/7 replaced that binary and left the newer
files behind. Install PowerShell only when command -v pwsh fails.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Head 3e0d0fef32472498c8ada8c7ee2738b3ae2e2261. One file, .github/workflows/benchmark-dashboard.yml. The 7.5.4 overlay is gone. When command -v pwsh succeeds, the step prints the version and exits. The image binary stays in place.

Fixed

  • No curl, no digest check, no tar into /opt/microsoft/powershell/7, and no /usr/local/bin/pwsh link.
  • exit 0 stops the script after a successful probe. A local stub named pwsh printed 7.6.6 and exited 0 without reaching sudo.
  • '$PSVersionTable.PSVersion.ToString()' stays single-quoted through the YAML parse, so bash does not expand it.
  • scripts/export_benchmark_jsonl.ps1 and scripts/check_benchmark_thresholds.ps1 are unchanged and do not read $PSVersionTable. Schedule run 39532631733 (ubuntu-24.04, 2026-10-21) reached Export Complete with -Verbose.
  • No Cargo.toml or Cargo.lock change. Permissions stay contents: write, pages: write, id-token: write, issues: write. No new continue-on-error. No RUSTSEC ignore. There is no pull_request trigger, so a fork cannot run this job.

Defect

The apt-get install -y powershell branch is the command that failed the last six nightly runs. The inline comment has the detail.

Determinism

Replay crates are untouched. Expected hashes unchanged. This workflow is not in the replay compare job. GPU frame not measured.

Security

The success path does not download a shell. It uses the runner image pwsh (7.6 LTS on .NET 10), the same trust boundary as the rest of the job. The apt branch is unpinned. It does not run while pwsh is on PATH.

Residual

Check for Regressions still calls check_benchmark_thresholds.ps1 with the default benchmark_results/benchmarks.json. This workflow never writes that file. benchmark.yml does. Run 39532631733 logged Benchmark results not found, and the next step found open issue #184 (same title). continue-on-error: true kept that job green. That path is outside this diff. It runs again once install succeeds.

The comment names PowerShell 7.6.6. Readme 20261023.163.3 matches. Image update 20261026.180.1 lists 7.6.9. The probe prints the binary that is actually on PATH.

benchmark.yml still apt-installs powershell only when Get-Command pwsh fails, and that step already runs under shell: pwsh. On this image the guard is false.

Commands

  • git diff 99382af7...3e0d0fef: one file, +12. Exit 0.
  • actionlint 1.7.7: exit 0.
  • PyYAML safe_load: exit 0.
  • bash -n on the step script: exit 0.
  • Stub pwsh on PATH: exit 0.

Not run

  • This workflow has no pull_request trigger, so the new step does not run here. Not executed on ubuntu-26.04. This VM is Ubuntu 24.04 and has no pwsh.
  • Replay hash tests. The diff does not touch a hashed crate.
  • GPU frame budget: not measured. This change does not render.

Replay hashes: expected unchanged. No golden edited.

Deferred: none.

Open in Web View Automation 

Sent by Cursor Automation: ASTRA PR AUDIT AGENT

Comment on lines 71 to +74
sudo apt-get update
sudo apt-get install -y powershell
command -v pwsh
pwsh -NoLogo -Command '$PSVersionTable.PSVersion.ToString()'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These lines are the failure from schedule run 40438097478 (job 121971584242). That job ran on ubuntu-latest, which was image ubuntu-26.04 20261012.163.1. packages.microsoft.com resolute was already configured, and apt-get install -y powershell exited with E: Unable to locate package powershell. The same command has failed every nightly run from 2026-10-22 through 2026-10-27.

actions/runner-images install-powershell.sh still installs from the GitHub linux tarball when is_ubuntu26, extracts into /opt/microsoft/powershell/7, and links /usr/bin/pwsh, because the apt package is absent. Readme 20261023.163.3 lists PowerShell 7.6.6. Image update 20261026.180.1 lists 7.6.9. command -v pwsh is true on that image, so this branch does not run today. A stub pwsh on PATH took exit 0 and never reached sudo.

This branch is still the only recovery path, and it cannot succeed while ubuntu-latest is 26.04. The comment on this step already says the package is absent. Delete the apt-get lines. A missing pwsh should fail the step. An install fallback belongs in an empty directory, with a pinned digest, and not on the 7.5.4 tarball this branch just removed.

@lazyxeon
lazyxeon merged commit 7351fb4 into main Oct 28, 2026
34 checks passed
@lazyxeon
lazyxeon deleted the cursor/benchmark-pwsh-a959 branch October 28, 2026 03:19
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