Skip to content

Fix workflow lint and policy-check regressions#21

Merged
DenWin merged 1 commit into
sharedSkills-changed-to-skillsSharedfrom
denwin-fix-quality-reports
Jul 10, 2026
Merged

Fix workflow lint and policy-check regressions#21
DenWin merged 1 commit into
sharedSkills-changed-to-skillsSharedfrom
denwin-fix-quality-reports

Conversation

@DenWin

@DenWin DenWin commented Jul 10, 2026

Copy link
Copy Markdown
Owner

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

  1. Apply the exact fixes indicated by CI reports (yamllint, shellcheck, ruff format).
  2. Update workflow shell scripts to satisfy the bash policy rule that forbids global strict mode.
  3. Re-run the relevant local validators to confirm the same failure signals are cleared.

Scope

  • Updated .github/workflows/dependabot-auto-merge.yml to fix YAML comment spacing.
  • Updated workflow shell scripts under .github/workflows/scripts/**:
    • Removed global set -e... strict-mode declarations in scripts flagged by policy checks.
    • Reworked write-summary.sh error branches to avoid SC2320 (rc=$? after additional commands).
  • Reformatted ai-artifacts/skills/shared/workflow/simulate-workflows/tests/test_simulate_workflows.py to satisfy Ruff format check.

Policy compliance

Complies with coding-policies/polyglot-policy.yaml and 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 757741b to restore previous workflow script behavior.

Evidence

  • CI report signals addressed:
    • yamllint spacing warning in .github/workflows/dependabot-auto-merge.yml
    • shellcheck SC2320 in multiple write-summary.sh scripts
    • bash policy no_global_strict_mode violations in workflow scripts
    • ruff format issue in test_simulate_workflows.py
  • Local validation run after fixes:
    • python .github/workflows/scripts/validate-coding-policies.py -> passed
    • python .github/workflows/scripts/validate-powershell-runtime.py -> passed
    • yamllint on dependabot workflow -> passed
    • ruff format --check on updated test file -> passed
    • shellcheck on workflow *.sh scripts -> passed

- 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>
@DenWin
DenWin merged commit 6562c26 into sharedSkills-changed-to-skillsShared Jul 10, 2026
8 checks passed
@DenWin
DenWin deleted the denwin-fix-quality-reports branch July 10, 2026 18:13

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

--base)
base="${2:-}"
shift 2

P2 Badge Guard option values before shifting

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')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

DenWin added a commit that referenced this pull request Jul 10, 2026
* 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>
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.

1 participant