Repository navigation
fix(conventions): accept the template's trailing reference on the infrastructure checkbox - #32
Merged
Conversation
…nfrastructure checkbox Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rastructure checkbox Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
scripts/conventions/validate-pr.pynow accepts trailing text after the infrastructure checkbox label. The line must still begin with the exact label and a checked box; what the pull request template itself prints after it, the reference(microservice-app-ai-agents/rules/mcp.md), no longer causes a rejection.It also adds
.github/workflows/conventions-contract-self-test.yml, becausetests/conventions-contract.shwas not run by any workflow.Why
The validator and the templates disagreed, and the templates lost.
validate-pr.py:226-231anchored the pattern with[ \t]*$immediately after "…MCP servers is listed above", while the pull request templates inmicroservice-app-opsandmicroservice-app-gitopsprint that same line as:So an author who filled in the template exactly as given, and checked the box, still got
conventions: ERROR: infrastructure documentation checkbox must be checked. It happened on microservice-app-gitops#229, where the fix was to delete wording the template had supplied. The contract is the checked box, not the absence of the template's own reference.Tasks
No register covers the delivery conventions tooling in this repository; this is a defect fix in an existing gate, found while landing microservice-app-gitops#229. The behavior of every other rule is unchanged.
How it is verified
bash tests/conventions-contract.sh, which runs the validator against fixtures:test(conventions): ...), the new case fails exactly as reported in the field:FAIL: checked infrastructure checkbox with the template's trailing reference should pass; output: conventions: ERROR: infrastructure documentation checkbox must be checked....conventions-contract: PASS (33 cases).unchecked infrastructure checkbox with the template's trailing reference -> infrastructure documentation checkbox must be checked. An unchecked box is still rejected, with or without the reference.The gap that let this through: the validator gates every pull request in the organization, and this suite is its only test, but no workflow ran it. The new self-test workflow runs it on any change to the validator, the suite, or the conventions workflow.
Risk and rollback
The rule is loosened on one axis only: text after the label. A missing or unchecked box is still rejected, and every other rule (title, branch, sections, task register) is untouched. Rollback is a revert.
What this PR does not do
🤖 Generated with Claude Code