Skip to content

fix(ci): unblock pre-PR markdown lint baseline on main (#1837)#2133

Merged
rjmurillo merged 6 commits into
mainfrom
fix/1837-prepr-baseline-failures
May 30, 2026
Merged

fix(ci): unblock pre-PR markdown lint baseline on main (#1837)#2133
rjmurillo merged 6 commits into
mainfrom
fix/1837-prepr-baseline-failures

Conversation

@rjmurillo

@rjmurillo rjmurillo commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the baseline failures the pre-PR runner reported on a pristine main. On a clean checkout, .venv/bin/python scripts/validation/pre_pr.py went from 2 failed / 9 passed to 1 failed / 10 passed. The remaining failure (merge-resolver agent drift) is a separate content/governance decision and is left for a follow-up; see "Out of Scope" below.

Baseline reproduction (clean main, HEAD 1970ad1)

The issue body listed 6 failures, but 5 of those (the PowerShell validators) are already handled on current main: 4 expunged validators report [SKIP] via MissingScriptSkip, and agent drift runs through the Python port. The two real failures were:

  • Markdown Linting (FAIL): 420 violations.
  • Agent Drift Detection (FAIL): merge-resolver at 20.9% similarity.

Background

403 of the 420 violations were under src/copilot-cli/skills/**. That tree is a whole-tree copy of .claude/skills/ produced by build/scripts/generate_skills.py (its module docstring, line 2: "Generate Copilot CLI skill artifacts from .claude/skills/ (REQ-003-001)", mode directory-copy). .claude/skills/** is lint-excluded (third-party plugins, PR #331); the copy was not. That asymmetry is exactly what the issue describes, and it trains contributors to ignore baseline failures.

Changes

  • .markdownlint-cli2.yaml:
    • Exclude src/copilot-cli/skills/** the same way .claude/skills/** is excluded. Removes 403 violations.
    • Set MD024: siblings_only: true so the installation guide can reuse the "Claude Code" / "GitHub Copilot CLI" sub-headings under distinct parent sections (Installation Methods / Uninstallation / Troubleshooting). Verified empirically against markdownlint v0.40.0.
  • Authored fixes for the remaining 17 violations:
    • README.md: two standalone bold platform labels triggered MD036; added the trailing colon to match the sibling **Claude Code:** style.
    • spec-generator (both install copies, kept byte-identical): tagged the 3-tier-output and EARS-syntax fences as text.
    • .claude/agents/roadmap.md, .claude/agents/milestone-planner.md: resynced from the canonical src/claude/ copies, which already carried the text-fence fix (and, for roadmap, a comma-for-em-dash fix in the description).
  • New test tests/validation/test_markdownlint_config.py (5 tests) pins the exclusion and the MD024 setting so a future config edit cannot silently reintroduce the baseline failure.

Verification

  • npx markdownlint-cli2 "**/*.md" exits 0 (zero violations); --fix produces no unintended changes to copilot/skill files.
  • .venv/bin/python scripts/validation/pre_pr.py: 1 failed / 10 passed (was 2 failed / 9 passed). Markdown Linting now PASSES.
  • .venv/bin/python -m pytest tests/validation/test_markdownlint_config.py tests/validation/test_pre_pr.py tests/build_scripts/test_install_parity.py: 47 passed.
  • .venv/bin/python build/generate_agents.py --validate: PASSED. Install Parity: OK.

Out of Scope: merge-resolver agent drift

The Agent Drift Detection failure is genuine and pre-existing, independent of this change. src/claude/merge-resolver.md is a 289-line hand-authored Claude doc (16 sections); src/vs-code-agents/merge-resolver.agent.md is a 137-line template-generated doc (6 sections). generate_agents.py --validate PASSES, so the generated side is correct; the drift is that the Claude copy was authored independently of the shared template. Reconciling them is a content/governance call (Ask First per AGENTS.md): either rewrite templates/agents/merge-resolver.shared.md to match the rich Claude content (changes 4 generated files, needs architect plus agent-template owners), or quarantine merge-resolver from the drift gate via a governance ADR. Out of scope for this lint-baseline fix.

Fixes #1837

🤖 Generated with Claude Code

Test and others added 3 commits May 29, 2026 20:46
…o siblings

The pre-PR runner failed Markdown Linting on a pristine main. Regenerated
Copilot CLI skills under src/copilot-cli/skills/** carried 403
MD040/MD041/MD036 violations while their source counterparts under
.claude/skills/** were excluded from lint scope. That asymmetry trained
contributors to ignore baseline failures (Issue #1837).

Root cause: build/scripts/generate_skills.py copies .claude/skills/ verbatim
into src/copilot-cli/skills/ (its module docstring line 2: "Generate Copilot
CLI skill artifacts from .claude/skills/ (REQ-003-001)", mode directory-copy).
The two trees hold the same plugin-class content, but only the .claude side was
lint-excluded.

Changes:
- Exclude src/copilot-cli/skills/** the same way .claude/skills/** is excluded
  (PR #331 treats skills as third-party plugins). Removes 403 violations.
- Set MD024 siblings_only true so docs/installation.md can reuse "Claude Code"
  and "GitHub Copilot CLI" sub-headings under distinct parent sections, which is
  intentional and readable. Verified empirically against markdownlint v0.40.0:
  with siblings_only true, two "### Foo" under different "##" parents pass; with
  the default false the second is flagged.

Add tests/validation/test_markdownlint_config.py to pin both invariants so a
future config edit cannot silently drop them and reintroduce the baseline
failure. Five tests, all passing.

Fixes #1837

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three authored markdown files carried baseline markdownlint violations that
pre_pr.py surfaced on a pristine main (Issue #1837):

- README.md: two standalone bold platform labels ("Claude Code", "GitHub
  Copilot CLI") in the Quick Install section triggered MD036
  (emphasis-as-heading). Added the trailing colon to match the six sibling
  labels already using the "**Claude Code:**" style, which markdownlint does
  not flag.
- evals/README.md and evals/reviewer-asymmetry-spike/README.md: the Layout
  directory-tree fences were bare (MD040). Tagged them as text.

Fixes #1837

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three agent prompts carried bare code fences (MD040) that pre_pr.py surfaced on
a pristine main (Issue #1837):

- spec-generator: the 3-tier-output and EARS-syntax illustrative fences were
  bare. Tagged both as text in the two install copies that carry the file
  (.claude/agents/ and src/claude/); the two stay byte-identical so install
  parity holds.
- roadmap and milestone-planner: the RICE/KANO and dependency-graph fences in
  the .claude/agents/ self-host copies were bare. Resynced both from the
  canonical src/claude/ copies, which already carried the text-fence fix (and,
  for roadmap, the comma-for-em-dash fix in the description). Only those two
  lines changed; the rest of each file is unchanged.

Fixes #1837

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 30, 2026 03:54
@github-actions github-actions Bot added bug Something isn't working area-infrastructure Build, CI/CD, configuration labels May 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Validation Report

Caution

Status: FAIL

Description Validation

Check Status
Description matches diff FAIL

PR Standards

Check Status
Issue linking keywords PASS
Template compliance WARN

QA Validation

Check Status
Code changes detected True
QA report exists false

⚠️ Blocking Issues

  • PR description does not match actual changes

⚡ Warnings

  • Template compliance: 2/4 sections complete
  • QA report not found for code changes (recommended before merge)

Powered by PR Validation workflow

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds language identifiers to fenced code blocks across several Markdown files, updates the markdownlint configuration to scope duplicate heading checks to siblings and exclude Copilot CLI skills, and introduces a regression test suite to verify these linting rules. The reviewer feedback points out that several modified files in .claude/agents/ and src/claude/ are either generated or hand-maintained copies that must be updated via their corresponding templates in templates/agents/ to ensure synchronization and prevent changes from being overwritten.

Comment thread src/claude/spec-generator.md
Comment thread .claude/agents/spec-generator.md
Comment thread .claude/agents/milestone-planner.md
Comment thread .claude/agents/roadmap.md
@github-actions

Copy link
Copy Markdown
Contributor

Spec-to-Implementation Validation

Caution

Final Verdict: FAIL

What is Spec Validation?

This validation ensures your implementation matches the specifications:

  • Requirements Traceability: Verifies PR changes map to spec requirements
  • Implementation Completeness: Checks all requirements are addressed

Validation Summary

Check Verdict Status
Requirements Traceability CRITICAL_FAIL
Implementation Completeness CRITICAL_FAIL

Spec References

Type References
Specs REQ-003
Issues 1837
Requirements Traceability Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

Implementation Completeness Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.


Run Details
Property Value
Run ID 26673805813
Triggered by pull_request on 2133/merge

Powered by AI Spec Validator workflow

@github-actions github-actions Bot added the infrastructure-failure CI infrastructure failure (Copilot CLI auth, rate limits, etc.) label May 30, 2026
@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

AI Quality Gate Review

Warning

⚠️ Final Verdict: WARN

Walkthrough

This PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:

  • Security Agent: Scans for vulnerabilities, secrets exposure, and security anti-patterns
  • QA Agent: Evaluates test coverage, error handling, and code quality
  • Analyst Agent: Assesses code quality, impact analysis, and maintainability
  • Architect Agent: Reviews design patterns, system boundaries, and architectural concerns
  • DevOps Agent: Evaluates CI/CD, build pipelines, and infrastructure changes
  • Roadmap Agent: Assesses strategic alignment, feature scope, and user value

Review Summary

Agent Verdict Category Status
Security CRITICAL_FAIL INFRASTRUCTURE
QA CRITICAL_FAIL INFRASTRUCTURE
Analyst CRITICAL_FAIL INFRASTRUCTURE
Architect CRITICAL_FAIL INFRASTRUCTURE
DevOps CRITICAL_FAIL INFRASTRUCTURE
Roadmap CRITICAL_FAIL INFRASTRUCTURE

💡 Quick Access: Click on individual agent jobs (e.g., "🔒 security Review", "🧪 qa Review") in the workflow run to see detailed findings and step summaries.

Action Required

@rjmurillo, this PR has findings that need your attention:

  • Security review flagged issues
  • QA review flagged issues
  • Analyst review flagged issues
  • Architect review flagged issues
  • DevOps review flagged issues
  • Roadmap review flagged issues

Please review the agent findings above and push fixes or reply with justification.

Security Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

QA Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

Analyst Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

Architect Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

DevOps Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.

Roadmap Review Details

VERDICT: CRITICAL_FAIL
MESSAGE: Copilot CLI infrastructure failure after 3 attempts (exit code 1). Check COPILOT_GITHUB_TOKEN scope, rate limits, or network connectivity.


Run Details
Property Value
Run ID 26674567053
Triggered by pull_request on 2133/merge
Commit cd8d702116f54bea3589237f1533d1578761aea1

Powered by AI Quality Gate workflow

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR unblocks the pre-PR validation baseline on main by fixing Markdownlint failures caused by generated Copilot CLI skill copies, and by pinning the key lint configuration invariants with a regression test.

Changes:

  • Updated .markdownlint-cli2.yaml to (a) exclude src/copilot-cli/skills/** like .claude/skills/**, and (b) configure MD024 with siblings_only: true to allow repeated sub-headings under different parent sections.
  • Fixed remaining MD040/MD036 violations by tagging previously untyped fenced blocks as text and tightening standalone bold labels in README.md.
  • Added tests/validation/test_markdownlint_config.py to prevent config drift that would reintroduce baseline lint failures.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.markdownlint-cli2.yaml Excludes Copilot CLI skill copies from lint scope, configures MD024 siblings_only to avoid false positives in installation docs headings.
tests/validation/test_markdownlint_config.py Adds regression tests that pin the lint exclusion and MD024 behavior, plus guards against disabling MD040/MD041.
README.md Fixes MD036 by making standalone bold platform labels end with a colon.
evals/README.md Fixes MD040 by adding a text language tag to the layout fence.
evals/reviewer-asymmetry-spike/README.md Fixes MD040 by adding a text language tag to the layout fence.
src/claude/spec-generator.md Fixes MD040 by tagging previously untyped fences as text.
.claude/agents/spec-generator.md Mirrors the text-tagged fences fix for the Claude Code agent copy.
.claude/agents/roadmap.md Fixes MD040 by tagging an untyped fence as text, and removes a prohibited dash character in the description line.
.claude/agents/milestone-planner.md Fixes MD040 by tagging the dependency-graph fence as text.

The branch-wide em/en-dash scan in pre_pr.py (validate_dash_prohibition)
checks every *.md file changed on the branch, not just newly added ones. Once
the markdown fixes for Issue #1837 put these files into the branch diff, three
pre-existing U+2014/U+2013 occurrences started failing the gate:

- README.md:140: the roadmap agent description quoted in the install table used
  an em-dash ("product—strategic"). Replaced with a comma to match the
  canonical src/claude/roadmap.md wording.
- evals/reviewer-asymmetry-spike/README.md: the Acceptance bullet wrapped onto a
  continuation line that began with an en-dash. Merged the continuation into the
  bullet so it reads as one sentence with no leading dash.
- spec-generator (both install copies): the intro and the 3-tier-output fence
  used U+2014 em-dashes as flow connectors. Replaced " -- " connectors with
  " -> " ASCII arrows. The two copies stay byte-identical so install parity
  holds.

.claude/rules/universal.md MUST NOT entry 5 prohibits these characters.

Fixes #1837

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rjmurillo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits May 30, 2026 04:21
Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 30, 2026 04:32
@rjmurillo rjmurillo review requested due to automatic review settings May 30, 2026 04:32

Copilot AI commented May 30, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved and pushed. Merge conflicts are fixed in commit fff1d8bc (merged latest origin/main and resolved evals/reviewer-asymmetry-spike/README.md).

@rjmurillo rjmurillo enabled auto-merge (squash) May 30, 2026 05:12
@rjmurillo rjmurillo merged commit 9986b83 into main May 30, 2026
129 of 130 checks passed
@rjmurillo rjmurillo deleted the fix/1837-prepr-baseline-failures branch May 30, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Build, CI/CD, configuration bug Something isn't working infrastructure-failure CI infrastructure failure (Copilot CLI auth, rate limits, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-PR validation runner has 6 baseline failures on main

3 participants