Repository navigation
Description
Context
The four required PR-body sections (Summary / Fix / Verification / Related) are declared in three places that drift independently:
.claude/source-control.md—pr_body_required_sections, which steers the source-control plugin's PR-body scaffold..github/PULL_REQUEST_TEMPLATE.md— the##headings a human author sees.- The
pr-issue-linkagereusable inci-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'spr_body_required_sectionsboth 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 upstreamrequiredSectionsarray, 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'spr_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
.claude/source-control.md— the agent-facing declaration..github/PULL_REQUEST_TEMPLATE.md— the author-facing declaration.melodic-software/ci-workflows.github/workflows/pr-issue-linkage.yml— the hardcodedrequiredSectionsarray and its three inputs.melodic-software/ci-workflows#153— the closed decision that fixed the four-header contract org-wide.- chore(source-control): declare the PR-body required sections #38 (
bebe84d) and chore: align the PR template with the four-section linkage contract #52 (3a306d7) — the drift and its hand correction, fourteen commits apart.
Surfaced by an architecture deepening scan of this repo.
Activity
fix(claude): align agent config with plugin contracts and complete th…
ci: derive the ci-status lane list from the needs roster (#82)
kyle-sexton commentedon Aug 23, 2026
kyle-sexton commentedon Aug 23, 2026
This was generated by AI during triage.
Triage
Category: enhancement / chore (tooling drift-prevention gap, not a defect in running code).
Redundancy check: searched this repo for any existing mechanism that compares
.claude/source-control.md'spr_body_required_sectionsor.github/PULL_REQUEST_TEMPLATE.md's headings against the upstream contract — none found (grep -rn "requiredSections\|pr_body_required_sections\|pr-issue-linkage"across workflows/docs surfaces only the two mirrors and the gate's own reusable-workflow reference, no comparison logic). Nodocs/out-of-scope/ledger exists in this repo, so no rejected-concept check applies.Verification (fact-check of the claim, done before drafting the brief):
.claude/source-control.mdcurrently declaresSummary / Fix / Verification / Relatedunderpr_body_required_sections..github/PULL_REQUEST_TEMPLATE.mdcurrently carries the same four##headings.melodic-software/ci-workflows's.github/workflows/pr-issue-linkage.ymldirectly (gh api repos/melodic-software/ci-workflows/contents/...) and confirmed: therequiredSectionsarray is hardcoded to exactly those four sections inside the validation script, and the workflow's onlyworkflow_callinputs arerunner,prerequisite-result, andexempt-authors— no section-list override exists. This matches the issue's claim precisely: both local declarations are unchecked mirrors of a fixed, non-configurable upstream contract.bebe84d,3a306d7) — they're outside this shallow clone's fetched history — but the current-state claim (the load-bearing part for scoping this work) is independently confirmed above, so this doesn't block briefing.No cluster relationship found with the other open raw-intake siblings in this batch (#65–76): none touch PR-body-section declarations or the
pr-issue-linkagecontract.Agent Brief
Type: Task
Summary: Add a CI check that fails when either local mirror of the four-section PR-body contract (
.github/PULL_REQUEST_TEMPLATE.md's##headings, and/or.claude/source-control.md'spr_body_required_sections) no longer matches the contract enforced byci-workflows'spr-issue-linkagereusable workflow.Current behavior:
Two local declarations mirror the four-section contract (
Summary/Fix/Verification/Related) that thepr-issue-linkagereusable workflow actually enforces. That workflow'srequiredSectionslist is hardcoded and not configurable via anyworkflow_callinput. Nothing compares either local mirror against it or against each other, and they have drifted before.Desired behavior:
A CI check runs (at minimum on changes to the PR template,
.claude/source-control.md, or the check itself) and fails when either mirror's section set doesn't match the upstream contract. The check must not become a third silently-driftable copy of the list: prefer deriving its comparison target from a live read of thepr-issue-linkagereusable workflow's source (e.g. via the GitHub API) over hardcoding the four names a third time; if hardcoding proves the only reliable option, comment it clearly as an intentional, singular mirror of the upstream reusable workflow. On failure, the check's message must name the upstream contract (ci-workflows'spr-issue-linkagereusable workflow) as the source of truth it compared against.Decision on
.claude/source-control.mdspecifically: RECOMMENDED — keep the declaration and add it to the check (cheap, self-contained to this repo, no dependency on unverified capability elsewhere). ALTERNATIVE (maintainer-vetoable) — remove that one declaration entirely by pointing the source-control plugin at the upstream contract directly, if investigation confirms the plugin supports sourcing the required-sections list fromci-workflowsrather than a local static config. This alternative does not apply to the PR template mirror, which GitHub renders from a static file and so always needs the checking approach regardless.Explicitly out of scope (already decided against in
ci-workflows#153): adding arequired-sections(or equivalently named)workflow_callinput to thepr-issue-linkagereusable workflow, or otherwise changing that workflow's validation logic or the four-section contract itself.Key interfaces:
pr-issue-linkagereusable workflow as its comparison source.requiredSectionsarray tolerates the reusable workflow's script evolving in minor ways — parse defensively, fail loudly with a clear message if the array can no longer be located, rather than silently passing.Acceptance criteria:
.github/PULL_REQUEST_TEMPLATE.md's##headings and the four-section contract fails a check..claude/source-control.md'spr_body_required_sectionsand the four-section contract fails a check, OR that declaration is removed in favor of pointing the source-control plugin at the upstream contract directly (only if confirmed feasible — do not remove speculatively).pr-issue-linkagereusable workflow as its source.Out of scope:
required-sectionsinput (or equivalent) to thepr-issue-linkagereusable workflow inci-workflows— already decided against.pr-issue-linkage's own validation logic.Decision defaulted: keep + check the
.claude/source-control.mdmirror rather than attempt to remove it via a source-control-plugin capability that hasn't been confirmed to exist — veto before merge if that capability turns out to already be available and removal is preferred.kyle-sexton commentedon Aug 23, 2026
This was generated by AI in the autonomous worker lane.
Lease takeover. The prior lease on this item was held by
MELO-LAP-001-triage-202608230449and has expired — it was acquired and last renewed at the timestamp in that lease comment, with a 1-hour TTL, and was never renewed or released.Taking it over as
melo-lap-001-worker-202608230449to carry the item to a review-ready pull request.For the record, this is a lane-protocol observation rather than a collision: the triage lane takes a lease while triaging and does not release it when it flips an item to
agent-ready, so every handed-off item is unavailable to the worker lane until its lease lapses about an hour later. Releasing the lease as part of theagent-readyflip would remove the delay entirely.kyle-sexton commentedon Aug 23, 2026
kyle-sexton commentedon Aug 23, 2026
This was generated by AI in the autonomous worker lane (
melo-lap-001-worker-202608230449).Escalated — blocked on a decision I am not permitted to make: a reusable-workflow pin bump.
What I found before writing any code
This issue's premise is true upstream but false at this repository's pin, which inverts the work.
.github/workflows/pr-issue-linkage.ymlpins the reusable atmelodic-software/ci-workflows/.github/workflows/pr-issue-linkage.yml@e94438746c300b02385a7f8a2a2dcd19a7f4ad4a # v0.10.2.At that SHA there is no
requiredSectionsarray. The validation script enforces exactly two things: a native closing keyword (or a no-issue marker) and a non-empty## Relatedsection. Verbatim, frome9443874:The four-section
requiredSectionsarray (Summary/Fix/Verification/Related) exists only in later refs. Presence by tag, checked directly at each SHA:requiredSectionse9443874ee96bd2734158c62bef7b0f8176emelodic-software/ci-workflows#153closed COMPLETED on 2026-08-12, which is the change that introduced the array — landing between v0.12.0 and v0.14.0, after this repo's pin.Consequence: three of the four "contract" sections (
Summary,Fix,Verification) are not enforced on this repository's pull requests today. The two local declarations are not mirrors of an enforced contract; they are ahead of it.The triage note verified the array via
gh api repos/melodic-software/ci-workflows/contents/..., which reads the default branch, not the pinned ref — which is why the gap was not visible at triage time.README.mdalready records that Dependabot deliberately does not move the three reusable-workflow pins ("the standards runner-policy allowlist admits only independently reviewed refs, so those move through explicit reviewed pull requests"), so the stale pin is a known process artifact rather than a bug.Why I stopped instead of shipping a check
Every correct form of the requested check runs through the pin, and each one is either wrong or blocked:
{Related}; both mirrors declare four. The check could never go green, soci-statuswould block its own PR.Summary/Fix/Verificationfrom the org-wide PR template to match a stale pin. That re-litigatesci-workflows#153, which this issue explicitly puts out of scope.ci-workflows'smain— passes today, but makes a gating check in this repo depend on another repository's floating HEAD: a green PR could go red with zero local changes. It also breaks this repo's SHA-pinning discipline and asserts a contract the real gate does not enforce.Summary / Test plan / Relateddrift class from chore(source-control): declare the PR-body required sections #38) still passes against{Related}. It would ship a check whose stated acceptance depends on work it does not do.README.mdrequires reusable-workflow pins to move through explicit reviewed pull requests.Recommended resolution
.github/workflows/pr-issue-linkage.yml'suses:pin frome9443874(v0.10.2) to a reviewed ref carrying the four-section contract — v0.17.2 (0f8176e) is current; v0.14.0 (62bef7b) is the minimum. Worth a look at the four intervening minors for any other behavior change before choosing. Note that once the pin moves, the four-section contract starts actually gating this repo's PRs, which is a real (and presumably intended) behavior change.uses:line in.github/workflows/pr-issue-linkage.ymlforowner/repo/path@<sha>, fetches that file fromraw.githubusercontent.comat that exact SHA (ci-workflowsis public, so no token is needed), extracts therequiredSectionsnames, and asserts exact set equality against the PR template's##headings (with HTML comments stripped first) and against.claude/source-control.md's## pr_body_required_sectionslist. No third copy of the list, no floating HEAD, and the failure message names the pinned upstream reusable as its source. Both parse points must fail loudly (zero or multiple matches → non-zero exit), never pass silently.Side-check settled while here
The brief's alternative — remove the
.claude/source-control.mdmirror by pointing the source-control plugin at the upstream contract — is not feasible.plugins/source-control/reference/config-resolution.mdresolvespr_body_required_sectionsonly from the three layeredsource-control.mdfiles plus the bundled plugin default; there is no mechanism to source the list from a remote repository. Keep-and-check is settled for that mirror, as the triage note's RECOMMENDED default assumed.What is left to decide
pr-issue-linkagepin, and to which ref.No code was written and nothing was pushed. The worktree and feature branch created for this attempt have been removed; the lease is released.
Addendum — fleet position of this pin (independent verification)
A second, fresh-context pass over all nine
pr-issue-linkagecallers in the org confirms this repo's pin is an outlier, not the norm:.github(this repo)e9443874codex-pluginsc136b27fci-runnerd26c7506claude-code-plugins7107b348dotfiles7107b348github-iac7107b348medley7107b348provisioning7107b348standards7107b348Seven of nine callers already enforce the four-section contract; this repo and
codex-pluginsdo not. The workflow file at v0.14.2 is byte-identical tomain(blob40b8116f2dbfbb3339513dd13df25515f3f2ff5bat bothmainand v0.17.2), so v0.14.0 throughmainis one contract, not several — v0.14.2 is the ref six sibling repos already run.Two further facts that constrain the eventual check's design:
requiredSectionshas no canonical machine-readable form. It appears in exactly two places inci-workflows, both inside.github/workflows/pr-issue-linkage.yml(declaration at line 425, iteration at line 447), embedded in an inlineactions/github-scriptscript: |block. There is no JSON/YAML data file, no schema, no composite action, and no release asset carrying the list — all 23 releases have zero assets. Every other mention in that repo (its README, the workflow header comment,pr-issue-linkage-self.yml, and.github/scripts/pr-issue-linkage.test.cjs) is prose or a fixture; the test file reads the workflow YAML andvm-runs the extracted script rather than restating the contract. So parsing the workflow file at the pinned SHA is the only non-duplicating source, and it must parse defensively.vX.Y.Z; nov0orv0.17alias exists. The bump must name a specific ref.Also confirmed:
ci-workflowsexposes no consumer-facing reusable workflow or composite action for validating a caller's own local PR-body/template contract — its three drift checks (tool-version-drift-check,release-tag-drift-check,selector-conformance) are self-only with noworkflow_calltrigger. So this check has to be built locally here; there is nothing upstream to call.kyle-sexton commentedon Aug 23, 2026
This was generated by AI during work.
Decision-ready summary
An advisor panel reviewed this issue's
needs-humangate and split on the framing:.claude/source-control.md?") has a well-evidenced default, supported by this issue's own addendum: 7/9 org callers ofpr-issue-linkagealready pinv0.14.2/7107b348(byte-identical throughmain), and this repo'sv0.10.2/e9443874pin is a two-repo outlier that only enforces a subset of the four-section contract. On this reading the issue could move to agent-ready with a local CI check scoped against the current (or bumped) pin.pr-issue-linkagereusable workflow), which is an unconditional dependency-pin gate trigger for this lane regardless of how clear the resolution looks.Per this lane's standing rule, a split panel stays gated (
needs-human).RECOMMENDED — approve bumping the
pr-issue-linkagereusable-workflow pin used by this repo fromv0.10.2/e9443874tov0.14.2/7107b348. This is the ref 6 of 9 org repos already run, the workflow file is byte-identical fromv0.14.2throughmain, and it resolves the stale-premise question directly (this repo would then enforce the same four-section contract as its siblings). Once bumped,.claude/source-control.md's mirror stays as previously settled (keep + check).ALTERNATIVE — reject the pin bump and instead scope a local revalidation check that re-derives the four-section contract from the currently-pinned
e9443874ref (parsed defensively from the workflow's inline script, since no schema/data-file form exists). More code, avoids a pin change, but still substitutes local logic for the reusable workflow's own guarantee — still needs a human okay since it's a deliberate divergence from 6/9 sibling repos' contract.Both options are compatible with the
.claude/source-control.mdkeep-and-check decision already recorded above; neither requires re-opening that part.kyle-sexton commentedon Aug 23, 2026
Claiming for gate-audit re-check (role-label legitimacy panel).
kyle-sexton commentedon Aug 23, 2026
Gate-audit complete; releasing claim. Gate left in place (see decision-ready summary above).
kyle-sexton commentedon Aug 27, 2026
This was generated by AI in a documentation-lane worker (
dotgithublane).Not resolved here. This item was routed to a lane scoped to small documentation and prose changes, alongside #68, #74, and #99. It is not one: the only unblocked implementation path is still a reusable-workflow pin bump. Leaving it gated, with two findings that narrow the decision.
Finding 1 — the addendum's "no canonical machine-readable form" claim is wrong
The escalation addendum above concluded that
requiredSections"has no canonical machine-readable form," having searchedmelodic-software/ci-workflowsonly. There is one, inmelodic-software/standards:components/pr-convention-policy/policy.json{ "schemaVersion": 1, "title": { "allowedTypes": ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "security", "style", "test"], "requireScope": false }, "body": { "requiredSections": ["Summary", "Fix", "Verification", "Related"], "closingKeywords": ["Closes", "Fixes", "Resolves"], "noIssueMarkers": ["No linked issue", "No related issue"] } }It has a schema (
policy.schema.json), an analyzer (pr-convention-policy.mjs), and tests that run in standards' own CI. It is exactly the non-duplicating comparison target this issue's acceptance criteria ask for, and it is versioned data rather than an array parsed out of an inlineactions/github-scriptblock.Finding 2 — but an accepted ADR forecloses building on it here
melodic-software/standardsdocs/adr/0005-retire-pr-convention-policy-distribution.md(accepted 2026-08-19, supersedes ADR-0003) retired distribution of that component to consumers, on the evidence that the five consuming repositories vendored it and never invoked it. It keepspolicy.jsonas "the machine-readable convention source" while stating:A drift check in this repository that reads standards'
policy.jsonis a consumer-side analyzer. So the design that Finding 1 makes technically clean is closed by governance, not by taste, and opening it requires a new ADR instandardsrather than a PR here.What that leaves
Option (ii) from the escalation (build a local check) is now foreclosed as scoped, and options (i)/(iii)/(iv) were already ruled out above. The option space collapses to the pin bump, matching this issue's existing RECOMMENDED.
One point in its favor that had not been checked:
7107b348(v0.14.2) is already present in standards'components/runner-policy/policy.jsonunderapprovedSelectorReferencesByRepositoryOwner."melodic-software". Those entries areselect-runner.yml@<sha>, notpr-issue-linkage.yml@<sha>, so this does not show the allowlist gatingpr-issue-linkagedirectly; what it shows is that the ref itself has been independently reviewed, which is the preconditionREADME.mdnames for moving a reusable-workflow pin ("the standards runner-policy allowlist admits only independently reviewed refs, so those move through explicit reviewed pull requests"). The bump would not be introducing an unreviewed ref.Two operational notes for whoever executes it:
pr-issue-linkage.ymlruns onpull_request_targetagainst the base-branch definition, so the bump takes effect on every open PR at its nextsynchronizeoreditedevent, not just on PRs opened afterwards. Any open PR whose body lacks a non-empty## Summary,## Fix, or## Verificationgoes red at that moment. Worth landing when the queue is short or checking the open PRs' bodies first.Recommendation unchanged: bump
.github/workflows/pr-issue-linkage.ymlfrome94438746c300b02385a7f8a2a2dcd19a7f4ad4a(v0.10.2) to7107b34832a7b6db5d08d3b132621c599fbe5e50(v0.14.2). Stillneeds-human; no code was written and nothing was pushed for this item.ci: bump the pr-issue-linkage pin to the four-section contract (#105)
ci: fail when local PR-section declarations drift from the pinned con…
chore(ci): drop history and ticket residue from ci.yml comments