feat(FN-5403): merge fusion/fn-5403

This commit is contained in:
gsxdsm
2026-05-22 23:12:49 -07:00
parent 3ccb132dcc
commit 2a3a07a612
12 changed files with 388 additions and 13 deletions

View File

@@ -166,6 +166,7 @@ describe("settings key parity", () => {
it("keeps task stuck timeout active by default without coupling to workflow step timeout", () => {
expect(DEFAULT_PROJECT_SETTINGS.taskStuckTimeoutMs).toBe(600_000);
expect(DEFAULT_PROJECT_SETTINGS.runtimeStopDrainMs).toBe(2_000);
expect(DEFAULT_PROJECT_SETTINGS.workflowStepTimeoutMs).toBe(360_000);
});

View File

@@ -287,6 +287,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
specStalenessEnabled: false,
specStalenessMaxAgeMs: 6 * 60 * 60 * 1000,
taskStuckTimeoutMs: 600_000,
runtimeStopDrainMs: 2_000,
engineActiveSinceMs: undefined,
engineActivationGraceMs: 5 * 60_000,
inReviewStallDeadlockThreshold: 3,

View File

@@ -3084,6 +3084,10 @@ export interface ProjectSettings {
* than this duration, the task is considered stuck and will be terminated and retried.
* Default: 600000 (10 minutes). Set to 0 to disable. */
taskStuckTimeoutMs?: number;
/** Maximum milliseconds InProcessRuntime.stop() waits for in-flight tasks to drain
* AFTER aborting their AI sessions. Default: 2000. Set to 0 to skip drain waits
* entirely (test/CI). Set to 30000 to preserve the historical 30s grace window. */
runtimeStopDrainMs?: number;
/** Epoch ms when the in-process runtime last became active (startup or transition
* out of globalPause/enginePaused). Time-based stuck/stalled/stale detectors floor
* their activity anchor at this value so engine downtime is not counted as quiet time.