Skip to content

Stabilize asynchronous runtime tests - #183

Merged
lynnswap merged 4 commits into
mainfrom
codex/fix-recovery-shared-deadline-test
Jul 15, 2026
Merged

Stabilize asynchronous runtime tests#183
lynnswap merged 4 commits into
mainfrom
codex/fix-recovery-shared-deadline-test

Conversation

@lynnswap

@lynnswap lynnswap commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Purpose

Fix CI failures caused by test ordering races and cooperative-executor blocking without using runner speed or wall-clock delays to drive test state.

Changes

  • advance the shared-deadline test only after its injected TestClock waiter is registered
  • synchronize slot occupation, initialize handling, and catalog requests through observable events
  • preserve concurrent reconcile coverage with an external GCD executor instead of blocking the cooperative executor
  • assert catalog retry state as either active or atomically superseded by an in-flight catalog load
  • keep real-time bounds only as diagnostic watchdogs for events that never arrive

Testing

  • swift test -Xswiftc -strict-concurrency=minimal (951 tests)
  • XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter XcodeMCPProcessRuntimeTests -Xswiftc -strict-concurrency=minimal (24 tests)
  • XCODE_MCP_RUN_PROCESS_TESTS=1 swift test --no-parallel --filter ProxyStdioAdapterTests -Xswiftc -strict-concurrency=minimal (8 tests)
  • RuntimeCoordinatorProcessRoutingTests under strict cooperative pool: 100 consecutive suite runs, 5,100 test executions
  • processOwnerRestoresTimedOutBridgeWhenSiblingCatalogWins under strict cooperative pool: 200 consecutive runs
  • RuntimeCoordinatorWindowRoutingTests under strict cooperative pool: 500 consecutive suite runs
  • codex-review against main: clean

Related failures:

lynnswap added 4 commits July 15, 2026 16:09
Wait for the injected TestClock to register the foreground waiter deadline before advancing virtual time, so scheduler latency cannot race the inner shared-load timeout.
Wait for observable lease, initialization, catalog, and reconcile events instead of relying on executor scheduling. Keep genuinely blocking synchronous callbacks off the cooperative executor so low-capacity CI runners cannot deadlock the tests.
Keep slot activation synchronized by its recorded event while adding a watchdog that fails scheduling regressions instead of hanging serialized test suites.
Bound diagnostic waits, exercise reconcile triggers from an external executor, and assert retry ownership through atomic control-plane state while keeping event ordering independent of runner speed.
@lynnswap lynnswap changed the title Synchronize shared deadline test with injected clock Stabilize asynchronous runtime tests Jul 15, 2026
@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 215a356eaa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lynnswap
lynnswap merged commit d2b7e76 into main Jul 15, 2026
9 checks passed
@lynnswap
lynnswap deleted the codex/fix-recovery-shared-deadline-test branch July 15, 2026 08:56
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