Skip to content

test: trigger preview retirement after the initial result - #5550

Open
huangruiteng wants to merge 1 commit into
mainfrom
codex/fix-preview-retirement-clock-20261004
Open

huangruiteng wants to merge 1 commit into
mainfrom
codex/fix-preview-retirement-clock-20261004

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

The retirement recovery test shortens the five-minute worker lifetime to 200ms from spawn. On a slow worker, that can retire the first accepted request before its result, so the test never reaches the intended second-request cleanup race. A synthetic 350ms worker startup delay reproduces the lifetime failure on the current main baseline 99839aeb8fed5fae38a5d319391cd050672a6508 (idle and broken-pipe variants pass).

Advance the selected retirement timers through a test-only SIGUSR2 preload after the first preview has completed. The real Host cleanup grace, request deadline, process-group ownership and retirement fence remain in use. Add ready/350ms worker variants for idle, lifetime and broken-pipe retirement. Cleared timer handles are excluded; the replacement supervisor retains its original production clocks. No production code or timeout changes.

Validation on macOS / Node 24.21.0 / Python 3.12.15:

  • Full tests/test_delegation_preview_reuse.py: 41 passed.
  • All six retirement variants under two pytest workers with an additional 350ms startup delay: 6 passed.
  • Native delegation_preview_bridge, host_process_group and host_process TypeScript tests: 24 passed.
  • Python compile and git diff --check: passed.

Linux qualification remains required. This fixes a demonstrated test timing defect; it does not establish that every Linux CI failure has the same cause. The separate test_retry_safe_typed_write_recovers_after_unexpected_runtime_exit failure remains unexplained: 25 consecutive current-main macOS trials pass, which is not a Linux waiver. Existing accepted-request failure/uncertain-cleanup tests are retained. No model, live connector or production installation was changed.

Linux CI checkpoint on exact head b201ba28941b7af3b57bf8fb33bfd5080be4720c: all six new ready/slow-worker retirement variants are passed in the four uploaded Python JUnit shard artifacts from run 37171421012. The separate unexpected-exit typed-write recovery case also passed in that run. Overall CI remains failed (72 failing test names); the preview suite has 40 passed and one existing backpressure/deadline failure. These artifacts qualify the six cases, without attributing or waiving other failures or the earlier unexplained runtime exit.

Signed-off-by: huangruiteng <huangrt01@163.com>

This branch has not been deployed

No deployments
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