Fix: quote 0x literals in workflows; add workflow YAML guard#3829
Fix: quote 0x literals in workflows; add workflow YAML guard#3829MontrealAI wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bb1185159
ℹ️ 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".
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| matches=$(rg -n --pcre2 ":\s*0x[0-9a-fA-F]{16,}\\b" .github/workflows || true) |
There was a problem hiding this comment.
Fail the guard when ripgrep cannot run
The || true here suppresses any failure from the rg invocation, so if ripgrep isn’t installed on a developer machine or it errors while scanning .github/workflows, the script exits successfully with an empty match set and ci:preflight won’t enforce the YAML guard at all. This creates a false sense of safety because the guard can silently skip the check exactly when it is needed.
Useful? React with 👍 / 👎.
Motivation
0x...hex literals in.github/workflows/*.ymlwere being parsed as YAML ints and causing YAML parse errors before jobs ran.0xliterals are reintroduced in future changes.Description
0x[0-9a-fA-F]{16,}literals across workflow files under.github/workflows/(notablydemo-asi-global,demo-asi-takeoff,demo-aurora, and multipledemo-zenith-*workflows). Only surrounding quotes were added; values were not modified.scripts/ci/verify-workflow-yaml.sh, a small checker thatrg/greps for unquoted0xliterals and exits non-zero with a helpful message when found.ci:verify-workflow-yamland wire it into the existingci:preflightscript so workflow YAML issues fail fast during preflight.Testing
npm cisuccessfully to install dependencies.npm run ci:preflightwhich executed the newci:verify-workflow-yamland the existing toolchain/lock checks and succeeded.bash scripts/ci/verify-workflow-yaml.shand it returned success (no offending lines detected).npm run ci:verify-toolchain,npm run ci:sync-contexts -- --check,npm run ci:verify-contexts,npm run ci:verify-companion-contexts, andnpm run ci:verify-summary-needs, all of which completed successfully.Codex Task