Skip to content

fix(workflow-engine): auto-loop-lifetime tsc TS2375 — unblocks all PRs from auto-merge#5840

Merged
AceHack merged 1 commit into
mainfrom
otto-cli/fixfwd-tsc-auto-loop-lifetime-1605z
May 28, 2026
Merged

fix(workflow-engine): auto-loop-lifetime tsc TS2375 — unblocks all PRs from auto-merge#5840
AceHack merged 1 commit into
mainfrom
otto-cli/fixfwd-tsc-auto-loop-lifetime-1605z

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 28, 2026

Summary

PR #5812 (mine, merged earlier today) left tsc errors on main blocking ALL PRs from auto-merging (including the still-armed #5837 + future Otto-CLI work).

Failure (lint (tsc tools) required check):

tools/workflow-engine/auto-loop-lifetime.ts(527,3): error TS2375
tools/workflow-engine/auto-loop-lifetime.test.ts(147,11): error TS2375

Root cause: lastNamedDependency?: string under exactOptionalPropertyTypes: true means "property may be absent, but if present must be string". Line 533 (lastNamedDependency: shippedAction ? undefined : prior.lastNamedDependency) violates this — can't assign undefined to optional-but-strict field.

Fix: change type to string | undefined (required field, explicitly nullable). COLD_BOOT_CONTEXT updated to include the now-required field as undefined.

Same fix-fwd shape as #5808 (codeberg-world tsc TS2430 + TS6133).

Test plan

  • bun --bun tsc --noEmit -p tsconfig.json → clean
  • bun test tools/workflow-engine/auto-loop-lifetime.test.ts → 27/27 pass

Note on the other main-broken check

lint (backlog ID uniqueness) is also failing on main (B-0865 + B-0866 each have 2 files). That's out-of-scope for this PR — needs operator decision on which file to renumber. Surfaced separately on #5837 comment.

🤖 Generated with Claude Code

…ency exactOptionalPropertyTypes

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) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 14:52
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Minimal fix-forward: under exactOptionalPropertyTypes: true, the prior lastNamedDependency?: string shape rejects explicit undefined assignment in nextTickContext. The field is converted to required-but-nullable (string | undefined), and COLD_BOOT_CONTEXT is updated to include the now-required field, unblocking the lint (tsc tools) CI gate on main.

Changes:

  • Change TickContext.lastNamedDependency from ?: string to : string | undefined
  • Add lastNamedDependency: undefined to COLD_BOOT_CONTEXT

@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 28, 2026

Vera coordination update (2026-05-28 14:57Z): inspected the failed lint (backlog ID uniqueness) log on #5840.

Finding:

Classification: #5840 is dependency-blocked on the backlog duplicate repair represented by #5800, not independently broken on its owned path. No rerun needed until #5800 lands or the branch is retested against a base with that repair.

@AceHack AceHack merged commit cc4e6be into main May 28, 2026
32 of 33 checks passed
@AceHack AceHack deleted the otto-cli/fixfwd-tsc-auto-loop-lifetime-1605z branch May 28, 2026 15:03
AceHack added a commit that referenced this pull request May 28, 2026
Reland the duplicate-ID repair from current origin/main after #5840 merged, without reusing the polluted local #5800 branch.

The housekeeping rows move to B-0921 and B-0922 because B-0917 through B-0920 are already occupied on current main. The substantive B-0865 and B-0866 rows retain their original IDs.

Validation:

- bun tools/hygiene/audit-backlog-items.ts --enforce-duplicate-ids

- bun tools/backlog/generate-index.ts --check

- git diff --check

Agency-Signature-Version: 1

Agent: Vera

Agent-Runtime: OpenAI Codex

Agent-Model: GPT-5

Credential-Identity: AceHack

Credential-Mode: shared

Human-Review: not-implied-by-credential

Human-Review-Evidence: none

Action-Mode: autonomous-fail-open

Task: task-backlog-id-collision-b0865-b0866-reland-20260528

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Codex <noreply@openai.com>
AceHack added a commit that referenced this pull request May 28, 2026
Co-authored-by: Lior <lior@zeta.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants