Skip to content

Every open PR conflicts with every other in references.bib and inst/WORDLIST; add a resolver or merge driver #236

Description

@dem-extra1

A pairwise git merge-tree sweep of the 23 open PRs on 2026-09-10 (253 pairs examined, legacy three-argument form with a self-merge negative control) found 231 conflicting pairs: every pair of content PRs collides in references.bib, 33 pairs also collide in inst/WORDLIST, and one pair (#219 x #231) collides in chapters/coding-agents.qmd.

The cause is structural, not any one PR: every fragment appends its bibliography entries at the end of references.bib and inserts wordlist entries into the same sorted file, so any two PRs edit the same hunk. After each merge, every remaining PR needs a sync from main and a hand resolution whose correct answer is always "keep both".

Options, cheapest first:

  • Add a deterministic resolver script (scripts/resolve-shared-files.py) that, on a conflicted references.bib, takes the union of @entry{key,...} blocks (failing on a duplicate key with differing bodies) and, on a conflicted inst/WORDLIST, takes the sorted union of lines, so a sync-with-main round is one command.
  • Declare inst/WORDLIST merge=union in .gitattributes (duplicate words are harmless there). Do not do this for references.bib: two PRs adding the same key would merge silently into a duplicate-key bibliography.
  • Longer term, split references.bib per chapter or per fragment so unrelated PRs stop sharing a file.

The sweep script that found this is small enough to add as scripts/pr-overlap-sweep.py; it must use the three-argument merge-tree form on this machine (git 2.37 has no --write-tree), and it reports pairs examined alongside pairs conflicting so a detector that never ran cannot read as a clean matrix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions