Repository navigation
Commit 024fe55
fix(ci): wire the reranker filesystem seam before CI's bare preload call (#560)
Root cause of the PR #568 CI failure (5 python versions red): the
reranker preload step in .github/actions/test-suite calls
mcp_server.core.reranker.ensure_reranker_loaded() as a bare `python -c`
one-liner, which never imports mcp_server/__main__.py or
tests_py/conftest.py, so core/reranker_model.py's filesystem seam
(configure_reranker_filesystem) was never wired -- reranker_cache_dir()
raised RuntimeError on every attempt.
Audited every other bare entry point that could reach a #560 injection
seam (scripts/, .github/, benchmarks/) without going through a
composition root: the reranker was the only one with real exposure --
every core/environment.py-backed seam (ablation, telemetry,
thermodynamics, etc.) degrades to a safe default instead of raising when
unconfigured, and no other bare script/CI step touches
mcp_server.core.reranker.
Fix: mcp_server/doctor.py (already a composition root -- it imports both
handlers and infrastructure freely, unlike core/ or infrastructure/
themselves) gains ensure_reranker_ready(), which wires the seam
(idempotent) and then delegates to core.reranker.ensure_reranker_loaded().
CI's preload step now calls that instead of reaching into core directly.
New regression test proves it self-wires even when the seam was reset to
simulate a bare-script call.
Verified: `python -c "from mcp_server.doctor import ensure_reranker_ready
as e; s = e(); assert s.state == 'loaded', s"` (the exact CI command)
passes locally; `python scripts/verify_mcp_hosts.py -- hypermnesia-mcp`
(the second red CI check, "server exited -9") passes cleanly on all 6
client/profile combinations on this branch -- that failure did not
reproduce locally and is likely a transient/resource-contention effect
downstream of the first failure, not a code defect; re-run in CI to
confirm now that the real root cause is fixed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>1 parent 3633e93 commit 024fe55
3 files changed
Lines changed: 86 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
22 | 54 | | |
23 | 55 | | |
24 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
0 commit comments