Fix workflow lint and policy-check regressions#21
Conversation
- fix yamllint spacing issue in dependabot workflow - remove disallowed global strict mode usage in workflow bash scripts - fix shellcheck SC2320 in write-summary scripts - apply ruff format to simulate-workflows test file Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
ai-lab/.github/workflows/scripts/ci/get-changed-files.sh
Lines 17 to 19 in 757741b
With set -e removed, shift 2 no longer aborts when an option is missing its value. For example, bash .github/workflows/scripts/ci/get-changed-files.sh --base now leaves $1 unchanged after the failed shift, so the while loop keeps processing --base until the runner times out instead of returning a usage error. Add explicit value/shift validation for each two-argument option.
ℹ️ 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".
| head="$2" | ||
|
|
||
| set -euo pipefail | ||
| files=$(bash .github/workflows/scripts/ci/get-changed-files.sh --base "${base}" --head "${head}" --include 'ai-artifacts/**/tests/test_*.py') |
There was a problem hiding this comment.
Fail test discovery when diff listing fails
In .github/workflows/python-tests.yml, steps.discover.outputs.count gates whether pytest runs or the job reports no tests. After removing set -e, a non-zero exit from get-changed-files.sh here (for example an empty base/head from the diff output or direct script reuse) is ignored; the script writes an empty list with count=0 and exits successfully, so changed tests can be skipped instead of failing the job. Capture and check the helper exit code explicitly.
Useful? React with 👍 / 👎.
* Reorganize AI artifacts under ai-artifacts * Fix follow-up doc path references * fix: resolve ruff linting errors in mail_to_adoc.py (E401, E702, F401) * fix: format mail-to-adoc Python files * Fix markdownlint errors in PR-modified markdown files - Run markdownlint --fix to auto-fix MD049/MD047/MD022/MD032/MD034/MD029 - Fix MD025 (multiple H1): change # Skill Metadata and # Citations to ## in all METADATA.md files; change # Citations to ## in docs/okf-adoption.md - Fix MD025 in .markdownlint.json: set front_matter_title to empty string so files with YAML frontmatter title + body H1 don't trigger false positives - Fix MD040 (fenced code without language): add 'text' language to 6 code blocks - Fix MD036 (emphasis as heading): convert bold examples to #### headings in session/caveman/SKILL.md - Fix MD060 (table column alignment): reformat tables with proper padding, using display-width-aware alignment for emoji characters * Fix script tag stripping in mail-to-adoc * Harden script stripping in mail-to-adoc * chore: apply requested markdownlint rules * markdownlint config sorted properly * Reorganize shared skills and workflow tooling * Fix workflow lint and policy check failures (#21) - fix yamllint spacing issue in dependabot workflow - remove disallowed global strict mode usage in workflow bash scripts - fix shellcheck SC2320 in write-summary scripts - apply ruff format to simulate-workflows test file Co-authored-by: Dennis Winter <dennis.winter@example.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: align markdown tables for config-lint --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Dennis Winter <dennis.winter@example.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Goal
Resolve CI failures reported in config-lint, shell-quality, python-quality, and policy-check so the workflow script suite passes with current repo guardrails.
Plan
Scope
.github/workflows/dependabot-auto-merge.ymlto fix YAML comment spacing..github/workflows/scripts/**:set -e...strict-mode declarations in scripts flagged by policy checks.write-summary.sherror branches to avoidSC2320(rc=$?after additional commands).ai-artifacts/skills/shared/workflow/simulate-workflows/tests/test_simulate_workflows.pyto satisfy Ruff format check.Policy compliance
Complies with
coding-policies/polyglot-policy.yamland bash policy constraints used by.github/workflows/scripts/validate-coding-policies.py.No policy exceptions introduced.
Risk
Low. Changes are limited to workflow/lint helper scripts and formatting, with no product/runtime behavior changes.
Rollback
Revert commit
757741bto restore previous workflow script behavior.Evidence
.github/workflows/dependabot-auto-merge.ymlSC2320in multiplewrite-summary.shscriptsno_global_strict_modeviolations in workflow scriptstest_simulate_workflows.pypython .github/workflows/scripts/validate-coding-policies.py-> passedpython .github/workflows/scripts/validate-powershell-runtime.py-> passedyamllinton dependabot workflow -> passedruff format --checkon updated test file -> passedshellcheckon workflow*.shscripts -> passed