Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): subagent threads stop publishing tombstones to the relay #15016

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/15016/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 34 additions and 0 deletions.

x
0 of 2 viewed, 2 left
24 additions and 0 deletionsapps/server/src/relay/AgentAwarenessRelay.test.tsModified
View file
@@ -659,6 +659,30 @@
}),
​
+ it.effect.each([
+ { label: "live", archived: false },
+ { label: "archived", archived: true },
+ ])("never publishes tombstones for $label subagent threads", ({ archived }) =>
+ Effect.gen(function* () {
+ const { relay, currentShell, publications } = yield* makeTestRelay();
+ yield* Ref.set(
+ currentShell,
+ shell({
+ lineage: {
+ rootThreadId: THREAD_ID,
+ parentThreadId: THREAD_ID,
+ relationshipToParent: "subagent",
+ },
+ ...(archived ? { archivedAt: yield* DateTime.now } : {}),
+ }),
+ );
+ yield* relay.publishThread(THREAD_ID);
+ yield* TestClock.adjust("5 seconds");
+ yield* relay.drain;
+ assert.equal(publications.length, 0);
+ }),
+ );
+​
it.effect("confirms a first completed state and respects disabling during confirmation", () =>
Effect.gen(function* () {