refactor(agents): hide stale run cutoff · openclaw/openclaw@16142be
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,8 @@ import {
|
12 | 12 | resetSubagentRegistryForTests, |
13 | 13 | } from "./subagent-registry.test-helpers.js"; |
14 | 14 | import type { SubagentRunRecord } from "./subagent-registry.types.js"; |
15 | | -import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js"; |
| 15 | + |
| 16 | +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; |
16 | 17 | |
17 | 18 | let testWorkspaceDir = os.tmpdir(); |
18 | 19 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,8 @@ import {
|
12 | 12 | shouldIgnorePostCompletionAnnounceForSessionFromRuns, |
13 | 13 | } from "./subagent-registry-queries.js"; |
14 | 14 | import type { SubagentRunRecord } from "./subagent-registry.types.js"; |
15 | | -import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js"; |
| 15 | + |
| 16 | +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; |
16 | 17 | |
17 | 18 | function makeRun(overrides: Partial<SubagentRunRecord>): SubagentRunRecord { |
18 | 19 | const runId = overrides.runId ?? "run-default"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,10 +5,11 @@ import {
|
5 | 5 | isLiveUnendedSubagentRun, |
6 | 6 | RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS, |
7 | 7 | isStaleUnendedSubagentRun, |
8 | | -STALE_UNENDED_SUBAGENT_RUN_MS, |
9 | 8 | shouldKeepSubagentRunChildLink, |
10 | 9 | } from "./subagent-run-liveness.js"; |
11 | 10 | |
| 11 | +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; |
| 12 | + |
12 | 13 | describe("subagent run liveness", () => { |
13 | 14 | const now = Date.parse("2026-04-25T12:00:00Z"); |
14 | 15 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
7 | 7 | import { resolveSubagentRunDurationMs } from "./subagent-run-timeout.js"; |
8 | 8 | import { getSubagentSessionStartedAt } from "./subagent-session-metrics.js"; |
9 | 9 | |
10 | | -export const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; |
| 10 | +const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000; |
11 | 11 | export const RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS = 30 * 60 * 1_000; |
12 | 12 | const EXPLICIT_TIMEOUT_STALE_GRACE_MS = 60_000; |
13 | 13 | const MIN_REALISTIC_RUN_TIMESTAMP_MS = Date.UTC(2020, 0, 1); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。