Skip to content

fix(repo): merge the em-dash and shared-copies line lists with git's union driver - #11113

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/em-dash-allowlist-union-merge
Oct 30, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/em-dash-allowlist-union-merge

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

No related issue: removes a merge-conflict hotspot measured on #11056, #11060 and #11062

Lane: PR Lane Automation

Summary

scripts/em-dash-purged-paths.txt conflicts on nearly every concurrent docs pull request, and each resolution has been the union of both sides' lines. This PR has git's built-in union merge driver do that resolution for it, and for one more line list with the same history.

Fix

A new scripts/.gitattributes sets merge=union on the two lists below. It is a nested file, not a section of the root .gitattributes, because the root one syncs from melodic-software/standards (distribution/sync-manifest.yml, repository-text) and pr-check-managed-files rejects a hand edit to it. Git applies a nested .gitattributes to the paths below it. scripts/affected-tests-no-suite.txt lists the new file beside the root one, since no shell suite covers either.

  • scripts/em-dash-purged-paths.txt. scripts/check-purged-em-dashes.sh does not check order. It fails a stale entry, which is what a union that brings back a line one side removed would leave. A duplicate glob is harmless, because the expanded file list is passed through sort -u.
  • scripts/shared-copies.txt. Since 60 days ago it has 27 merge commits whose result differs from both parents, the most of any line list in scripts/. scripts/sync-shared-copies.sh does not depend on line order. It exits 2 on a path registered twice and on a missing canonical, and --check (run in pr-require-checks.yml) reports DRIFT for a registered copy that is missing.

Considered and left out:

  • scripts/cross-plugin-source-registry.txt: its <canonical> -> <member> cluster lines are read only by registry-filter.py, and no check fails on them. If one side edits a cluster line while the other adds a line beside it, union keeps both versions and nothing fails.
  • scripts/skill-leaf-name-registry.txt: its check requires entries in leaf-name order.
  • scripts/suite-seconds.txt: it holds one path seconds value per path. If two sides update the same path, union produces a duplicate key, and no check is known to catch it.
  • .lycheeignore: no merge commit with a resolution in the last 60 days.

No changelog fragment: fragments are per plugin (scripts/new-changelog-fragment.sh), and this PR touches no plugin.

Verification

In this worktree, on the scripts/.gitattributes commit, two temporary branches each appended a different docs/adr/*.md path at the end of the allowlist. Then they were merged:

  • Control (both branches forked from origin/main, which has no attribute): CONFLICT in scripts/em-dash-purged-paths.txt. The merge was then aborted.
  • Treatment (both branches forked from this PR's commit): the merge was clean, and both lines were present. scripts/check-purged-em-dashes.sh reported 397 declared paths, 1517 files scanned, no em dashes. and exited 0.

Both temporary branches were deleted. git check-attr merge reports union for the two files and unspecified for scripts/suite-seconds.txt.

The attribute applies to every merge that local git runs, which includes the base merge in /source-control:pull-request ready. The merge-base lane under .github/scripts/merge-base/ reads gitattributes from the trusted base tree, so it picks up the attribute once this PR is on main. UNVERIFIED: whether GitHub's server-side mergeability check and the merge queue honor merge=union.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 29, 2026 21:03
…union driver

scripts/em-dash-purged-paths.txt and scripts/shared-copies.txt conflict on
most concurrent pull requests, and every resolution is the union of both
sides. Neither list's order carries meaning, and each list's gate fails what
a bad union can leave behind (a stale entry, a duplicate, a missing copy), so
git's built-in union driver resolves them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 30, 2026 02:45
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T02:48:02.232076Z a5cbe42 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The root .gitattributes syncs from melodic-software/standards, and
pr-check-managed-files rejects a hand edit to it. Git reads a nested
.gitattributes for the paths below it, so the two line lists get
merge=union from scripts/.gitattributes instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 670db97449cfe5a5dcb939d276bcf560027341bb: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

I read the full diff, which has two files, and the PR description.

  • scripts/.gitattributes (new): It sets merge=union on em-dash-purged-paths.txt and shared-copies.txt. This changes how git resolves a textual conflict in two line lists. Each side's lines come from a head that already went through review, so union can't add a line that neither side had. The failure mode is that it can bring back a line one side removed. The PR says check-purged-em-dashes.sh fails a stale entry, and sync-shared-copies.sh --check fails a duplicate, a missing canonical or a missing copy. I did not open those scripts, so I'm relying on the PR's account of them.
  • Trust controls: The diff doesn't touch the trusted-actor list, the token request or broker code, the kill switch, a merge hold, the token signer or anything else under .github/actions/. It touches no workflow and no plugin.json or marketplace.json. The root .gitattributes is untouched, so the managed-files check is not bypassed. None of the changed paths matches a TRUSTED PATHS glob, so there was no trusted-path change to read in full.
  • scripts/affected-tests-no-suite.txt: This adds one exempt-path line for the new file. It is not a gate bypass, because the file has no shell suite.
  • Instruction surfaces: The diff removes or softens no instruction.
  • PR context: The text carries no embedded directives aimed at the lane.

Manifest items: none hit.

Spend: nothing in this change can bill. It adds no paid plan, billed resource, lane run or schedule.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 670db97449cfe5a5dcb939d276bcf560027341bb: 0 finding(s), 0 as inline comments.

No findings. I read the full diff (2 files) and the PR context. I only checked that the files the diff names exist at head: scripts/em-dash-purged-paths.txt, scripts/shared-copies.txt, scripts/check-purged-em-dashes.sh and scripts/sync-shared-copies.sh. I did not run git, so I did not run the merge test the author describes. That test is author-claimed and unverified by me.

  • scripts/.gitattributes: it sets merge=union on the two line lists. A nested .gitattributes applies to paths below it, so the attribute reaches both files without touching the root file that syncs from standards. The comment's account of the gates is consistent with the PR description: a stale entry, a duplicate, a missing canonical or a missing registered copy fails a check, so a bad union does not pass silently.
  • scripts/affected-tests-no-suite.txt: the new scripts/.gitattributes entry sits beside the root .gitattributes entry, as the PR describes.
  • No closing issue: the PR states none, so there are no acceptance criteria to check.
  • Open question the author flags: whether GitHub's server-side mergeability check and the merge queue honor merge=union is unverified. It affects how much of the benefit shows up on GitHub, but the change is safe either way.
  • Manifests and security: no plugin manifests are touched, so there are no manifest lines. I found nothing in the diff with a security impact.
  • Spend: none.

kyle-sexton and others added 2 commits October 29, 2026 22:47
Like the root .gitattributes, it is repository configuration git reads on
every merge; no *.test.sh covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@kyle-sexton
kyle-sexton enabled auto-merge October 30, 2026 03:13
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit a955d6b Oct 30, 2026
98 of 102 checks passed
@kyle-sexton
kyle-sexton deleted the fix/em-dash-allowlist-union-merge branch October 30, 2026 03:20
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