




















@@ -507,6 +507,7 @@ describe("subagent registry persistence", () => {
507507expect(afterFirst?.cleanupCompletedAt).toBeUndefined();
508508509509announceSpy.mockResolvedValueOnce(true);
510+const beforeRetry = Date.now();
510511restartRegistry();
511512await waitForRegistryWork(async () => {
512513const afterSecond = await readPersistedRun<{
@@ -519,7 +520,7 @@ describe("subagent registry persistence", () => {
519520const afterSecond = JSON.parse(await fs.readFile(registryPath, "utf8")) as {
520521runs: Record<string, { cleanupCompletedAt?: number }>;
521522};
522-expect(afterSecond.runs["run-3"].cleanupCompletedAt).toEqual(expect.any(Number));
523+expect(afterSecond.runs["run-3"].cleanupCompletedAt).toBeGreaterThanOrEqual(beforeRetry);
523524});
524525525526it("retries cleanup announce after announce flow rejects", async () => {
@@ -553,6 +554,7 @@ describe("subagent registry persistence", () => {
553554expect(afterFirst.runs["run-reject"].cleanupCompletedAt).toBeUndefined();
554555555556announceSpy.mockResolvedValueOnce(true);
557+const beforeRetry = Date.now();
556558restartRegistry();
557559await waitForRegistryWork(async () => {
558560const afterSecond = await readPersistedRun<{
@@ -565,7 +567,7 @@ describe("subagent registry persistence", () => {
565567const afterSecond = JSON.parse(await fs.readFile(registryPath, "utf8")) as {
566568runs: Record<string, { cleanupCompletedAt?: number }>;
567569};
568-expect(afterSecond.runs["run-reject"].cleanupCompletedAt).toEqual(expect.any(Number));
570+expect(afterSecond.runs["run-reject"].cleanupCompletedAt).toBeGreaterThanOrEqual(beforeRetry);
569571});
570572571573it("keeps delete-mode runs retryable when announce is deferred", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。