You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP tool sets: newer turn's set can be overwritten by a late drop or late check (#961 follow-up) #986
Follow-ups from the round-2 state lens on #961 (#961 (comment)). None blocks: each fails closed (Refused until the thread's next turn) or needs a check that outlives a whole turn.
apps/server/src/fork/mcpT3ToolSets.ts:99, :145-147: a timed-out hold's drop can overwrite a set a newer turn already fixed (a joining turn keeps the first turn's 10 s deadline; a turn T3 starts itself does not touch the hold).
Tiny window between a check fixing its set and releasing its hold: a request whose wait ends exactly then writes Refused over the new set.
One fix covers all three: tag each fixed set with a per-thread counter (or time); a drop or a late check writes only if no newer turn has fixed a set. Add a test for each order.
Two more from the round-2 code lens on #961 (#961 (comment)); point 3 there is the same race as the first item above.
claudeMcpProfile.ts:770: the "never wider" plan-key comparison has no test of its own (it only fails in a full run because an earlier test leaves a key in the module-global openedPlanKeys). Add a reset hook for tests and a test where a process opened with one key meets a different, wider plan.
claudeMcpProfile.ts:715: the 4096 cap evicts the oldest-opened process, not the least used; refresh the entry when a plan matches.
Activity
scuttletoby commentedon Nov 22, 2026
Two more from the round-2 code lens on #961 (#961 (comment)); point 3 there is the same race as the first item above.
claudeMcpProfile.ts:770: the "never wider" plan-key comparison has no test of its own (it only fails in a full run because an earlier test leaves a key in the module-globalopenedPlanKeys). Add a reset hook for tests and a test where a process opened with one key meets a different, wider plan.claudeMcpProfile.ts:715: the 4096 cap evicts the oldest-opened process, not the least used; refresh the entry when a plan matches.🤖 Generated with Claude Code
fix(#986): round 1: required turn, joiner test, order kept past the c…
fix(#986): order MCP tool sets by turn so a late drop or check never …