Skip to content

Propagate FullScan flag through config-lint scripts#23

Open
DenWin wants to merge 13 commits into
mainfrom
denwin-fix-lint-reports
Open

Propagate FullScan flag through config-lint scripts#23
DenWin wants to merge 13 commits into
mainfrom
denwin-fix-lint-reports

Conversation

@DenWin

@DenWin DenWin commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to Fix workflow lint and policy-check regressions #21: materializes the FullScan switch into a plain bool ($isFullScan) everywhere it's consumed in the workflow orchestrator scripts, instead of passing a raw SwitchParameter around.
  • Threads a new --full-scan flag from execute-workflow-config-lint.ps1 down into each config-lint bash script (asciidoc, markdown, shell, yaml, js-syntax, json), so get-changed-files.sh's existing full-scan support is actually reachable from the top of the call chain.
  • Adds [CmdletBinding(SupportsShouldProcess)]/ShouldProcess to Reset-WorkflowFailures to satisfy PSScriptAnalyzer.

Test plan

  • Parsed all 4 modified .ps1 files with [System.Management.Automation.Language.Parser]::ParseFile — no syntax errors
  • bash -n on all 6 modified .sh files — no syntax errors
  • CI: config-lint / policy-check workflows pass on this PR

🤖 Generated with Claude Code

DenWin and others added 13 commits July 9, 2026 23:37
- 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 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>
…s warning

Materializes the FullScan switch into a plain bool everywhere it's consumed
so it isn't mis-passed as a SwitchParameter, and threads --full-scan down
into each config-lint bash script so get-changed-files.sh's existing
full-scan support is actually reachable. Also adds ShouldProcess support to
Reset-WorkflowFailures to satisfy PSScriptAnalyzer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@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

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b44e8c74c

ℹ️ 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".

mkdir -p reports

# 1) Block obvious hardcoded secrets in tracked repo files.
files=$(bash .github/workflows/scripts/ci/get-changed-files.sh --base "${base}" --head "${head}" --include '*')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep scanning scratch artifacts for secrets

In policy-check I checked this helper call together with the new get-changed-files.sh: because no override is passed here, the helper applies its default .scratch/*/artefacts/** and .scratch/*/artifacts/** excludes. A PR that changes .scratch/foo/artifacts/sample.md with api_key = "..." still triggers policy-check via .scratch/**, but the “Block obvious hardcoded secrets” grep never sees that file, despite the repo instructions saying safety checks still apply to scratch artifacts. Pass --disable-default-excludes for the secret scan path only.

Useful? React with 👍 / 👎.

base="$1"
head="$2"

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.

P1 Badge Run tests when Python source changes

In python-tests.yml I checked that the job is triggered for every **/*.py, but this discovery step only returns changed test files. For a PR that edits a Python source file such as ai-artifacts/.../scripts/mail_to_adoc.py without also touching ai-artifacts/**/tests/test_*.py, the job starts, sets count=0, and takes the “No tests found” path, so pytest never covers the source change. Discover the relevant test suite, or all skill tests, whenever Python source files changed.

Useful? React with 👍 / 👎.

Comment on lines +14 to +17
cat > reports/psscriptanalyzer.txt <<'EOF'
PSScriptAnalyzer execution was skipped.
Reason: workflows are configured for bash-only execution with no PowerShell runtime involvement.
EOF

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore real PowerShell validation

In powershell-quality.yml, the Run PSScriptAnalyzer step calls this helper for changed .ps1/.psm1/.psd1 files, but the helper now only writes a skipped report and exits successfully; the syntax helper has the same skip pattern. A PR can introduce PSScriptAnalyzer violations or unparsable PowerShell and still get a green powershell-quality job, regressing the previous pwsh step that ran Invoke-ScriptAnalyzer. Keep the bash wrapper if needed, but invoke pwsh/PSScriptAnalyzer and fail on findings.

Useful? React with 👍 / 👎.

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.

2 participants