Repository navigation
Merge conflicts mechanically first and never commit an unchecked merge - #987
Merged
Merged
Conversation
A conflicted merge of the base handed every file both sides changed to the model whole, cut at a size limit, and committed the reply after weak checks. A reply of prose followed by a rewritten file passed them. Each file is now merged three ways: changes only one side made apply mechanically, the model sees only a hunk both sides changed differently, and its reply must be that hunk's code. The merged file is checked before commit (no prose or markers, size within both sides' changes, both sides' added identifiers kept, it parses). A failed merge retries with smaller hunks, then pushes nothing and is recorded as CoderHelm's own problem. Incident case xy pins the invariant.
Contributor
|
🔴 Post-merge health check FAILED: the merge of
|
This was referenced Dec 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When merging the base into a branch hit a conflict, CoderHelm sent the whole of every file both sides had changed to the model. The files were cut at a size limit. It then committed the reply after three weak checks: the reply was not empty, it kept at least 30% of the smaller side, and a bracket scan was no worse than the branch's. A reply that opened with prose and then gave a rewritten file passed all three. It dropped most of the base's changes and was pushed without compiling. For a dashboard component, the right result was the base's file with the branch's two added lines.
Now no merge result is committed if it adds prose, drops either side's changes, or fails to parse.
Changes
passes::merge3: a line-based three-way merge (patience anchors plus exact matching). Changes that only one side made, or that both sides made the same way, apply mechanically, with no model. Lines both sides agree on are trimmed from the edges of a conflicting hunk.<resolved>tags, and anything around them is dropped. Prose, markdown fences and conflict markers inside the reply are refused. So is a reply longer than both sides together, or one that loses an identifier either side added.merge3::check_mergedruns on every merged file before commit:pr::resolve_conflictspushes nothing and leaves the branch as it was. It records the failure as anOwnProblem(Tooling: an internal alert, plus a run page line when the run is known) and returnsmerge3::Refusedwith the reason.await_mergeandbranch_updateread a refusal as the conflict still standing. Before this change, a failed check returnedOk(false), which some callers read as "nothing conflicted".pr::merge_file(also used byrestack) now goes through the same path. The whole-file merge prompt is gone.xy_merge_keeps_both_sides_and_parses(.rs and .md) replays the failure with invented content.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy -p common -p worker -p gateway --all-targets -- -D warningscargo test -p common -p worker -p gateway: all pass. The new tests cover:brand_spelling.py,domain_examples.py