Repository navigation
[codex] Add reusable cross-OS release checks workflow - #66812
Conversation
099fa06 to
6d10e42
Compare
Greptile SummaryThis PR adds a reusable public GitHub Actions workflow (
Confidence Score: 3/5Not safe to merge — the upload/download artifact version mismatch will break the workflow at runtime for every invocation. The P1 artifact action version mismatch (upload@v7 vs download@v8) means the workflow will fail every time it is called, defeating the entire purpose of the PR. This needs to be fixed before the workflow is useful.
Prompt To Fix All With AIThis is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 184-196
Comment:
**Mismatched upload/download artifact action versions**
Artifacts are uploaded with `actions/upload-artifact@v7` but downloaded with `actions/download-artifact@v8`. In the GitHub Actions ecosystem, the upload and download artifact actions must be on the same major version to share the same artifact backend — a version mismatch will cause the download step to fail to locate artifacts written by the upload step. Both should be pinned to the same major version.
```suggestion
- name: Upload candidate artifact
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-candidate-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/package/${{ steps.candidate_metadata.outputs.file_name }}
if-no-files-found: error
- name: Upload baseline artifact
if: ${{ inputs.mode != 'fresh' }}
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-baseline-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/baseline/${{ steps.baseline_metadata.outputs.file_name }}
if-no-files-found: error
```
The same fix applies to the `Upload release-check artifacts` step (line 315).
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 314-320
Comment:
**Upload artifact version also mismatched here**
This step uses `actions/upload-artifact@v7` while the corresponding download in the `prepare` job uses `actions/download-artifact@v8`. As noted above, both upload and download actions must be the same major version. This step should also be bumped to `@v8`.
```suggestion
- name: Upload release-check artifacts
if: always()
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }}
if-no-files-found: error
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 314-320
Comment:
**`if-no-files-found: error` may double-fail on aborted runs**
This step runs with `if: always()` so it executes even when the release-check script fails, but `if-no-files-found: error` will surface an additional job failure if the script terminated before writing any output files to the directory. Consider `if-no-files-found: warn` here so diagnostic context (partial logs, etc.) is still captured without masking the primary failure with a secondary one.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Actions: add reusable cross-OS release c..." | Re-trigger Greptile |
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: openclaw-cross-os-release-checks-candidate-${{ github.run_id }} | ||
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/package/${{ steps.candidate_metadata.outputs.file_name }} | ||
| if-no-files-found: error | ||
|
|
||
| - name: Upload baseline artifact | ||
| if: ${{ inputs.mode != 'fresh' }} | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: openclaw-cross-os-release-checks-baseline-${{ github.run_id }} | ||
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/baseline/${{ steps.baseline_metadata.outputs.file_name }} | ||
| if-no-files-found: error |
There was a problem hiding this comment.
Mismatched upload/download artifact action versions
Artifacts are uploaded with actions/upload-artifact@v7 but downloaded with actions/download-artifact@v8. In the GitHub Actions ecosystem, the upload and download artifact actions must be on the same major version to share the same artifact backend — a version mismatch will cause the download step to fail to locate artifacts written by the upload step. Both should be pinned to the same major version.
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: openclaw-cross-os-release-checks-candidate-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/package/${{ steps.candidate_metadata.outputs.file_name }} | |
| if-no-files-found: error | |
| - name: Upload baseline artifact | |
| if: ${{ inputs.mode != 'fresh' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: openclaw-cross-os-release-checks-baseline-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/baseline/${{ steps.baseline_metadata.outputs.file_name }} | |
| if-no-files-found: error | |
| - name: Upload candidate artifact | |
| uses: actions/upload-artifact@v8 | |
| with: | |
| name: openclaw-cross-os-release-checks-candidate-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/package/${{ steps.candidate_metadata.outputs.file_name }} | |
| if-no-files-found: error | |
| - name: Upload baseline artifact | |
| if: ${{ inputs.mode != 'fresh' }} | |
| uses: actions/upload-artifact@v8 | |
| with: | |
| name: openclaw-cross-os-release-checks-baseline-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/baseline/${{ steps.baseline_metadata.outputs.file_name }} | |
| if-no-files-found: error |
The same fix applies to the Upload release-check artifacts step (line 315).
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 184-196
Comment:
**Mismatched upload/download artifact action versions**
Artifacts are uploaded with `actions/upload-artifact@v7` but downloaded with `actions/download-artifact@v8`. In the GitHub Actions ecosystem, the upload and download artifact actions must be on the same major version to share the same artifact backend — a version mismatch will cause the download step to fail to locate artifacts written by the upload step. Both should be pinned to the same major version.
```suggestion
- name: Upload candidate artifact
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-candidate-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/package/${{ steps.candidate_metadata.outputs.file_name }}
if-no-files-found: error
- name: Upload baseline artifact
if: ${{ inputs.mode != 'fresh' }}
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-baseline-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/prepare/baseline/${{ steps.baseline_metadata.outputs.file_name }}
if-no-files-found: error
```
The same fix applies to the `Upload release-check artifacts` step (line 315).
How can I resolve this? If you propose a fix, please make it concise.| - name: Upload release-check artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }} | ||
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }} | ||
| if-no-files-found: error |
There was a problem hiding this comment.
Upload artifact version also mismatched here
This step uses actions/upload-artifact@v7 while the corresponding download in the prepare job uses actions/download-artifact@v8. As noted above, both upload and download actions must be the same major version. This step should also be bumped to @v8.
| - name: Upload release-check artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }} | |
| if-no-files-found: error | |
| - name: Upload release-check artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v8 | |
| with: | |
| name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }} | |
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }} | |
| if-no-files-found: error |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 314-320
Comment:
**Upload artifact version also mismatched here**
This step uses `actions/upload-artifact@v7` while the corresponding download in the `prepare` job uses `actions/download-artifact@v8`. As noted above, both upload and download actions must be the same major version. This step should also be bumped to `@v8`.
```suggestion
- name: Upload release-check artifacts
if: always()
uses: actions/upload-artifact@v8
with:
name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }}
path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }}
if-no-files-found: error
```
How can I resolve this? If you propose a fix, please make it concise.| - name: Upload release-check artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: openclaw-cross-os-release-checks-${{ matrix.artifact_name }}-${{ matrix.lane }}-${{ github.run_id }} | ||
| path: ${{ runner.temp }}/openclaw-cross-os-release-checks/${{ matrix.artifact_name }}-${{ matrix.lane }} | ||
| if-no-files-found: error |
There was a problem hiding this comment.
if-no-files-found: error may double-fail on aborted runs
This step runs with if: always() so it executes even when the release-check script fails, but if-no-files-found: error will surface an additional job failure if the script terminated before writing any output files to the directory. Consider if-no-files-found: warn here so diagnostic context (partial logs, etc.) is still captured without masking the primary failure with a secondary one.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/openclaw-cross-os-release-checks-reusable.yml
Line: 314-320
Comment:
**`if-no-files-found: error` may double-fail on aborted runs**
This step runs with `if: always()` so it executes even when the release-check script fails, but `if-no-files-found: error` will surface an additional job failure if the script terminated before writing any output files to the directory. Consider `if-no-files-found: warn` here so diagnostic context (partial logs, etc.) is still captured without masking the primary failure with a secondary one.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d10e42aaf
ℹ️ 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".
| repository: ${{ env.OPENCLAW_REPOSITORY }} | ||
| ref: ${{ inputs.ref }} | ||
| path: source |
There was a problem hiding this comment.
Validate ref input before checking out and running checks
This workflow checks out ${{ inputs.ref }} directly and later runs the cross-OS test step with provider secrets in the environment, but it never constrains ref to release tags or the current main SHA. If a caller forwards an unvalidated manual input (for example refs/pull/.../head), the job can execute unreviewed code paths during install/upgrade validation with live API keys available, which is a secret-exposure risk. Add the same ref-format and main-ancestry guard used in the release-check workflow before checkout.
Useful? React with 👍 / 👎.
| const lanes = (process.env.INPUT_MODE ?? "both") === "both" ? ["fresh", "upgrade"] : [process.env.INPUT_MODE ?? "both"]; | ||
| const runners = [ |
There was a problem hiding this comment.
Reject unsupported mode values before building matrix
mode is treated as free-form text: anything other than exact both becomes a single lane value, so typos like Both or both generate a nonstandard lane. That lane then skips baseline download (if: matrix.lane == 'upgrade') while still invoking the script, producing confusing runtime failures instead of a fast input error. Add an explicit allowlist check for fresh|upgrade|both in prepare before computing the matrix.
Useful? React with 👍 / 👎.
Summary
Testing