Skip to content

fix(ci): run the unit tests when agent instruction files change - #12494

Merged
MarkusNeusinger merged 3 commits into
mainfrom
fix/guardrails-section-registry
Nov 1, 2026
Merged

MarkusNeusinger merged 3 commits into
mainfrom
fix/guardrails-section-registry

Conversation

@MarkusNeusinger

Copy link
Copy Markdown
Owner

Summary

Plan

N/A (follow-up to #12493)

Test plan

  • uv run --extra dev --extra test pytest tests/unit/test_agent_instructions.py tests/unit/skills tests/unit/workflows -n auto: 1,319 passed
  • The new filter matches CLAUDE.md, .claude/guardrails.md, a skill and a command, and not docs/index.md or app/ (dry run of the grep)
  • tools.changelog check --base origin/main passes
  • CI: this PR changes a workflow and a test, so "Run Tests" runs and must be green

https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8

#12493 added the guardrails section "Long-running work reports progress
proactively" but changed no Python, so "Run Tests" skipped it and
test_every_companion_section_is_registered failed on main.

Register the section and the classifier-denial rule with their CLAUDE.md
anchors, and let ci-tests.yml run the tests for changes to CLAUDE.md,
AGENTS.md, the Copilot instructions, .claude/guardrails.md, .claude/skills/
and agentic/commands/, which the unit tests read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8
Copilot AI lite review requested due to automatic review settings October 31, 2026 23:49

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.

🟡 Changes recommended

A moderate active CI issue remains because the workflow filter can skip checks for changes to agentic/docs/project-guide.md, allowing path/link regressions to go undetected.

1 open issue
What changed in this PR

This pull request restores CI coverage for agent-instruction changes and registers the new guardrails introduced by PR #12493.

Changes:

  • Registers the new guardrails and classifier-denial rule with their required CLAUDE.md anchors.
  • Expands CI test triggering for instruction, skill, command, workflow, and prompt changes.
  • Adds a changelog fragment documenting the fix.
  • The CI path filter still omits agentic/docs/, although tests/unit/test_agent_instructions.py validates agentic/docs/project-guide.md.
File Description
tests/​unit/​test_agent_instructions.py Registers the new guardrail obligations and required binding anchors.
changelog.d/​guardrails-section-registry.md Documents the CI and instruction-registry fix.
.github/​workflows/​ci-tests.yml Expands change detection so relevant agent-instruction changes trigger tests.

Review effort: Lite

Comment thread .github/workflows/ci-tests.yml Resolved
@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

test_agent_instructions.py reads it through AGENT_FILES (Copilot review).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7HSkGyea1k2v293XiAMo8
@MarkusNeusinger
MarkusNeusinger merged commit eeff192 into main Nov 1, 2026
18 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the fix/guardrails-section-registry branch November 1, 2026 07:55
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