fix(core): compact after tool settlement (#36718)
This commit is contained in:
parent
3bc924252b
commit
a2f5a0df5d
2 changed files with 4 additions and 3 deletions
|
|
@ -543,7 +543,8 @@ const layer = Layer.effect(
|
||||||
needsContinuation = result.needsContinuation
|
needsContinuation = result.needsContinuation
|
||||||
step = result.step + 1
|
step = result.step + 1
|
||||||
if (needsContinuation) {
|
if (needsContinuation) {
|
||||||
promotion = (yield* SessionPending.compaction(db, input.sessionID)) ? undefined : "steer"
|
yield* runPendingCompaction(input.sessionID)
|
||||||
|
promotion = "steer"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
yield* runPendingCompaction(input.sessionID)
|
yield* runPendingCompaction(input.sessionID)
|
||||||
|
|
|
||||||
|
|
@ -1614,14 +1614,14 @@ describe("SessionRunnerLLM", () => {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
it.effect("runs one durable compaction barrier before later steer and queued prompts", () =>
|
it.effect("runs one durable compaction barrier after tool settlement and before later inputs", () =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const session = yield* setup
|
const session = yield* setup
|
||||||
currentModel = recoveryModel
|
currentModel = recoveryModel
|
||||||
streamGate = yield* Deferred.make<void>()
|
streamGate = yield* Deferred.make<void>()
|
||||||
streamStarted = yield* Deferred.make<void>()
|
streamStarted = yield* Deferred.make<void>()
|
||||||
responses = [
|
responses = [
|
||||||
reply.text("Active complete", "text-active"),
|
reply.tool("call-active", "echo", { text: "active" }),
|
||||||
[LLMEvent.textDelta({ id: "summary", text: "durable summary" })],
|
[LLMEvent.textDelta({ id: "summary", text: "durable summary" })],
|
||||||
reply.text("Steer complete", "text-steer"),
|
reply.text("Steer complete", "text-steer"),
|
||||||
reply.text("Queue complete", "text-queue"),
|
reply.text("Queue complete", "text-queue"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue