Skip to content

fix(conventions): accept the template's trailing reference on the infrastructure checkbox - #32

Merged
EstebanGZam merged 3 commits into
mainfrom
fix/infrastructure-checkbox-template-suffix
Sep 22, 2026
Merged

EstebanGZam merged 3 commits into
mainfrom
fix/infrastructure-checkbox-template-suffix

Conversation

@EstebanGZam

@EstebanGZam EstebanGZam commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What changes

scripts/conventions/validate-pr.py now 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, because tests/conventions-contract.sh was not run by any workflow.

Why

The validator and the templates disagreed, and the templates lost. validate-pr.py:226-231 anchored the pattern with [ \t]*$ immediately after "…MCP servers is listed above", while the pull request templates in microservice-app-ops and microservice-app-gitops print that same line as:

- [ ] Infrastructure changes: the documentation consulted through the required MCP servers is listed above (`microservice-app-ai-agents/rules/mcp.md`)

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.

  • The task register is updated in this pull request (no register applies; see above)
  • Every task ticked here was verified by locating its artifact (none is ticked here)

How it is verified

bash tests/conventions-contract.sh, which runs the validator against fixtures:

  • With only the test commit (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....
  • With the fix: conventions-contract: PASS (33 cases).
  • The suite keeps the negative cases, including the new 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

  • It does not change the pull request templates in the other repositories; they stay as they are, and now they validate.
  • It does not relax any other conventions rule.
  • The new workflow runs only this contract; it adds no other gate.
  • It does not change which files count as infrastructure.

🤖 Generated with Claude Code

EstebanGZam and others added 3 commits September 22, 2026 12:48
…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>
@EstebanGZam
EstebanGZam merged commit adcf1e2 into main Sep 22, 2026
2 checks passed
@EstebanGZam
EstebanGZam deleted the fix/infrastructure-checkbox-template-suffix branch September 22, 2026 17:52
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