Repository navigation
fix(repo): merge the em-dash and shared-copies line lists with git's union driver - #11113
Conversation
…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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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>
|
claude-security-review reviewed No security issues found in this pull request. I read the full diff, which has two files, and the PR description.
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 |
|
claude-review reviewed 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:
|
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>
No related issue: removes a merge-conflict hotspot measured on #11056, #11060 and #11062
Lane: PR Lane Automation
Summary
scripts/em-dash-purged-paths.txtconflicts on nearly every concurrent docs pull request, and each resolution has been the union of both sides' lines. This PR has git's built-inunionmerge driver do that resolution for it, and for one more line list with the same history.Fix
A new
scripts/.gitattributessetsmerge=unionon the two lists below. It is a nested file, not a section of the root.gitattributes, because the root one syncs frommelodic-software/standards(distribution/sync-manifest.yml,repository-text) andpr-check-managed-filesrejects a hand edit to it. Git applies a nested.gitattributesto the paths below it.scripts/affected-tests-no-suite.txtlists the new file beside the root one, since no shell suite covers either.scripts/em-dash-purged-paths.txt.scripts/check-purged-em-dashes.shdoes 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 throughsort -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 inscripts/.scripts/sync-shared-copies.shdoes not depend on line order. It exits 2 on a path registered twice and on a missing canonical, and--check(run inpr-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 byregistry-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 onepath secondsvalue 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/.gitattributescommit, two temporary branches each appended a differentdocs/adr/*.mdpath at the end of the allowlist. Then they were merged:origin/main, which has no attribute):CONFLICTinscripts/em-dash-purged-paths.txt. The merge was then aborted.scripts/check-purged-em-dashes.shreported397 declared paths, 1517 files scanned, no em dashes.and exited 0.Both temporary branches were deleted.
git check-attr mergereportsunionfor the two files andunspecifiedforscripts/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 onmain. UNVERIFIED: whether GitHub's server-side mergeability check and the merge queue honormerge=union.Related
🤖 Generated with Claude Code