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 Version 161 of shared· speed· Oct 13 (2026-10-13 20:26 UTC) · Not checked
Version 160 · Files at version 161
4 files, 24 lines added, 3 removed.
--- a/client/test/held-push.test.ts
+++ b/client/test/held-push.test.ts
@@ -103,6 +103,17 @@
103 103 assert.ok(news.out.includes(`Its held push said: "${HELD}"`), news.out); 106 + it("a pull doesn't drop the news of what a settle kept", async () => { 107 + const { alice, bob } = await held(); 108 + assert.equal((await run(bob, "pull")).exit, 0); 109 + assert.equal((await run(bob, "settle", "store-policy.md", "--both")).exit, 0); 110 + assert.equal((await run(bob, "push", "-m", "Settle: keep both")).exit, 0); 111 + const pulled = await run(alice, "pull"); 112 + assert.equal(pulled.exit, 0, pulled.out); 113 + const news = await run(alice, "news"); 114 + assert.match(news.out, /bob settled its collision with your version 1 in store-policy\.md, pushing version 2/); 106 117 it("the change page says what a settle kept in words that read for each choice", async () => { 107 118 for (const [how, said] of [ 108 119 ["yours", "kept bob's"], --- a/worker/project/apply-entry.ts
+++ b/worker/project/apply-entry.ts
@@ -3,6 +3,7 @@
3 3 // which space) is applied first, in spaces.ts. 5 5 import type { AtomId, Graph } from "../../src/engine/index.ts"; 6 + import { outlastsSync } from "./news.ts"; 6 7 import { ProjectError } from "./project-error.ts"; @@ -211,11 +212,11 @@
213 214 const agent = host.agentOf(entry.agent); 214 − // A sync's stale heard keeps announcements, so it hears no tell.
215 + // A sync's stale heard keeps announcements and settles' news (outlastsSync), so it hears no tell. 215 216 if (entry.stale !== true) 216 217 for (const tell of host.tells.values()) 217 218 if (tell.heard.get(agent.name) === null) tell.heard.set(agent.name, { at: time }); 218 − const keep = agent.news.map((t) => entry.stale === true && t.startsWith("Announcement from "));
219 + const keep = agent.news.map((t) => entry.stale === true && outlastsSync(t)); 219 220 agent.news = agent.news.filter((_, i) => keep[i]); 220 221 agent.newsAt = agent.newsAt.filter((_, i) => keep[i]); --- a/worker/project/news.ts
+++ b/worker/project/news.ts
@@ -122,6 +122,14 @@
126 + * News a sync doesn't make moot, so it is kept through one: announcements, 127 + * and what a settle kept (the pull brings the file, not whose side survived). 129 + export function outlastsSync(text: string): boolean { 130 + return text.startsWith("Announcement from ") || / settled its collision with your version \d+ in /.test(text); 125 133 const SETTLED_WHAT: Record<Kept, string> = { 126 134 theirs: "it kept your lines", 127 135 yours: "it kept its own lines, not yours", --- a/worker/project/sync.ts
+++ b/worker/project/sync.ts
@@ -3,6 +3,7 @@
3 3 // SyncHost; today the host is Project. 5 5 import type { AtomId, Graph, ReadView } from "../../src/engine/index.ts"; 6 + import { outlastsSync } from "./news.ts"; 6 7 import { ProjectError } from "./project-error.ts"; 7 8 import type { AgentState, Entry, MergedLine, SyncAnswer } from "./project-types.ts"; 8 9 import { last, SHARED, type Space } from "./spaces.ts"; @@ -79,7 +80,7 @@
79 80 entries.push({ type: "sync", agent: agent.name, version: target }); 80 81 host.apply(entries[entries.length - 1]!); 81 82 // News about versions the agent has now synced past is moot: the sync answer lists what's still open (#37). 82 − if (agent.news.some((t) => !t.startsWith("Announcement from "))) {
83 + if (agent.news.some((t) => !outlastsSync(t))) { 83 84 const heard: Entry = { type: "heard", agent: agent.name, stale: true }; 84 85 entries.push(heard);