Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): automatic activity unsettle no longer clears a user's "active" pin #8015

Closedmattholla(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/8015/headopened View on GitHub

Showing 3 changed files with 22 additions and 23 deletions.

x
0 of 3 viewed, 3 left
8 additions and 15 deletionsapps/server/src/orchestration/decider.settled.test.tsModified
View file
@@ -428,7 +428,7 @@
}),
​
- it.effect("prepends activity unsets for turn starts and live session updates", () =>
+ it.effect("prepends activity unsets for settled threads and leaves active pins alone", () =>
Effect.gen(function* () {
const turnResult = yield* decideOrchestrationCommand({
command: {
@@ -462,19 +462,16 @@
session: makeSession("running"),
createdAt: NOW,
- // A keep-active pin is also an override: real activity clears it
- // back to neutral so auto-settle can apply again later.
+ // A keep-active pin is a user pin, not an auto-settle guard: real
+ // activity must not clear it back to neutral.
readModel: makeReadModel("active"),
});
const sessionEvents = Array.isArray(sessionResult) ? sessionResult : [sessionResult];
- expect(sessionEvents.map((event) => event.type)).toEqual([
- "thread.unsettled",
- "thread.session-set",
- ]);
+ expect(sessionEvents.map((event) => event.type)).toEqual(["thread.session-set"]);
}),
​
- it.effect("clears a keep-active pin on real activity", () =>