Table of contents
Read changes in context
Review each edit by responsibility: data flow, control flow, interfaces, and callers.
Avoid automatic keep-both decisions when declarations or side effects overlap.
Prove the merged file
Format and analyze the merged output.
Run the smallest relevant tests, then broader required checks.
Worked example: a retry fix that needs a behavior decision
Consider a retry helper that is supposed to retry temporary server failures but leave client errors alone. The original condition admits every status of 400 or higher. The revised condition limits the range to 500–599. That is a small textual edit with a much larger behavioral effect.
This example has one responsibility and an explicit expected result. For a real module, first identify callers, exported names, side effects, and the issue the change is meant to solve. Comparing unrelated revisions or generated bundles makes that reasoning harder.
Source A: retries client errors too
export function shouldRetry(status) {
return status >= 400;
}
Source B: limits retries to server errors
export function shouldRetry(status) {
return status >= 500 && status < 600;
}
Check the chosen implementation
import assert from "node:assert/strict";
import { shouldRetry } from "./retry.mjs";
assert.equal(shouldRetry(404), false);
assert.equal(shouldRetry(499), false);
assert.equal(shouldRetry(500), true);
assert.equal(shouldRetry(503), true);
assert.equal(shouldRetry(600), false);Review the example block by block
Open MergeGlass, paste the original function into A and the revised function into B, and select Text mode. Keep ignore-case and ignore-whitespace disabled for this first review. Choose B for the changed block and read the complete preview; it should contain exactly one function.
Keep both is not a generic conflict solver. In this example it can duplicate declarations or competing return statements, depending on the changed block boundaries. Neither is the intended implementation. If neither side expresses the desired behavior, edit a source copy and compare again.
The example policy deliberately does not retry 429. Your production retry policy may need rate-limit headers, idempotency checks, retry limits, or backoff. Write those requirements down before merging rather than copying this illustrative function as a complete networking policy.
Control noise without hiding meaningful changes
Formatting both inputs can make a large diff easier to read, but it also changes the evidence. Keep original copies and use the same formatter version and configuration for both sides. Do not format one side only and assume every resulting edit came from the author.
Whitespace and case are not universally cosmetic. Indentation affects Python structure, spaces inside strings affect output, and JavaScript identifiers are case-sensitive. Start with the exact comparison and enable an ignore option only after deciding that distinction is irrelevant.
After exporting, run the focused behavior checks above and the project-required checks. Review imports and callers even when the edited function passes its own test. A correct local helper can still break an integration that expects a different contract.
Try it yourself
Review a retry-condition fix
Choose the implementation that retries server errors (500–599) and leaves client errors alone. The guide includes executable checks for the result.
Try this example adds fictional sample data as a separate file review and keeps your existing reviews.
The download is a standalone practice session. Save your current work before importing it through Add or import → Import review bundle. Your own content is never included in the download.
Review checklist
- Use equivalent source files.
- Normalize only irrelevant differences.
- Check imports, names, and callers.
- Validate behavior after merge.