Skip to content

test(runtime): dynamic lifecycle fixtures keep their controller lease through slow CI setup - #1214

Merged
aviggiano merged 1 commit into
mainfrom
claude/fup-dynamic-fixture-lease
Sep 29, 2026
Merged

aviggiano merged 1 commit into
mainfrom
claude/fup-dynamic-fixture-lease

Conversation

@aviggiano

@aviggiano aviggiano commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

model-fanout dynamic nodes stay pending until every generated attempt has evidence (packages/runtime/test/dynamic-lifecycle.test.ts) fails intermittently in the runtime-supporting lane. It failed on main at 142ba80 and on #1205:

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ 'controller-loss'
- 'dependency'

Root cause

  • When the workflow is running with no active work, synchronization looks at the time since the last transition. After one controller lease (controller_lease_seconds, 30 s by default), it treats the controller as lost and parks every open node with controller-loss (workflow-control.ts, noTransitionStall).
  • The dynamic fixtures' fake runner never heartbeats. The test took about 43 s on the failing runners, so by the time it synchronized, the lease had expired.
  • Another test in the same file already works around this ("Keep its lease current independently of CI setup time") by pinning the sync clock.

Change

writeDynamicProject gives every dynamic-lifecycle fixture a one-hour controller lease. The test first asserts that the scaffolded config has the default controller_lease_seconds = 30 line, so a scaffold change cannot silently skip the replacement. No test in the file checks lease expiry. Test-only.

Verification

  • A temporary variant of the failing test synchronized 60 s after the run's last transition, to reproduce a slow runner. On origin/main it fails with exactly the CI error (actual: 'controller-loss', expected: 'dependency'). With this change it passes.
  • dynamic-lifecycle.test.ts: 19/19.
  • prettier and eslint pass.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR gives dynamic-lifecycle test fixtures a one-hour controller lease so slow CI setup does not cause a non-heartbeating fake runner’s open nodes to be parked as controller losses. It also checks the scaffold default before replacing it.

Reviews (1) · Last reviewed commit: "test(runtime): dynamic lifecycle fixture..."

… through slow CI setup

The fake runner never heartbeats. Once one controller lease (30 s by
default) passes after launch with no active work, synchronization parks
every open node as a lost controller (wait reason controller-loss).
Fixture setup alone took about 43 s on slow CI runners, so 'model-fanout
dynamic nodes stay pending until every generated attempt has evidence'
failed on main (142ba80) and on #1205 with controller-loss instead of
dependency. Give the dynamic fixtures a one-hour lease, so the tests
check dependency waits whatever the runner's speed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aviggiano
aviggiano requested a review from a team as a code owner September 29, 2026 14:57
@aviggiano
aviggiano merged commit dade4fc into main Sep 29, 2026
15 of 17 checks passed
@aviggiano
aviggiano deleted the claude/fup-dynamic-fixture-lease branch September 29, 2026 15:55
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.

1 participant