fix(server): stop stacking a tool profile's visibility on every session
Release / test (full, windows-latest, 3.11) (push) Canceled after 0s
Release / test (pdf, ubuntu-latest, 3.11) (push) Canceled after 0s
Release / test (pdf, ubuntu-latest, 3.12) (push) Canceled after 0s
Release / build (push) Canceled after 0s
Release / publish-pypi (push) Canceled after 0s
Release / github-release (push) Canceled after 0s
Release / test (full, windows-latest, 3.11) (push) Canceled after 0s
Release / test (pdf, ubuntu-latest, 3.11) (push) Canceled after 0s
Release / test (pdf, ubuntu-latest, 3.12) (push) Canceled after 0s
Release / build (push) Canceled after 0s
Release / publish-pypi (push) Canceled after 0s
Release / github-release (push) Canceled after 0s
What the first Linux CI run of the 1.6 tree found. - fastmcp 3's enable()/disable() append a Visibility transform per call, and a tool lookup walks the transform stack as nested calls. The lifespan re-applies the tool profile on every client connection, so an in-process server grew two layers per session until every tool call, system_status included, raised RecursionError (CPython 3.11 counts C frames against the limit). The profile's transforms now replace the previous ones, as _apply_discovery_mode already did; a test switches the profile 600 times and then calls a tool. The local suite runs in half the time it took with the stack growing. - 21 fake-ActiveX tests build a real pywin32 VARIANT; they now skip without pywin32, like the suite's other VARIANT-dependent COM tests, and the Windows lane keeps running them. - A test spelled a path through a directory it never created, which only Windows normalises away; it creates the directory. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
17bf3a39ce
commit
cdb1063896
@@ -265,6 +265,21 @@ member. Spec: `docs/superpowers/specs/2026-09-24-v1.6-understand-design.md`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Every tool call raised `RecursionError` after a few hundred in-process
|
||||
sessions.** fastmcp 3's `enable()` / `disable()` append a Visibility
|
||||
transform per call, and a tool lookup walks the whole transform stack as
|
||||
nested calls. `_apply_tool_profile` runs in the lifespan, once per client
|
||||
connection, so each session stacked two more layers. The first Linux CI run
|
||||
of the 1.6 tree found it: on CPython 3.11, which counts C frames against the
|
||||
recursion limit, `system_status` itself failed from about 90 % of the suite
|
||||
on. The profile's transforms now replace the previous ones instead of
|
||||
stacking on them, the idiom `_apply_discovery_mode` already used, and a test
|
||||
switches the profile 600 times and then calls a tool.
|
||||
- The same CI run failed 21 fake-ActiveX tests off Windows (they build a real
|
||||
pywin32 VARIANT and now skip without pywin32, like the suite's other
|
||||
VARIANT-dependent COM tests; the Windows lane runs them), and a test that
|
||||
spelled a path through a directory it never created, which only Windows
|
||||
normalises away.
|
||||
- **Found by the 1.6.0 README renders** (each with a test that fails on the
|
||||
old code):
|
||||
- The exterior dimension chains of `arch_dimension_chains` and
|
||||
|
||||
Reference in New Issue
Block a user