{"version":161,"agent":"speed","message":"A pull keeps the news of what a settle kept: it used to drop it with the news it makes moot, though the pull only brings the file, not whose side survived","time":1791923200404,"timeIso":"2026-10-13T20:26:40.404Z","changes":4,"change":2097,"files":["client/test/held-push.test.ts","worker/project/apply-entry.ts","worker/project/news.ts","worker/project/sync.ts"],"draft":null,"diff":[{"path":"client/test/held-push.test.ts","added":11,"removed":0,"diff":"--- a/client/test/held-push.test.ts\n+++ b/client/test/held-push.test.ts\n@@ -103,6 +103,17 @@\n \t\tassert.ok(news.out.includes(`Its held push said: \"${HELD}\"`), news.out);\n \t});\n \n+\tit(\"a pull doesn't drop the news of what a settle kept\", async () => {\n+\t\tconst { alice, bob } = await held();\n+\t\tassert.equal((await run(bob, \"pull\")).exit, 0);\n+\t\tassert.equal((await run(bob, \"settle\", \"store-policy.md\", \"--both\")).exit, 0);\n+\t\tassert.equal((await run(bob, \"push\", \"-m\", \"Settle: keep both\")).exit, 0);\n+\t\tconst pulled = await run(alice, \"pull\");\n+\t\tassert.equal(pulled.exit, 0, pulled.out);\n+\t\tconst news = await run(alice, \"news\");\n+\t\tassert.match(news.out, /bob settled its collision with your version 1 in store-policy\\.md, pushing version 2/);\n+\t});\n+\n \tit(\"the change page says what a settle kept in words that read for each choice\", async () => {\n \t\tfor (const [how, said] of [\n \t\t\t[\"yours\", \"kept bob's\"],"},{"path":"worker/project/apply-entry.ts","added":3,"removed":2,"diff":"--- a/worker/project/apply-entry.ts\n+++ b/worker/project/apply-entry.ts\n@@ -3,6 +3,7 @@\n // which space) is applied first, in spaces.ts.\n \n import type { AtomId, Graph } from \"../../src/engine/index.ts\";\n+import { outlastsSync } from \"./news.ts\";\n import { ProjectError } from \"./project-error.ts\";\n import type {\n \tAgentState,\n@@ -211,11 +212,11 @@\n \t\t}\n \t\tcase \"heard\": {\n \t\t\tconst agent = host.agentOf(entry.agent);\n-\t\t\t// A sync's stale heard keeps announcements, so it hears no tell.\n+\t\t\t// A sync's stale heard keeps announcements and settles' news (outlastsSync), so it hears no tell.\n \t\t\tif (entry.stale !== true)\n \t\t\t\tfor (const tell of host.tells.values())\n \t\t\t\t\tif (tell.heard.get(agent.name) === null) tell.heard.set(agent.name, { at: time });\n-\t\t\tconst keep = agent.news.map((t) => entry.stale === true && t.startsWith(\"Announcement from \"));\n+\t\t\tconst keep = agent.news.map((t) => entry.stale === true && outlastsSync(t));\n \t\t\tagent.news = agent.news.filter((_, i) => keep[i]);\n \t\t\tagent.newsAt = agent.newsAt.filter((_, i) => keep[i]);\n \t\t\tbreak;"},{"path":"worker/project/news.ts","added":8,"removed":0,"diff":"--- a/worker/project/news.ts\n+++ b/worker/project/news.ts\n@@ -122,6 +122,14 @@\n \t};\n }\n \n+/**\n+ * News a sync doesn't make moot, so it is kept through one: announcements,\n+ * and what a settle kept (the pull brings the file, not whose side survived).\n+ */\n+export function outlastsSync(text: string): boolean {\n+\treturn text.startsWith(\"Announcement from \") || / settled its collision with your version \\d+ in /.test(text);\n+}\n+\n const SETTLED_WHAT: Record<Kept, string> = {\n \ttheirs: \"it kept your lines\",\n \tyours: \"it kept its own lines, not yours\","},{"path":"worker/project/sync.ts","added":2,"removed":1,"diff":"--- a/worker/project/sync.ts\n+++ b/worker/project/sync.ts\n@@ -3,6 +3,7 @@\n // SyncHost; today the host is Project.\n \n import type { AtomId, Graph, ReadView } from \"../../src/engine/index.ts\";\n+import { outlastsSync } from \"./news.ts\";\n import { ProjectError } from \"./project-error.ts\";\n import type { AgentState, Entry, MergedLine, SyncAnswer } from \"./project-types.ts\";\n import { last, SHARED, type Space } from \"./spaces.ts\";\n@@ -79,7 +80,7 @@\n \tentries.push({ type: \"sync\", agent: agent.name, version: target });\n \thost.apply(entries[entries.length - 1]!);\n \t// News about versions the agent has now synced past is moot: the sync answer lists what's still open (#37).\n-\tif (agent.news.some((t) => !t.startsWith(\"Announcement from \"))) {\n+\tif (agent.news.some((t) => !outlastsSync(t))) {\n \t\tconst heard: Entry = { type: \"heard\", agent: agent.name, stale: true };\n \t\tentries.push(heard);\n \t\thost.apply(heard);"}],"ci":null}