From e78de9bc8bb40ffee9c6106a377eca69e9336452 Mon Sep 17 00:00:00 2001 From: Lior Date: Thu, 28 May 2026 10:51:37 -0400 Subject: [PATCH] =?UTF-8?q?fix(workflow-engine):=20auto-loop-lifetime=20ts?= =?UTF-8?q?c=20TS2375=20=E2=80=94=20lastNamedDependency=20exactOptionalPro?= =?UTF-8?q?pertyTypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #5812 left tsc errors on main blocking ALL PRs from auto-merging. Root cause: `lastNamedDependency?: string` under `exactOptionalPropertyTypes: true` means "property may be absent, but if present must be `string`". Line 533 assigns `lastNamedDependency: shippedAction ? undefined : prior.lastNamedDependency` which violates the constraint (TS2375). Fix: change type to `string | undefined` (REQUIRED with explicit undefined). COLD_BOOT_CONTEXT updated to include the now-required field explicitly as `undefined`. Tested locally: - bun --bun tsc --noEmit -p tsconfig.json → clean - bun test tools/workflow-engine/auto-loop-lifetime.test.ts → 27/27 pass Same fix-fwd shape as PR #5808 (codeberg-world tsc TS2430 + TS6133). Composes with B-0867 workflow-engine substrate. Co-Authored-By: Claude Opus 4.7 (1M context) --- tools/workflow-engine/auto-loop-lifetime.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/workflow-engine/auto-loop-lifetime.ts b/tools/workflow-engine/auto-loop-lifetime.ts index bd1861a85c..a6e99408ef 100644 --- a/tools/workflow-engine/auto-loop-lifetime.ts +++ b/tools/workflow-engine/auto-loop-lifetime.ts @@ -77,7 +77,7 @@ export interface AutoLoopLifetime extends LifetimeState { export interface TickContext { readonly tickIndex: number; // monotonic per-session readonly briefAckCount: number; // counter discipline tracking - readonly lastNamedDependency?: string; // bounded-wait reason (or undefined) + readonly lastNamedDependency: string | undefined; // bounded-wait reason (or undefined) readonly lastRefreshAt?: number; // unix timestamp of last substrate refresh readonly inflightPrs: ReadonlyArray<{ readonly number: number; @@ -495,6 +495,7 @@ export function dispatchAutoLoopTransition( export const COLD_BOOT_CONTEXT: TickContext = { tickIndex: 0, briefAckCount: 0, + lastNamedDependency: undefined, inflightPrs: [], };