Skip to content

fix: Restore frontmatter validator CLI flag parsing - #2193

Merged
ashleyshaw merged 9 commits into
developfrom
fix/frontmatter-validator-flags
Aug 20, 2026
Merged

fix: Restore frontmatter validator CLI flag parsing#2193
ashleyshaw merged 9 commits into
developfrom
fix/frontmatter-validator-flags

Conversation

@ashleyshaw

@ashleyshawashleyshaw commented Aug 20, 2026

Copy link
Copy Markdown
Member

Linked issues

Fixes#1961
Fixes#1966

Context

The validate-frontmatter-changed.js script was using positional arguments instead of parsing CLI flags properly, causing all frontmatter validation checks to fail in CI.

Fix Summary

Restored minimist-based CLI flag parsing to properly interpret --base and --head flags from the CI workflow.

Test Plan

  • Verified locally: npm run validate:frontmatter:changed -- --base HEAD~5 --head HEAD passes
  • CI validation should now pass on all PRs

Changelog

  • Fixed frontmatter validator CLI flag parsing to handle --base and --head arguments

Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Code/design reviews approved: Awaiting
  • CI green; linked issues closed; release notes prepared (if shipping): In progress

The validate-frontmatter-changed script was using positional arguments
(process.argv[2], process.argv[3]) instead of properly parsing --base
and --head flags passed by the CI workflow. This caused the validator
to fail when the workflow called:
npm run validate:frontmatter:changed -- --base <sha> --head <sha>
Restored the minimist-based flag parsing that correctly interprets
--base and --head arguments, allowing the frontmatter validation to
work properly in CI pipelines.
Fixes remaining validator issue from #1966.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
Added proper blank lines around:
- Headings (MD022)
- Lists (MD032)
- Code fences (MD031)
- Removed trailing spaces (MD009)
Fixed in:
- .github/agentic-workflows/README.md
- .github/agents/release.agent.md
- .github/instructions/README.md
- .github/metrics/README.md
Addresses issue #1961 - CI markdown linting job failures.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
…009)
- Added blank lines after headings (MD022)
- Added blank lines around lists (MD032)
- Added blank lines around code fences (MD031)
- Removed trailing spaces (MD009)
- Fixed 5 files with 300+ linting errors:
- PHASE_4_FAQ.md: 118 errors
- PHASE_4_TROUBLESHOOTING.md: 60 errors
- zendesk-support-agent/README.md: 69 errors
- AGENTIC_RELEASE_TEAM_TRAINING.md: 42 errors
- chat-closure-agent/troubleshooting-faq.md: 57 errors
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
@coderabbitai

coderabbitaiBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, you've reached your PR review limit, so we couldn't start this review.

Next review available in:41 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: dae0ec8a-8af4-47ed-93d8-d4474aee461e

📥 Commits

Reviewing files that changed from the base of the PR and between 765c094 and 1219d68.

📒 Files selected for processing (87)
  • .github/agentic-workflows/README.md
  • .github/agentic-workflows/release.agent.js
  • .github/agentic-workflows/release.md
  • .github/agents/release.agent.md
  • .github/agents/reporting.agent.md
  • .github/instructions/.archive/agents.instructions.md
  • .github/instructions/.archive/reporting.instructions.md
  • .github/instructions/README.md
  • .github/instructions/automation.instructions.md
  • .github/instructions/reporting.instructions.md
  • .github/labeler.yml
  • .github/metrics/README.md
  • .github/operations/INCIDENT_RESPONSE.md
  • .github/operations/RUNBOOK.md
  • .github/projects/active/launch-agents-checklist.md
  • .github/projects/active/next-issues-execution-plan.md
  • .github/projects/active/project-maintenance-agent-phase-1-2026-08-12/PHASE_4_FAQ.md
  • .github/projects/active/project-maintenance-agent-phase-1-2026-08-12/PHASE_4_TROUBLESHOOTING.md
  • .github/reports/active/2026-08-04-issue-tracking.md
  • .github/reports/active/2026-08-04-phase-2c-script-testing.md
  • .github/reports/active/2026-08-04-release-workflow-fix-verification.md
  • .github/reports/active/2026-08-04-script-organization-concern.md
  • .github/reports/active/ACTIVE-PROJECTS-REPORT-2026-08-07.md
  • .github/reports/active/PHASE-3-OPENSPEC-RFC-INDEX-2026-08-07.md
  • .github/reports/active/PHASE_3A_MIGRATION_SUMMARY.md
  • .github/reports/active/WORKFLOW_AUDIT_REPORT.md
  • .github/reports/active/agent-infrastructure-audit-2025-12-10.md
  • .github/reports/active/agent-standardization-framework-2026-07-22.md
  • .github/reports/active/audit-log.md
  • .github/reports/active/audit-report-2026-05-28.md
  • .github/reports/active/critical-agent-fixes-2025-12-10.md
  • .github/reports/active/file-organization-migration-2025-12-09.md
  • .github/reports/active/index-2026-08-07.md
  • .github/reports/active/label-color-consistency-audit-2026-06-01.md
  • .github/reports/active/mermaid-diagram-audit.md
  • .github/reports/active/phase-1-memory-schema-audit-2026-07-22.md
  • .github/reports/active/pre-launch-validation-2025-12-10.md
  • .github/reports/active/pre-release-audit-v1.0.0.md
  • .github/reports/active/readme-audit-2026-05-31.md
  • .github/reports/active/reports-folder-structure-audit-2025-12-10.md
  • .github/reports/active/test-coverage-expansion-plan.md
  • .github/reports/active/v1.0.0-launch-readiness-final-2025-12-10.md
  • .github/reports/active/v1.0.0-pre-launch-debt.md
  • .github/reports/active/wave-5-4-readme-discovery-audit.md
  • .github/reports/active/wave-5-completion-summary.md
  • .github/workflows/checks.yml
  • .github/workflows/cleanup-branches.yml
  • .github/workflows/docs-maintenance.yml
  • .github/workflows/docs-validation.yml
  • .github/workflows/documentation.yml
  • .github/workflows/issue-remediation-bulk.yml
  • .github/workflows/label-audit-report.yml
  • .github/workflows/labeling-governance.yml
  • .github/workflows/labeling.yml
  • .github/workflows/project-archival.yml
  • .github/workflows/reporting.yml
  • .github/workflows/validate-mermaid-pr.yml
  • .remember/today-2026-07-22.done.md
  • .remember/today-2026-07-24.done.md
  • CHANGELOG.md
  • agents/zendesk-support-agent/README.md
  • docs/AGENTIC_RELEASE_TEAM_TRAINING.md
  • docs/chat-closure-agent/troubleshooting-faq.md
  • instructions/ai-operations-unified.instructions.md
  • instructions/community-standards.instructions.md
  • instructions/file-organisation.instructions.md
  • scripts/agents/reporting.agent.js
  • scripts/audit/frontmatter.js
  • scripts/collect-link-targets.js
  • scripts/generate-doc-audit-report.js
  • scripts/inject-footers-safe.js
  • scripts/inject-footers.js
  • scripts/metrics/anomaly-detector.js
  • scripts/metrics/metrics-storage.js
  • scripts/metrics/trend-analyzer.js
  • scripts/validate-reports-structure.js
  • scripts/validation/lint-md-changed.cjs
  • scripts/workflows/assign-milestones-workflow.js
  • scripts/workflows/metrics/collect-metrics.js
  • scripts/workflows/metrics/create-metrics-issues.js
  • scripts/workflows/metrics/generate-metrics-report.js
  • scripts/workflows/metrics/generate-report.cjs
  • scripts/workflows/projects/archive-projects.cjs
  • scripts/workflows/track-remediation-metrics.cjs
  • skills/block-theme-audit/SKILL.md
  • workflows/ai-feedback-validation.yml
  • workflows/metrics-collection.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actionsBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

✅ Template check passed after update. Thanks for fixing the PR description.

- Fixed typo: .githu./.github/reports/** → .github/reports/**
- Ensures .github/reports/ is properly excluded from markdown linting rules
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Project Linking Validation

Projects Checked: 67
Projects with Links: 66

✅ All projects have Related Issues sections

Detailed issue link validation is deferred to Phase 4.


Validation Date: 2026-08-20T18:31:36.737Z
Validator: GitHub Actions

@github-actions

github-actionsBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2193

CI Status:success
Files changed: 87
Risk Distribution: 12 critical, 45 high, 0 medium, 30 low

Recommendations

  • ⚠️ 12 critical-risk file(s) modified (workflows, secrets)
  • ⚠️ Security-sensitive files modified (review carefully)
  • ⚠️ Database migration without rollback plan documented

@github-actions

github-actionsBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

⏱️ Aging and SLA annotation

  • Age: 0 day(s)
  • SLA state: Within SLA
  • Thresholds: warn at 7 days, breach at 14 days
  • Last updated: 2026-08-20T18:33:44.122Z

Maintained by project-meta-sync workflow.

@github-actions

Copy link
Copy Markdown
Contributor

🔗 Project Linking Validation

Projects Checked: 67
Projects with Links: 66

✅ All projects have Related Issues sections

Detailed issue link validation is deferred to Phase 4.


Validation Date: 2026-08-20T18:32:41.855Z
Validator: GitHub Actions

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Mermaid Diagram Validation

❌ One or more Mermaid diagram checks failed.

CheckResult
✅ SyntaxPassed
❌ AccessibilityFailed
❌ Colour ContrastFailed

- Updated lint-md-changed.cjs to filter changed files against .markdownlintignore patterns before linting
- Prevents CI failures from markdown formatting issues in excluded report and project files
- Fixed 77 instances of typo .githu./ → .github/ across documentation and config files
This ensures that:
1. Files in .github/reports/** are excluded from linting (generated reports, audits)
2. Files in .github/projects/** are excluded from linting (project artifacts)
3. The lint-md-changed script respects ignore patterns before passing files to markdownlint-cli2
4. CI markdown validation only checks relevant source files, not generated content
Fixes: #1961, #1966
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
…cript
- Replaced minimatch import with built-in glob pattern matching
- Uses simple regex-based pattern matching for .markdownlintignore patterns
- Reduces external dependencies while maintaining compatibility with glob syntax
- Properly handles **, *, and ? wildcards in ignore patterns
Fixes lint-md-changed.cjs to correctly filter changed files before passing to markdownlint-cli2.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
- Fixed pattern matching to correctly handle **/ prefix patterns
- **/ now properly makes the intermediate path optional (matches 0+ directories)
- All glob patterns (.md files under .github/reports/**, .github/projects/**/*.md, etc.) now work correctly
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
- Fixed duplicate path in checks.yml: .github//.github/reports/** → .github/reports/**
- Ensures workflow correctly ignores report files from CI triggers
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QC3sD7K5tPp6oyffUkiTsR
@ashleyshaw
ashleyshaw merged commit 0484fd2 into developAug 20, 2026
21 of 34 checks passed
@ashleyshaw
ashleyshaw deleted the fix/frontmatter-validator-flags branch August 20, 2026 18:47
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Project Linking Validation

Projects Checked: 67
Projects with Links: 66

✅ All projects have Related Issues sections

Detailed issue link validation is deferred to Phase 4.


Validation Date: 2026-08-20T18:47:45.334Z
Validator: GitHub Actions

@github-actions

Copy link
Copy Markdown
Contributor

Milestone Allocation

ashleyshaw pushed a commit that referenced this pull request Aug 21, 2026
…-08-21)
Issue status review documenting:
- Closed#1930: PR template validator false negative (via #2007, #2010)
- Closed#2051: Frontmatter freshness CI issues (via #2180)
- Enhanced #2186: Template validation script false positives with DoR/DoD
- Enhanced #2147: Phase 1 validation tests with progress tracking
- Verified #2049: OpenSpec Labels Phase 2-3 epic (complete)
All high-priority issues now have complete Definition of Ready and Definition
of Done sections reflecting merged work into develop branch.
References: #2186, #1930, #2051, #2147, #2049
Related PRs: #2193, #2180, #2183, #2173, #2153, #2210, #2221
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

@ashleyshaw@claude