Skip to content

test(ci): enforce workflow name matches its file - #54

Merged
atdr merged 1 commit into
mainfrom
test/enforce-workflow-naming
Sep 8, 2026
Merged

test(ci): enforce workflow name matches its file#54
atdr merged 1 commit into
mainfrom
test/enforce-workflow-naming

Conversation

@atdr

@atdr atdr commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What changed

Adds tests/test_workflow_naming.py, asserting every .github/workflows/*.yml file's top-level name: equals its own filename stem, and updates AGENTS.md to point at it instead of describing the rule as convention-only.

Why

AGENTS.md already documented the rule ("every workflow is named after its own file") but nothing enforced it here, unlike atdr/contrail-gh#7, which added the same guard as a CI shell step. Prose survives only as long as everyone rereads AGENTS.md before touching a workflow file, which is the exact failure mode the contrail-gh guard exists to catch. This repo already runs pytest in CI, so wiring the check in as a test is cheap: no new CI step, no shell to maintain, just one more assertion in the suite that already runs.

Checks

  • ./venv/bin/ruff check . and ./venv/bin/ruff format . pass
  • ./venv/bin/pytest -q passes
  • Docs updated in this PR, if this changes a config option, an importer, or an emissions provider
  • Tests added or updated, if this changes behaviour
  • Skimmed gh issue list for open issues this change touches (none apply)

Test plan

  • ./venv/bin/pytest -q tests/test_workflow_naming.py passes against the current three workflows
  • Full suite run: no new failures (two pre-existing, unrelated failures from local venv/cwd state, not from this branch)
  • ruff check, ruff format --check, and npx prettier@3.9.6 --check AGENTS.md all pass

🤖 Generated with Claude Code

https://claude.ai/code/session_01PdrDTk2ipKDnwDGeSc6Xfq

AGENTS.md's naming convention was prose only, unlike the same guard
atdr/contrail-gh#7 enforces in CI. This repo already runs pytest in CI,
so wiring the check in as a test is cheap and closes the gap that let
convention silently drift.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdrDTk2ipKDnwDGeSc6Xfq
@atdr
atdr merged commit 0502a04 into main Sep 8, 2026
9 checks passed
@atdr
atdr deleted the test/enforce-workflow-naming branch September 8, 2026 20:09
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