Skip to content

fix(core): clear settled manage-request timers - #357

Merged
Mearman merged 2 commits into
ExaDev:mainfrom
ovidius72:fix/manage-request-timers
Oct 22, 2026
Merged

Mearman merged 2 commits into
ExaDev:mainfrom
ovidius72:fix/manage-request-timers

Conversation

@ovidius72

Copy link
Copy Markdown
Contributor

Why

Settled manage requests leave their timeout callbacks alive. Those timers can keep Node running until the request deadline, even after the session has closed.

Changes

  • Clear each request's timeout when its promise settles, including responses, transmission errors, connection drops and session shutdown.
  • Preserve existing timeout outcomes and relay retry behaviour.
  • Add six regression cases, including concurrent requests where one response must not cancel another request's timeout.

Verification

  • All 870 core tests pass. The six new regression cases fail on the original code and pass with this fix.
  • Lint, both TypeScript checks, the package build and export checks pass.
  • A real-process check with agent-comms 8.14.1 and the locally packed core passes eleven cases, leaves no request timers behind and exits normally.

@Mearman

Mearman commented Oct 22, 2026

Copy link
Copy Markdown
Member

Thanks for this, and for the test discipline: I checked out your branch and all six regression cases fail on the previous code and pass with the fix, the timer handle is always assigned before the race can settle, and the timeout path itself (including forgetting a dead pairing) is untouched. Merging now.

One note for the record: the six threshold test files also fail in a fresh checkout, but that is unrelated to this change (the wasm module is built by pnpm typecheck/pnpm test from the Rust crate and gitignored), so they pass once it is built.

@Mearman

Mearman commented Oct 22, 2026

Copy link
Copy Markdown
Member

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-10-22T12:20:07.294732Z
We couldn’t complete this review. Comment @codex security review to try again.
6eebcd6 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit 6aae0a0 into ExaDev:main Oct 22, 2026
9 checks passed
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.

2 participants