{"version":12,"agent":"review","message":"record and publish note two things git users know the hard way, without blocking. (1) A file that holds what looks like a git conflict (a '<<<<<<< ' line, a '=======' line, then a '>>>>>>> ' line, other than abso's own blocks) gets: 'Note: <file> has lines that look like a git conflict (from line N)...'. (2) A sent path of 160+ characters inside the folder, or 240+ with the folder's location, gets a note that Windows stops at 260. Both are one line per file, only when the file is sent, and the JSON carries gitMarkers and longPaths. gitMarkerLine is in settle.ts, longPathsOf in commands.ts. Tests: three new ones; the whole suite passes (702) and biome ci is clean.","time":1791514010730,"timeIso":"2026-10-09T02:46:50.730Z","changes":3,"change":104,"files":["client/src/commands.ts","client/src/settle.ts","client/test/client.test.ts"],"draft":null,"diff":[{"path":"client/src/commands.ts","added":66,"removed":3,"diff":"--- a/client/src/commands.ts\n+++ b/client/src/commands.ts\n@@ -75,6 +75,8 @@\n \tstaleModText,\n } from \"./status-commands.ts\";\n \n+import { gitMarkerLine } from \"./settle.ts\";\n+\n // --- record ---\n \n interface Recorded {\n@@ -91,6 +93,10 @@\n \treadonly news: News;\n \treadonly leftOut: readonly LeftOut[];\n \treadonly turnedBinary: readonly TurnedBinary[];\n+\t/** Text files sent that hold what looks like a git conflict (a merge git left unfinished, or markers typed by hand). */\n+\treadonly gitMarkers?: readonly { path: string; line: number }[];\n+\t/** Sent files whose path is long enough to fail on Windows, here or in another agent's folder. */\n+\treadonly longPaths?: readonly { path: string; length: number }[];\n }\n \n /** The warning for text files that turned binary: what, where, and what to do. Empty when there are none. */\n@@ -239,14 +245,63 @@\n \t\t...(answer.spelling ?? []).map(spellingText),\n \t\t...(answer.uncomposed ?? []).map(uncomposedText),\n \t]);\n-\treturn { sent, paths, deleted, added, changed: answer.changed, news: answer.news, leftOut, turnedBinary };\n+\tconst longPaths = longPathsOf(\n+\t\troot,\n+\t\t[...files].filter(([, text]) => text !== null).map(([path]) => path),\n+\t);\n+\tconst gitMarkers = [...files]\n+\t\t.flatMap(([path, text]) => {\n+\t\t\tconst line = text === null ? undefined : gitMarkerLine(text);\n+\t\t\treturn line === undefined ? [] : [{ path, line }];\n+\t\t})\n+\t\t.sort((a, b) => (a.path < b.path ? -1 : 1));\n+\treturn {\n+\t\tsent,\n+\t\tpaths,\n+\t\tdeleted,\n+\t\tadded,\n+\t\tchanged: answer.changed,\n+\t\tnews: answer.news,\n+\t\tleftOut,\n+\t\tturnedBinary,\n+\t\tgitMarkers,\n+\t\tlongPaths,\n+\t};\n }\n \n+/** A note per file that holds what looks like a git conflict: abso records it as it is, as text, and does not call it a collision. */\n+export function gitMarkerText(list: readonly { path: string; line: number }[] | undefined): string[] {\n+\treturn (list ?? []).map(\n+\t\t(m) =>\n+\t\t\t`Note: ${m.path} has lines that look like a git conflict (from line ${m.line}). abso records them as ordinary text and will publish them as they are. If a merge was left unfinished, fix the file first.`,\n+\t);\n+}\n+\n+/** Windows stops at 260 characters for a whole path, and another agent's folder may sit deeper than this one. */\n+const LONG_FULL_PATH = 240;\n+const LONG_RELATIVE_PATH = 160;\n+\n+/** The sent files whose path will likely fail to write on Windows: the whole path is near its limit here, or the part inside the folder is already long. */\n+export function longPathsOf(root: string, paths: Iterable<string>): { path: string; length: number }[] {\n+\treturn [...paths]\n+\t\t.map((path) => ({ path, length: absolute(root, path).length }))\n+\t\t.filter((p) => p.length >= LONG_FULL_PATH || p.path.length >= LONG_RELATIVE_PATH)\n+\t\t.sort((a, b) => (a.path < b.path ? -1 : 1));\n+}\n+\n+/** A note per long path: abso keeps it, but a Windows agent may not be able to write the file. */\n+export function longPathText(list: readonly { path: string; length: number }[] | undefined): string[] {\n+\treturn (list ?? []).map(\n+\t\t(p) =>\n+\t\t\t`Note: ${p.path} is ${p.path.length} characters inside the folder (${p.length} with this folder's location). Windows stops at 260 for a whole path, so an agent on Windows may be unable to write it. A shorter path avoids that.`,\n+\t);\n+}\n+\n /** \"Recorded 3 files first: a, b, c.\" (names cut short past 8), or a word that the folder is paused. Empty when nothing was sent. */\n export function recordedFirst(r: Recorded): string[] {\n \tif (r.paused) return [\"Recording is paused (abso resume): your folder's changes were not sent first.\"];\n \tif (r.sent === 0) return [];\n-\treturn [`Recorded first: ${recordedList(r)}.`];\n+\treturn [`Recorded first: ${recordedList(r)}.`, ...gitMarkerText(r.gitMarkers), ...longPathText(r.longPaths)];\n }\n \n /** \"2 changed (a, b), 3 deleted (x, y, z)\": deletions said as such (#37, Builder 2 read its rm'd files as edits). */\n@@ -307,13 +362,21 @@\n \t\t\t: `Recorded ${recordedList(r)}${changed === undefined ? \"\" : `; ${changed} changed on the server`}.`;\n \treturn withLeftOut(\n \t\t{\n-\t\t\ttext: [...turnedBinaryText(r.turnedBinary), text, ...leftOutText(r.leftOut)].join(\"\\n\"),\n+\t\t\ttext: [\n+\t\t\t\t...turnedBinaryText(r.turnedBinary),\n+\t\t\t\ttext,\n+\t\t\t\t...gitMarkerText(r.gitMarkers),\n+\t\t\t\t...longPathText(r.longPaths),\n+\t\t\t\t...leftOutText(r.leftOut),\n+\t\t\t].join(\"\\n\"),\n \t\t\tjson: {\n \t\t\t\tsent: r.sent,\n \t\t\t\tchanged: r.changed ?? null,\n \t\t\t\tnews: newsLines(r.news),\n \t\t\t\tleftOut: r.leftOut,\n \t\t\t\tturnedBinary: r.turnedBinary,\n+\t\t\t\tgitMarkers: r.gitMarkers ?? [],\n+\t\t\t\tlongPaths: r.longPaths ?? [],\n \t\t\t},\n \t\t},\n \t\tr.leftOut,"},{"path":"client/src/settle.ts","added":19,"removed":0,"diff":"--- a/client/src/settle.ts\n+++ b/client/src/settle.ts\n@@ -100,3 +100,22 @@\n \t\treturn 0;\n \t}\n }\n+\n+/**\n+ * The first line (1-based) of what looks like a git conflict left in a text: a \"<<<<<<< \" line, then a \"=======\" line,\n+ * then a \">>>>>>> \" line. abso's own blocks are not these (their opening line is exact, and `abso settle` finds them);\n+ * a merge done by git, or markers typed or pasted by hand, are plain text to abso, which would publish them as they are.\n+ */\n+export function gitMarkerLine(text: string): number | undefined {\n+\tconst lines = text.split(/\\r?\\n/);\n+\tfor (let i = 0; i < lines.length; i++) {\n+\t\tif (!lines[i]!.startsWith(\"<<<<<<< \") || lines[i] === OPEN) continue;\n+\t\tlet mid = false;\n+\t\tfor (let j = i + 1; j < lines.length; j++) {\n+\t\t\tif (lines[j]!.startsWith(\"<<<<<<< \")) break;\n+\t\t\tif (lines[j] === MID) mid = true;\n+\t\t\telse if (mid && lines[j]!.startsWith(\">>>>>>> \")) return i + 1;\n+\t\t}\n+\t}\n+\treturn undefined;\n+}"},{"path":"client/test/client.test.ts","added":41,"removed":1,"diff":"--- a/client/test/client.test.ts\n+++ b/client/test/client.test.ts\n@@ -51,7 +51,7 @@\n import { pulledText } from \"../src/queue.ts\";\n import { noteText, titleLine } from \"../src/review.ts\";\n import { screenAnswer, throughLink, unsafeLink, unsafePath } from \"../src/safety.ts\";\n-import { findBlocks, keepFrom, settleText } from \"../src/settle.ts\";\n+import { findBlocks, gitMarkerLine, keepFrom, settleText } from \"../src/settle.ts\";\n import { tar } from \"../src/tar.ts\";\n import { type Fake, startFake, untar } from \"./fake-server.ts\";\n \n@@ -4340,3 +4340,43 @@\n \t\tfor (const [path, data] of files) assert.deepEqual(back.get(path), data);\n \t});\n });\n+\n+describe(\"git conflict markers typed or left by hand\", () => {\n+\tit(\"finds what looks like a git conflict, and not abso's own blocks or a lone marker\", () => {\n+\t\tconst git = \"a\\n<<<<<<< HEAD\\nmine\\n=======\\ntheirs\\n>>>>>>> feature\\nb\\n\";\n+\t\tassert.equal(gitMarkerLine(git), 2);\n+\t\tassert.equal(gitMarkerLine(git.replaceAll(\"\\n\", \"\\r\\n\")), 2, \"CRLF files too\");\n+\t\tassert.equal(gitMarkerLine(\"a\\n=======\\nb\\n\"), undefined, \"a lone ======= is a heading underline\");\n+\t\tassert.equal(gitMarkerLine(\"<<<<<<< HEAD\\nmine\\n\"), undefined, \"no middle and no close\");\n+\t\tconst mine =\n+\t\t\t'<<<<<<< yours (unpublished)\\nx\\n||||||| before (version 3)\\ny\\n=======\\nz\\n>>>>>>> theirs: bob, version 4 \"m\"\\n';\n+\t\tassert.equal(gitMarkerLine(mine), undefined, \"abso's own blocks are settled with abso settle\");\n+\t});\n+\n+\tit(\"record and publish say so, once, and still send the file\", async () => {\n+\t\tconst { folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n+\t\tconst dir = folders.alice!;\n+\t\twriteFileSync(join(dir, \"a.txt\"), \"a\\n<<<<<<< HEAD\\nmine\\n=======\\ntheirs\\n>>>>>>> feature\\n\");\n+\t\tconst said = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.equal(said.exit, 0, said.stdout);\n+\t\tassert.match(said.stdout, /Note: a\\.txt has lines that look like a git conflict \\(from line 2\\)/);\n+\t\tconst again = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.doesNotMatch(again.stdout, /git conflict/, \"nothing new was sent, so nothing to say\");\n+\t});\n+});\n+\n+describe(\"paths too long for Windows\", () => {\n+\tit(\"notes a long path once, as it is sent, and sends the file\", async () => {\n+\t\tconst { folders } = await project({ \"a.txt\": \"a\\n\" }, \"alice\");\n+\t\tconst dir = folders.alice!;\n+\t\tconst long = `${\"d\".repeat(80)}/${\"e\".repeat(80)}/f.txt`;\n+\t\tmkdirSync(join(dir, dirname(long)), { recursive: true });\n+\t\twriteFileSync(join(dir, long), \"deep\\n\");\n+\t\tconst said = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.equal(said.exit, 0, said.stdout);\n+\t\tassert.match(said.stdout, /Note: d{80}\\/e{80}\\/f\\.txt is 167 characters inside the folder/);\n+\t\tassert.match(said.stdout, /Windows stops at 260/);\n+\t\tconst again = await main([\"record\"], { cwd: dir, env: ENV, write: () => {} });\n+\t\tassert.doesNotMatch(again.stdout, /Windows stops at 260/, \"nothing new was sent\");\n+\t});\n+});"}],"ci":null}