Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request adds Windows support to the CI pipeline by introducing an OS matrix for test execution, creating OS-specific setup steps for Framework CLI linking, and establishing a Windows batch wrapper script for the CLI tool. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci-python.yml:
- Around line 18-24: The matrix definition uses an invalid runner label
'gh-windows-latest' for matrix.os which prevents the workflow from running;
update the matrix value in the matrix: os list (reference: matrix.os in the job
named 'Test: Python Requirements') replacing 'gh-windows-latest' with the
correct GitHub Actions runner label 'windows-latest' so the job can be scheduled
on Windows hosts.
| name: 'Test: Python Requirements (${{ matrix.os }})' | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| runs-on: ubuntu-latest | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, gh-windows-latest] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Runner labels in ci-python.yml ==="
cat -n .github/workflows/ci-python.yml | sed -n '18,24p'
echo -e "\n=== Checking for actionlint config files ==="
fd -t f 'actionlint' . --max-depth 3 2>/dev/null || echo "No actionlint config found"
echo -e "\n=== Checking .github directory structure ==="
ls -la .github/ 2>/dev/null | grep -E '\.(ya?ml|json)$' || true
echo -e "\n=== Searching for gh-windows-latest references in repo ==="
rg 'gh-windows-latest' --type yaml --type yml . 2>/dev/null | head -20 || echo "No matches found"
echo -e "\n=== Checking for windows runner references ==="
rg 'windows-latest' --type yaml . 2>/dev/null | head -20 || echo "No matches found"
echo -e "\n=== Full ci-python.yml content ==="
cat -n .github/workflows/ci-python.ymlRepository: serverless/serverless
Length of output: 3917
🌐 Web query:
GitHub Actions valid runner labels ubuntu-latest windows-latest
💡 Result:
For GitHub-hosted runners, ubuntu-latest and windows-latest are moving aliases that point to the newest generally-available image.
Current mappings (as of March 2, 2026)
ubuntu-latest→ Ubuntu 24.04 (same asubuntu-24.04) [1]windows-latest→ Windows Server 2025 (same aswindows-2025) [2]
Common “pinned” alternatives (recommended for stability)
- Ubuntu:
ubuntu-24.04,ubuntu-22.04[2] - Windows:
windows-2025,windows-2022(andwindows-2025-vs2026is listed as public preview) [2]
Sources: GitHub Docs (GitHub-hosted runners reference) [2] and the actions/runner-images “Available Images” table [1].
Invalid Windows runner label blocks the workflow.
At line 24, gh-windows-latest is not a valid GitHub Actions runner label. The correct label is windows-latest. This will prevent the job from being scheduled.
Fix
matrix:
- os: [ubuntu-latest, gh-windows-latest]
+ os: [ubuntu-latest, windows-latest]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| name: 'Test: Python Requirements (${{ matrix.os }})' | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, gh-windows-latest] | |
| name: 'Test: Python Requirements (${{ matrix.os }})' | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] |
🧰 Tools
🪛 actionlint (1.7.11)
[error] 24-24: label "gh-windows-latest" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/ci-python.yml around lines 18 - 24, The matrix definition
uses an invalid runner label 'gh-windows-latest' for matrix.os which prevents
the workflow from running; update the matrix value in the matrix: os list
(reference: matrix.os in the job named 'Test: Python Requirements') replacing
'gh-windows-latest' with the correct GitHub Actions runner label
'windows-latest' so the job can be scheduled on Windows hosts.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 110eaefee5
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, gh-windows-latest] |
There was a problem hiding this comment.
Gate Windows matrix until path-separator tests are consistent
Adding gh-windows-latest to this workflow makes the Python test suite self-contradictory on Windows: existing assertions in packages/sf-core/tests/python/test.js still check zipfiles.includes(flask${sep}init.py) and zipfiles.includes(boto3${sep}init.py) (e.g., around lines 263-264 and 349-350), which require backslashes when sep is \\, while the new test (lines 268-285) requires no backslashes and explicit / entries. Because npm run test:python runs all tests in one job, the Windows matrix leg will fail deterministically.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/ci-python.yml (1)
21-24:⚠️ Potential issue | 🔴 CriticalInvalid matrix runner label still blocks Windows CI.
gh-windows-latestis not a valid GitHub-hosted runner label, so this job cannot be scheduled on Windows.Suggested fix
strategy: fail-fast: false matrix: - os: [ubuntu-latest, gh-windows-latest] + os: [ubuntu-latest, windows-latest]#!/bin/bash set -euo pipefail echo "Checking matrix labels in .github/workflows/ci-python.yml" rg -n 'matrix:|os:|gh-windows-latest|windows-latest' .github/workflows/ci-python.yml -n -C2 echo echo "Optional: run actionlint if available" if command -v actionlint >/dev/null 2>&1; then actionlint .github/workflows/ci-python.yml else echo "actionlint not installed in this environment" fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci-python.yml around lines 21 - 24, The CI matrix uses an invalid runner label ("gh-windows-latest") under the "matrix" -> "os" entries which prevents scheduling Windows jobs; update the matrix entry to use the correct GitHub-hosted runner label ("windows-latest") instead of "gh-windows-latest" (so the "os" array becomes [ubuntu-latest, windows-latest]) and optionally validate the workflow with actionlint or the provided grep checks to ensure no other invalid labels remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/ci-python.yml:
- Around line 21-24: The CI matrix uses an invalid runner label
("gh-windows-latest") under the "matrix" -> "os" entries which prevents
scheduling Windows jobs; update the matrix entry to use the correct
GitHub-hosted runner label ("windows-latest") instead of "gh-windows-latest" (so
the "os" array becomes [ubuntu-latest, windows-latest]) and optionally validate
the workflow with actionlint or the provided grep checks to ensure no other
invalid labels remain.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50a3907766
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, gh-windows-latest] |
There was a problem hiding this comment.
Gate Windows matrix until zip-path assertions are consistent
Adding gh-windows-latest here makes the Python suite deterministically fail because this commit now contains mutually exclusive expectations for zip entry separators: the new test requires forward slashes (flask/__init__.py, boto3/__init__.py) while existing tests in the same file still assert flask${sep}__init__.py/boto3${sep}__init__.py (e.g., lines 263-264 and 349-350), which become backslash checks on Windows; at least one set must fail on every Windows run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/ci-python.yml (1)
24-24:⚠️ Potential issue | 🔴 CriticalUse a valid GitHub-hosted Windows runner label.
Line 24 uses
gh-windows-latest, which is not a valid runner label and prevents job scheduling on Windows.Suggested fix
matrix: - os: [ubuntu-latest, gh-windows-latest] + os: [ubuntu-latest, windows-latest]#!/bin/bash set -euo pipefail echo "Checking matrix runner labels in .github/workflows/ci-python.yml" cat -n .github/workflows/ci-python.yml | sed -n '20,26p' if command -v actionlint >/dev/null 2>&1; then echo echo "Running actionlint on workflow file..." actionlint -oneline .github/workflows/ci-python.yml else echo echo "actionlint not installed in this environment; install it and rerun for definitive validation." fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci-python.yml at line 24, The workflow matrix uses an invalid Windows runner label `gh-windows-latest` in the `os: [ubuntu-latest, gh-windows-latest]` entry; update that value to a valid GitHub-hosted runner label such as `windows-latest` (i.e., change `gh-windows-latest` → `windows-latest`) so the job can schedule on Windows, then validate the workflow with actionlint or by re-running the CI to ensure no other labels are invalid.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/ci-python.yml:
- Line 24: The workflow matrix uses an invalid Windows runner label
`gh-windows-latest` in the `os: [ubuntu-latest, gh-windows-latest]` entry;
update that value to a valid GitHub-hosted runner label such as `windows-latest`
(i.e., change `gh-windows-latest` → `windows-latest`) so the job can schedule on
Windows, then validate the workflow with actionlint or by re-running the CI to
ensure no other labels are invalid.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90c319e717
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * Creates a sls.cmd wrapper on Windows that points to the sf-core CLI. | ||
| * Used by CI to make `sls` available in PATH on Windows runners. | ||
| */ | ||
| const fs = require('fs') |
There was a problem hiding this comment.
Use ESM syntax in Windows setup script
The new Windows CI step runs node .github/setup-sls-cmd.js (.github/workflows/ci-python.yml), but this repository’s root package.json sets "type": "module", so .js files are treated as ES modules. Using require('fs') here throws ReferenceError: require is not defined in ES module scope, which causes the Windows matrix leg to fail before tests even start. Converting this file to ESM imports (or renaming it to .cjs) is needed for the workflow to run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/ci-python.yml (1)
24-24:⚠️ Potential issue | 🔴 CriticalInvalid Windows runner label blocks job scheduling.
Line 24 uses
gh-windows-latest, which is not a valid GitHub-hosted runner label; usewindows-latest.Suggested fix
- os: [ubuntu-latest, gh-windows-latest] + os: [ubuntu-latest, windows-latest]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci-python.yml at line 24, The matrix `os` entry uses an invalid runner label `gh-windows-latest` which prevents job scheduling; update the `os` matrix (the line containing `os: [ubuntu-latest, gh-windows-latest]`) to replace `gh-windows-latest` with the supported `windows-latest` label so the CI can run on Windows-hosted runners.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/ci-python.yml:
- Line 24: The matrix `os` entry uses an invalid runner label
`gh-windows-latest` which prevents job scheduling; update the `os` matrix (the
line containing `os: [ubuntu-latest, gh-windows-latest]`) to replace
`gh-windows-latest` with the supported `windows-latest` label so the CI can run
on Windows-hosted runners.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/ci-python.yml (1)
24-24:⚠️ Potential issue | 🔴 CriticalInvalid Windows runner label blocks job scheduling.
Line 24 uses
gh-windows-latest, which is not a valid GitHub-hosted runner label. Usewindows-latestso the matrix job can be scheduled.Suggested fix
- os: [ubuntu-latest, gh-windows-latest] + os: [ubuntu-latest, windows-latest]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci-python.yml at line 24, The GitHub Actions matrix entry using the os key contains an invalid runner label 'gh-windows-latest' which prevents job scheduling; update the matrix value for os (the line with "os: [ubuntu-latest, gh-windows-latest]") to use the valid hosted runner label 'windows-latest' (i.e., replace 'gh-windows-latest' with 'windows-latest') so the matrix job can run on Windows.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/ci-python.yml:
- Line 24: The GitHub Actions matrix entry using the os key contains an invalid
runner label 'gh-windows-latest' which prevents job scheduling; update the
matrix value for os (the line with "os: [ubuntu-latest, gh-windows-latest]") to
use the valid hosted runner label 'windows-latest' (i.e., replace
'gh-windows-latest' with 'windows-latest') so the matrix job can run on Windows.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba16d48f43
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, gh-windows-latest] |
There was a problem hiding this comment.
Remove Windows matrix until zip-entry assertions are updated
Enabling gh-windows-latest here will make npm run test:python fail deterministically because this commit also forces injected zip paths to forward slashes in packages/serverless/lib/plugins/python/lib/inject.js (.replace(/\\/g, '/')), while many existing assertions in packages/sf-core/tests/python/test.js still check zipfiles.includes(...${sep}...), which resolves to backslashes on Windows. At least one large set of assertions will fail on every Windows run until those tests stop using sep for zip entry names.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90d6beafa0
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| nodir: true, | ||
| dot: true, | ||
| follow: true, | ||
| windowsPathsNoEscape: true, |
There was a problem hiding this comment.
Normalize ZIP entry paths after enabling Windows glob mode
Enabling windowsPathsNoEscape here makes globSync return Windows-style file paths, but the injected zip entry names are still built with path.join(...), so on Windows they are written with backslashes (for example flask\\__init__.py). JSZip preserves those separators instead of converting them to /, which breaks ZIP path normalization and causes the new Windows path-format assertions to fail when requirements are injected.
Useful? React with 👍 / 👎.
Summary by CodeRabbit
Tests
Chores