next-issue 6.6.64 → 6.6.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/dist/conflict.mjs +5 -1
- package/dist/git-merge.mjs +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,8 +88,11 @@ the run handles one issue. For each issue:
|
|
|
88
88
|
The budget is `maxCommitFixes`. Any other git failure in the commit stops
|
|
89
89
|
the run with an error. An implementer that makes no change hands the issue
|
|
90
90
|
to a person, unless the branch is already ahead of the base, for example
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
when an issue resumes from saved state in phase `claimed`, or when the remote
|
|
92
|
+
holds branch `<n>`: the run then carries on with the commits on the branch,
|
|
93
|
+
and the newest of them gives the subject of the landed commit. A lost state
|
|
94
|
+
file does not count, since an issue with no saved state resets its local
|
|
95
|
+
branch (step 3).
|
|
93
96
|
5. Let the reviewer agent judge the diff, at most `diffMaxChars` of it. The
|
|
94
97
|
reviewer reads files and runs commands in the worktree, so it can prove a
|
|
95
98
|
finding with the tests or the type check. The harness then throws away every
|
|
@@ -125,7 +128,12 @@ the run handles one issue. For each issue:
|
|
|
125
128
|
implementer's commit replaces it, and a fix for failed checks after the
|
|
126
129
|
landing lands under the fixer's own subject. The reapply commit after a
|
|
127
130
|
revert uses the subject of the change. When git merges the base cleanly,
|
|
128
|
-
no agent runs. When
|
|
131
|
+
no agent runs. When a conflicted file holds no conflict marker, for
|
|
132
|
+
example a file that one side deletes and the other changes, a renamed
|
|
133
|
+
file or a binary file that both sides change, no agent runs: the
|
|
134
|
+
harness undoes the merge and hands the issue to a person with the
|
|
135
|
+
reason `merge conflict`, since git leaves only one side in the file.
|
|
136
|
+
When git reports conflicted files, the fixer gets the
|
|
129
137
|
list from the check budget, `maxCiFixes`, removes the conflict markers,
|
|
130
138
|
and the harness commits the merge. A merge that the fixer commits itself
|
|
131
139
|
counts only when the branch then holds the base commit that was merged
|
package/dist/conflict.mjs
CHANGED
|
@@ -8,9 +8,13 @@ export async function rebase(job) {
|
|
|
8
8
|
const { config, ports, base } = context;
|
|
9
9
|
const title = state.title ?? fallbackTitle(issue);
|
|
10
10
|
const before = await ports.revision(worktree);
|
|
11
|
-
const { target, files } = await log.step('rebase', { base }, () => ports.startMerge(worktree, base, config.remote));
|
|
11
|
+
const { target, files, unmarked } = await log.step('rebase', { base }, () => ports.startMerge(worktree, base, config.remote));
|
|
12
12
|
if (files !== undefined) {
|
|
13
13
|
log.event('rebase.conflicts', { files }, 'quiet');
|
|
14
|
+
if (unmarked.length > 0) {
|
|
15
|
+
await ports.abortMerge(worktree, before);
|
|
16
|
+
return escalateAndFinish(job, `The change conflicts with ${base} in files that hold no conflict marker, such as a deleted, renamed or binary file: ${unmarked.join(', ')}.`, 'merge conflict');
|
|
17
|
+
}
|
|
14
18
|
const merged = await mergeBase(job, { before, target, files });
|
|
15
19
|
if (merged !== undefined) {
|
|
16
20
|
return merged;
|
package/dist/git-merge.mjs
CHANGED
|
@@ -8,14 +8,20 @@ export async function startMerge(cwd, base, remote) {
|
|
|
8
8
|
const target = await git(cwd, ['rev-parse', await fetchBase(cwd, base, remote)]);
|
|
9
9
|
const result = await run('git', ['merge', '--no-ff', '--no-commit', target], { cwd });
|
|
10
10
|
if (succeeded(result)) {
|
|
11
|
-
return { target, files: (await merging(cwd)) ? [] : undefined };
|
|
11
|
+
return { target, files: (await merging(cwd)) ? [] : undefined, unmarked: [] };
|
|
12
12
|
}
|
|
13
13
|
const listed = await git(cwd, ['diff', '--name-only', '--diff-filter=U']);
|
|
14
14
|
const files = lines(listed);
|
|
15
15
|
if (files.length === 0) {
|
|
16
16
|
throw new Error(`git merge ${target} failed: ${result.stderr.trim()}`);
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
const unmarked = [];
|
|
19
|
+
for (const file of files) {
|
|
20
|
+
if (!(await hasConflictMarkers(cwd, [file]))) {
|
|
21
|
+
unmarked.push(file);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { target, files, unmarked };
|
|
19
25
|
}
|
|
20
26
|
async function merging(cwd) {
|
|
21
27
|
return succeeds(cwd, ['rev-parse', '--quiet', '--verify', 'MERGE_HEAD']);
|