Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
show on this site's /mcp
CLI
abso show 81 --json
JSON
/christopher/abso-core/versions/81?format=json

unseenIn compares a carriage return's next character in the same list it walks, so a CR not followed by a newline is found after emoji too. Tests with emoji before CR and CRLF.

of shared·engine··Not checked

Version 80 · Files at version 81

2 files, 5 lines added, 2 removed.

--- a/worker/project/test/unseen.test.ts
+++ b/worker/project/test/unseen.test.ts
@@ -21,6 +21,8 @@
2121 assert.equal(unseenIn(`a${CR}b`), "a control character at character 2");
2222 assert.match(unseenIn(`abc${RLO}def`)!, /bidirectional embedding or override/);
2323 assert.equal(unseenIn(`emoji 🎉 counts as one character ${ESC}`), "a control character at character 33");
24+ assert.equal(unseenIn(`😀😀😀\nB${CR}X`), "a control character at character 6", "a lone CR after emoji is found");
25+ assert.equal(unseenIn(`😀😀😀${CR}\nB`), null, "CRLF after emoji passes");
2426});
2527
2628test("publish, amend, land, starting notes and announcements refuse unseen characters before the engine sees them", () => {
--- a/worker/project/unseen.ts
+++ b/worker/project/unseen.ts
@@ -25,9 +25,10 @@
2525 * \n and \t pass, and so does \r before \n, since a message file written on Windows ends its lines that way.
2626 */
2727export function unseenIn(text: string): string | null {
28− for (const [i, ch] of [...text].entries()) {
28+ const chars = [...text];
29+ for (const [i, ch] of chars.entries()) {
2930 const c = ch.codePointAt(0)!;
30− if (c === 0x0d && text[i + 1] === "\n") continue;
31+ if (c === 0x0d && chars[i + 1] === "\n") continue;
3132 const hit = UNSEEN.find(([lo, hi]) => c >= lo && c <= hi);
3233 if (hit) return `${hit[2]} at character ${i + 1}`;
3334 }