fix(core): remove per-prompt system option (#34361)

This commit is contained in:
Kit Langton 2026-06-28 21:56:59 -04:00 committed by GitHub
commit 7073e8797f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 3 additions and 80 deletions

View file

@ -191,33 +191,6 @@ describe("SessionV2.prompt", () => {
}),
)
it.effect("preserves an optional per-request system string through admission and projection", () =>
Effect.gen(function* () {
yield* setup
const { db } = yield* Database.Service
const session = yield* SessionV2.Service
const events = yield* EventV2.Service
const message = yield* session.prompt({
sessionID,
prompt: Prompt.make({ text: "Fix the failing tests", system: "Per-request override" }),
resume: false,
})
expect(message.prompt.system).toBe("Per-request override")
expect(yield* admitted(message.id)).toMatchObject({
id: message.id,
prompt: { text: "Fix the failing tests", system: "Per-request override" },
})
yield* SessionInput.promoteSteers(db, events, sessionID, Number.MAX_SAFE_INTEGER)
expect(yield* session.messages({ sessionID })).toMatchObject([
{ id: message.id, type: "user", text: "Fix the failing tests", system: "Per-request override" },
])
}),
)
it.effect("commits a staged revert before admitting a new prompt", () =>
Effect.gen(function* () {
yield* setup

View file

@ -894,36 +894,7 @@ describe("SessionRunnerLLM", () => {
}),
)
it.effect("appends the per-request prompt system after the agent prompt and durable baseline", () =>
Effect.gen(function* () {
yield* setup
const agent = yield* AgentV2.Service
yield* agent.transform((editor) =>
editor.update(AgentV2.ID.make("build"), (agent) => {
agent.system = "Build agent instructions"
agent.mode = "primary"
}),
)
const session = yield* SessionV2.Service
yield* session.prompt({
sessionID,
prompt: Prompt.make({ text: "First", system: "Per-request override" }),
resume: false,
})
requests.length = 0
response = fragmentFixture("text", "text-system", ["Done"]).completeEvents
yield* session.resume(sessionID)
expect(requests.at(-1)?.system.map((part) => part.text)).toEqual([
"Build agent instructions",
"Initial context",
"Per-request override",
])
}),
)
it.effect("omits the per-request system part when the prompt has no system string", () =>
it.effect("uses only the agent prompt and durable baseline as system parts", () =>
Effect.gen(function* () {
yield* setup
const agent = yield* AgentV2.Service