mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix(telegram): detach adopted turns from reply fence (#103952)
This commit is contained in:
@@ -6000,6 +6000,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
// a later superseding peer (authorized explicit command) cannot abort it.
|
||||
await adoptTurn?.();
|
||||
expect(firstAbortSignal?.aborted).toBe(false);
|
||||
expect(supersedeTelegramReplyFence("agent:main:telegram:group:-100123")).toBe(false);
|
||||
|
||||
await dispatchWithContext({
|
||||
context: createGroupContext(100, "/export-trajectory bundle"),
|
||||
@@ -6468,9 +6469,7 @@ describe("dispatchTelegramMessage draft streaming", () => {
|
||||
onTurnDeferred: vi.fn(),
|
||||
onTurnAbandoned: onRejectedTurnAbandoned,
|
||||
});
|
||||
await expect(captures[2]?.lifecycle?.onAdmitted?.()).rejects.toThrow(
|
||||
"durable adoption failed",
|
||||
);
|
||||
await expect(captures[2]?.lifecycle?.onAdmitted?.()).rejects.toThrow("durable adoption failed");
|
||||
expect(supersedeTelegramReplyFence(rejectedKey)).toBe(true);
|
||||
expect(captures[2]?.abortSignal?.aborted).toBe(true);
|
||||
captures[2]?.lifecycle?.onComplete?.();
|
||||
|
||||
@@ -907,8 +907,9 @@ export const dispatchTelegramMessage = async ({
|
||||
};
|
||||
const adoptReplyTurn = async () => {
|
||||
await onTurnAdopted?.();
|
||||
// Fence abort authority ends only after durable adoption succeeds. Core
|
||||
// then becomes the sole owner of killing the adopted run.
|
||||
// Fence abort and supersession authority end after durable adoption.
|
||||
// Core then owns all interruption of the adopted run.
|
||||
releaseReplyFence();
|
||||
releaseTelegramReplyFenceAbortController(activeReplyFenceKey, replyAbortController);
|
||||
};
|
||||
// Block mode sizes preview rotation steps from streaming.preview.chunk (same
|
||||
|
||||
Reference in New Issue
Block a user