Skip to content

Assert Local API shutdown by owned server task - #1323

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-api-stop-test-maple
Oct 27, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-api-stop-test-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The Local API lifecycle tests checked that a released TCP port rejected new connections, or could be rebound. Another parallel fixture can own that address after shutdown, so those checks do not identify the server being tested. The CI rebuild's agent-test job failed at that assertion; the log does not identify which listener accepted the connection.

Capture the original accept task before shutdown and require it to finish. That task owns its listener by value. The real IPC tests also keep a connection accepted before Stop and require EOF/reset after acknowledgement, alongside the existing state and requested-configuration assertions. Apply the same ownership checks to logout, maintenance, Drop and remote Settings tests, and keep never-started ports reserved. The observer is compiled only with cfg(test); production listener logic is unchanged.

Validation:

  • All 29 Local API tests passed with 32 test threads on macOS.
  • The reported real-IPC Stop test passed 200 repetitions with 32 concurrent, isolated test processes.
  • Full pinned Agent just ci passed with RUST_TEST_THREADS=4: formatting, metadata checks, four strict Clippy configurations, warning-denied workspace build, workspace tests (including 767 core and 1,092 application tests) and 345 headless tests. Existing ignored tests remain ignored.
  • The complete application suite also passed at the committed revision with 32 test threads: 1,092 passed, zero failures, two existing ignored tests.

@AnthonyRonning
AnthonyRonning merged commit 50aaf13 into master Oct 27, 2026
42 of 45 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-api-stop-test-maple branch October 27, 2026 15:49
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