Skip to content

fix(standards-sync): satisfy pr-issue-linkage in generated sync PR body - #146

Merged
kyle-sexton merged 1 commit into
mainfrom
ci/sync-pr-body-linkage
Jul 18, 2026
Merged

fix(standards-sync): satisfy pr-issue-linkage in generated sync PR body#146
kyle-sexton merged 1 commit into
mainfrom
ci/sync-pr-body-linkage

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Generated standards-sync PR bodies fail the pr-issue-linkage gate in every target repo: no closing keyword or opt-out marker, and no ## Related section. This adds both to the body template — the literal "No linked issue" opt-out (sync PRs close nothing) and a ## Related section linking the distributed standards source commit.

No linked issue.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01YZxBP1B8Hf7ZRaqDrP6ma9

Generated sync PR bodies fail the pr-issue-linkage gate: no closing
keyword or opt-out marker, and no "## Related" section. Emit the literal
"No linked issue" opt-out (sync PRs close nothing) and a "## Related"
section linking the distributed standards source commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YZxBP1B8Hf7ZRaqDrP6ma9
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 32s —— View job


PR Review

  • Gather context and read changed files
  • Review diff for correctness, security, and CLAUDE.md alignment
  • Post findings

Summary: This PR adds two things to the generated sync PR body in standards-sync.yml: a "No linked issue" opt-out marker and a ## Related section containing the source commit link. Both are required by the pr-issue-linkage reusable workflow that downstream consumers enforce as a required check.

Correctness

The two added lines precisely satisfy the two gates in pr-issue-linkage.yml:

  1. NO_ISSUE_MARKER check — the regex is /\bno (?:linked|related) issue\b/i. The phrase "No linked issue" at line 443 matches exactly. ✓

  2. ## Related section check — the gate requires the section to exist and be non-empty. The section added at lines 451–453 contains a markdown list item linking to the source commit, satisfying both conditions. ✓

The generated PR body will render as:

Automated exact-file synchronization from `melodic-software/standards@<SHA>` (requested ref `<REF>`).

No linked issue — recurring automated distribution, not tied to a tracked change.

Managed component mappings applied to `<TARGET>`:
<mapping table>

Review and merge this PR normally. Do not hand-edit these managed files downstream; change their standards source instead.

## Related

- `melodic-software/standards@<SHA>` — source commit this sync distributes.

The blank-line spacing around the new content is correct Markdown: double newline before ## Related and between the new prose paragraph and the mappings table.

Shell/printf hygiene

printf -- "- [...]" at line 452 correctly uses -- to prevent bash's printf from interpreting the leading - as an option flag. The backtick-containing format string is properly escaped within the double-quoted string (\``). The SHA is passed as a %spositional argument rather than interpolated into the format string, so there is no format-string injection risk even ifSTANDARDS_SHAsomehow contained%` characters. ✓

Security

STANDARDS_SHA flows from needs.plan.outputs.sha (a git SHA), TARGET from matrix.repo, and MANIFEST from inputs.manifest. None of these are user-PR-body content, and all are used as env vars or %s arguments — never spliced into shell command strings. The change does not alter any credential handling, permissions block, or trigger configuration. ✓

Minor observation — commit link appears twice in the body

The intro sentence already names and links the source commit (Automated exact-file synchronization from [melodic-software/standards@SHA](...)). The ## Related section then repeats that same link. The duplication is intentional and reasonable — the gate requires the section to have substantive content, and the source commit is the most meaningful thing to reference. Worth noting for context but not a blocker.

Alignment with CLAUDE.md

No workflow trigger types, permission blocks, or SHA pins were modified. The change is contained entirely within a run: step's shell script. CLAUDE.md rules are not implicated. ✓


Verdict: looks good. The fix is minimal, correctly targeted, and passes both pr-issue-linkage gate conditions.

@kyle-sexton
kyle-sexton merged commit 0b45b9f into main Jul 18, 2026
36 of 37 checks passed
@kyle-sexton
kyle-sexton deleted the ci/sync-pr-body-linkage branch July 18, 2026 16:35
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Jul 18, 2026
#201)

## What

Register `standards-sync.yml@0b45b9f` in the runner policy (contract
body copied from the reviewed `ec91c343` entry), record the lockstep
provenance note, and move `sync.yml`'s pin to it.

## Why

The sync wave still ran `standards-sync@ec91c34`, which predates the
PR-body template fix — every distributed sync PR failed its target's
pr-issue-linkage gate and needed a hand-patched body (dotfiles#225,
provisioning#175, claude-code-plugins#345 this wave). The
`ec91c343..0b45b9f` diff for the reusable is confined to the body
heredoc: it adds the "No linked issue" sentence and a `## Related`
section (melodic-software/ci-workflows#146); inputs, secrets,
permissions, and routing are unchanged.

## Verification

224/224 runner-policy component tests pass; the policy engine passes
with public visibility evidence; actionlint clean on sync.yml;
markdownlint + biome + lefthook gauntlet green.

## Related

No linked issue. melodic-software/ci-workflows#146 (template fix), #200
(public posture this builds on).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01YZxBP1B8Hf7ZRaqDrP6ma9

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
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