Skip to content

codeSplitter shadow mode: build and test each merge git conflicted on and we didn't #1043

Closed

Description

@QuinnsCode

Follow-up to #1014.

scripts/shadow.ts replays this repo's 653 real merges (543 squash merges, plus 110 times a branch took main in) through git's merge and codeSplitter's. In 139 files git conflicted and codeSplitter merged clean. It compares each with what actually landed (the PR's own resolution, which CI passed):

  • 61 are exactly what landed
  • 29 have the same lines in another order (both sides' new tests or rows, the other one first)
  • 49 differ in content

Most of the 49 are fixes the resolver made in the merge commit itself, not merge mistakes. In #241 e2caa52 main renamed the sandbox's /test to /deps-test while the branch kept calling /test, so the merge commit also renamed the calls in src/deps.ts and test/deps.test.ts. A line merge can't see that. Only running the tests does.

The issue asked for each git-only result to be built and tested. The script only checks it against what landed and lints it. Next:

  • --check: for each merge with git-only files, make a throwaway worktree at main's side, write in ours for every file (git's clean result for the rest), bun install, and run the touched apps' tests (scripts/ci-apps.ts). Record pass/fail beside each file.
  • Each failure becomes a fixture in test/conflicts.test.ts or a fix issue.

Local only, no live resources. Slow (an install per merge), so opt in with --check and --pr.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions