Skip to content

Merge main without a model: a tool that resolves conflicts in regenerated files by regenerating them #6732

Closed

Description

@squid-protocol

Why. Of the churn fix runs from 2026-10-18 to 10-26, 25% (107 of 436) were conflicts with main or a PR gone stale against main. They climbed with volume: 41 on 10-24 alone. Most of the conflicted files are regenerated, not hand-written:

  • golden scan outputs (llm_brief.json, pagerank.json, gpu_json.json)
  • graph_comparison_ledger.json, the det-sweep coverage ledger, infeasible_outcomes.json
  • docs/language_status/register/*.md, mutation_testing.md, graph_accuracy.md, graph_coverage_chart.svg
  • .test_durations, evidence records

churn already lets GitHub's update-branch handle a clean merge (promoter-bot #20). A real conflict, even one confined to regenerated files, still costs a Sonnet fix run of about 0.3-1 h plus a CI round.

What. Add tests/tools/merge_main.py, which runs git merge origin/main and never rebases. For each conflicted file:

  • If it is regenerated, take main's side, then run the file's own regenerate command. rebase_rebless.py already covers goldens. Docs, ledgers and durations each have their writer tool.
  • If any conflicted file is hand-written, abort and exit 2. That case stays a worker's job.
  • At the end, run pr_gates --fast and print a JSON summary that churn can act on.

It needs one table: regenerated path pattern → regenerate command. That table should also feed promoter-bot's GENERATED_RE, so there is one source of truth. churn would then call this tool before queuing a fix run on a dirty PR whose conflicts are all regenerated.

Acceptance: replay 5 of the conflict fix runs from 10-24 (for example the det-ledger conflicts on cbpaup0c/paudbunl and the I5.md register conflict). Each must merge clean with no model.

Related: #6731 (derived-record gate), #6278 (change classifier).

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

    scope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions