Skip to content

app-server: own thread listener teardown#31360

Open
winston-openai wants to merge 1 commit into
dev/winston/thread-idle-shutdown-completionfrom
dev/winston/app-server-listener-ownership
Open

app-server: own thread listener teardown#31360
winston-openai wants to merge 1 commit into
dev/winston/thread-idle-shutdown-completionfrom
dev/winston/app-server-listener-ownership

Conversation

@winston-openai

Copy link
Copy Markdown
Contributor

Summary

  • make the listener registry own the exact task abort handle together with its command sender
  • publish listener state and its task handle atomically, and make stale cleanup identity-conditional
  • abort and await registered listeners during app-server shutdown
  • roll back only the exact thread state whose listener attachment failed

This is the first app-server layer of the thread-bound idle replacement stack and depends on #31350.

Validation

  • CARGO_INCREMENTAL=0 just test -p codex-app-server thread_state::tests
  • CARGO_INCREMENTAL=0 just test -p codex-app-server removing_thread_state_clears_listener_and_active_turn_history
  • CARGO_INCREMENTAL=0 just test -p codex-app-server app_server_event_sink_uses_listener_fifo_for_goal_updates_and_clears

Stack

@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 7d7829ea6b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@winston-openai winston-openai force-pushed the dev/winston/app-server-listener-ownership branch from 7d7829e to 97c1778 Compare July 7, 2026 05:12
@winston-openai

Copy link
Copy Markdown
Contributor Author

@codex review

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