it("regression, retries once when cron returns interim acknowledgement and no descendants were spawned", async () => {
usePayloadTextExtraction();
runEmbeddedPiAgentMock
.mockResolvedValueOnce({
payloads: [
{
text: "On it, grabbing current SF and SD weather now and I will summarize right after both come back.",
},
],
meta: { agentMeta: { usage: { input: 10, output: 20 } } },
})
.mockResolvedValueOnce({
payloads: [{ text: "SF is 62F and SD is 67F. SD is warmer by 5F." }],
meta: { agentMeta: { usage: { input: 10, output: 20 } } },
});
mockRunCronFallbackPassthrough();
await runTurnAndExpectOk(2, 2);
expect(runEmbeddedPiAgentMock.mock.calls[1]?.[0]?.prompt).toContain( "previous response was only an acknowledgement",
);
});
it("does not retry when the first turn is already a concrete result", async () => {
usePayloadTextExtraction();
runEmbeddedPiAgentMock.mockResolvedValueOnce({
payloads: [{ text: "SF is 62F and SD is 67F. SD is warmer by 5F." }],
meta: { agentMeta: { usage: { input: 10, output: 20 } } },
});
it("does not retry when descendants were spawned in this run even if they already settled", async () => {
usePayloadTextExtraction();
runEmbeddedPiAgentMock.mockResolvedValueOnce({
payloads: [{ text: "On it, I spawned a subagent and it will auto-announce when done." }],
meta: { agentMeta: { usage: { input: 10, output: 20 } } },
});
listDescendantRunsForRequesterMock.mockReturnValue([
{
startedAt: Date.now() + 60_000,
},
]);
countActiveDescendantRunsMock.mockReturnValue(0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.