fix(prompt-gate): harden sync and team prompt dispatch
This commit is contained in:
@@ -849,7 +849,7 @@ describe("ralph-loop", () => {
|
||||
mockSessionMessages = [
|
||||
{ info: { role: "user" }, parts: [{ type: "text", text: "Build something" }] },
|
||||
{
|
||||
info: { role: "assistant" },
|
||||
info: { role: "assistant", finish: "end_turn" },
|
||||
parts: [
|
||||
{ type: "reasoning", text: "I am done now. <promise>REASONING_DONE</promise>" },
|
||||
],
|
||||
@@ -1398,7 +1398,7 @@ Original task: Build something`
|
||||
|
||||
mockSessionMessages = [
|
||||
{
|
||||
info: { role: "assistant" },
|
||||
info: { role: "assistant", finish: "end_turn" },
|
||||
parts: [{ type: "text", text: "All work is complete. <promise>DONE</promise>" }],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -109,7 +109,7 @@ describe("ralph-loop user message race guard", () => {
|
||||
})
|
||||
messagesBySession["session-123"] = [
|
||||
{ info: { role: "user", time: { created: Date.now() - 1_000 } } },
|
||||
{ info: { role: "assistant", agent: "sisyphus", time: { created: Date.now() - 500 } } },
|
||||
{ info: { role: "assistant", finish: "end_turn", agent: "sisyphus", time: { created: Date.now() - 500 } } },
|
||||
]
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user