mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
refactor(agents): hide stale run cutoff
This commit is contained in:
parent
788eb2e3bf
commit
16142bebd8
4 changed files with 7 additions and 4 deletions
|
|
@ -12,7 +12,8 @@ import {
|
|||
resetSubagentRegistryForTests,
|
||||
} from "./subagent-registry.test-helpers.js";
|
||||
import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
||||
import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js";
|
||||
|
||||
const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000;
|
||||
|
||||
let testWorkspaceDir = os.tmpdir();
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ import {
|
|||
shouldIgnorePostCompletionAnnounceForSessionFromRuns,
|
||||
} from "./subagent-registry-queries.js";
|
||||
import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
||||
import { STALE_UNENDED_SUBAGENT_RUN_MS } from "./subagent-run-liveness.js";
|
||||
|
||||
const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000;
|
||||
|
||||
function makeRun(overrides: Partial<SubagentRunRecord>): SubagentRunRecord {
|
||||
const runId = overrides.runId ?? "run-default";
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ import {
|
|||
isLiveUnendedSubagentRun,
|
||||
RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS,
|
||||
isStaleUnendedSubagentRun,
|
||||
STALE_UNENDED_SUBAGENT_RUN_MS,
|
||||
shouldKeepSubagentRunChildLink,
|
||||
} from "./subagent-run-liveness.js";
|
||||
|
||||
const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000;
|
||||
|
||||
describe("subagent run liveness", () => {
|
||||
const now = Date.parse("2026-04-25T12:00:00Z");
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import type { SubagentRunRecord } from "./subagent-registry.types.js";
|
|||
import { resolveSubagentRunDurationMs } from "./subagent-run-timeout.js";
|
||||
import { getSubagentSessionStartedAt } from "./subagent-session-metrics.js";
|
||||
|
||||
export const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000;
|
||||
const STALE_UNENDED_SUBAGENT_RUN_MS = 2 * 60 * 60 * 1_000;
|
||||
export const RECENT_ENDED_SUBAGENT_CHILD_SESSION_MS = 30 * 60 * 1_000;
|
||||
const EXPLICIT_TIMEOUT_STALE_GRACE_MS = 60_000;
|
||||
const MIN_REALISTIC_RUN_TIMESTAMP_MS = Date.UTC(2020, 0, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue