Skip to content

chore: make the two local PR-section declarations checkable against the fixed upstream contract #58

Description

@kyle-sexton

Context

The four required PR-body sections (Summary / Fix / Verification / Related) are declared in three places that drift independently:

  1. .claude/source-control.mdpr_body_required_sections, which steers the source-control plugin's PR-body scaffold.
  2. .github/PULL_REQUEST_TEMPLATE.md — the ## headings a human author sees.
  3. The pr-issue-linkage reusable in ci-workflows — the gate that actually fails the PR.

Only the third is authoritative, and it is not configurable: the four sections are hardcoded in the reusable's requiredSections array, and its only workflow_call inputs are runner, prerequisite-result, and exempt-authors. That is deliberate — melodic-software/ci-workflows#153 posed exactly this decision ("either extend pr-issue-linkage-style validation to all four contract headers, or slim the PR template to only what is enforced") and was closed completed by extending validation to all four. The fixed org-wide contract is the settled answer; this issue does not reopen it.

What follows from that: the two local declarations are mirrors of an upstream constant, and nothing checks that they still match it.

They have already drifted once. .claude/source-control.md declared Summary / Test plan / Related when it was added in #38 (bebe84d, 2026-07-26). It was corrected to the four-section contract only in #52 (3a306d7, 2026-08-19) — fourteen commits later, in a commit whose stated reason was that the shipped template failed the gate and passed ## Summary vacuously via a bare-dash placeholder. For that window, the repo's own scaffold produced PR bodies its own gate rejected.

Proposed work

Make the mirrors checkable rather than trusting them to stay aligned by hand. Options, to be settled in planning:

  • A CI check asserting the template's ## headings and .claude/source-control.md's pr_body_required_sections both match the four-section contract.
  • Or: drop the local declaration entirely if the source-control plugin can be pointed at the upstream contract, removing one mirror instead of checking it.

The first is cheap and self-contained. The second is better if the plugin supports it — one fewer copy beats a check on a copy.

Required stages before implementation

  • /planning:plan — decide between "check the mirrors" and "remove a mirror", and where the contract's canonical text lives for the check to compare against. No discovery stage: the three declarations, the upstream requiredSections array, and the drift history are all identified above.

Explicitly not in scope: adding a required-sections input to the pr-issue-linkage reusable. That would re-litigate ci-workflows#153, which decided the four-header contract is fixed org-wide.

Acceptance criteria

  • A drift between the PR template's ## headings and the four-section contract fails a check, or the template is no longer a second declaration.
  • The same holds for .claude/source-control.md's pr_body_required_sections, or that declaration is removed.
  • The check names the upstream contract as its source, so a future change to the contract has one obvious place to land.

References

Surfaced by an architecture deepening scan of this repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.status: needs-decisionAwaiting a human or maintainer judgment call.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions