Versions 97 to 318
new file, 196 lines
11+
16+
19+ console.error("usage: node scripts/autosettle/extract.ts <seat folder> <cases.json> [--since 8d]");
22+const since = process.argv.includes("--since") ? process.argv[process.argv.indexOf("--since") + 1]! : "8d";
24+ execFileSync("abso", args, { cwd: seat, encoding: "utf8", maxBuffer: 1 << 28, shell: process.platform === "win32" });
25+
33+
50+for (const c of review.changes) for (const v of c.versions ?? []) messages.set(v.version, v.message);
62+
64+ /** 0-based start and length on each side; a length of 0 is an insertion before (or deletion at) start. */
70+
78+ text = execFileSync("git", ["diff", "--no-index", "-U0", "--no-color", join(dir, "a"), join(dir, "b")], {
100+
106+
108+ * The collisions a settle went through in one file: each of their hunks (before to theirs) that the
114+ const touches = (h: Hunk, g: Hunk) => g.aStart <= h.bStart + h.bLen && h.bStart <= g.aStart + g.aLen;
131+ context: { before: theirs.slice(Math.max(0, tStart - 15), tStart), after: theirs.slice(tEnd, tEnd + 15) },
136+
152+ // Marker blocks the settler changed, in file order; a block where it kept theirs left no trace to find.
160+ else if (!r) notes.push(`found ${found.length} changed regions for ${changed.length} settled blocks`);
162+ notes.push(`found ${found.length} changed regions for ${changed.length} settled blocks: the pairing may be off`);
167+ if (tail.join("\n") === r.theirs.join("\n")) yours = r.result.slice(0, r.result.length - r.theirs.length);
169+ } else if (r) notes.push(`yours isn't recoverable from the result when the agent kept ${s.kept}`);
180+ theirs: { agent: s.theirs.agent, version: s.theirs.version, message: messageOf(s.theirs.version) },
195+ `${cases.length} settled collisions: yours ${count("yours")}, theirs ${count("theirs")}, both ${count("both")}, rewrote ${count("rewrote")}; ${cases.filter((c) => c.yours !== null).length} with both sides recoverable.`,
- MCP
- compare on this site's /mcp
- CLI
- abso diff 97 318 scripts/autosettle/extract.ts --json
- JSON
- /christopher/abso-core/compare/97..318?file=scripts%2Fautosettle%2Fextract.ts&format=json