Repository navigation
fix(devcontainer): wire the composition root before the FlashRank prewarm - #618
Conversation
…warm Closes #617 Since #568 (issue #560), core/reranker_model.py requires configure_reranker_filesystem() to run before any core function that touches the reranker cache directory. The devcontainer image's FlashRank prewarm called _ensure_reranker() directly and never wired it, so every build failed the same way, 5 retries, RuntimeError each time. Verified locally: the exact one-liner still raises the RuntimeError without the wire_composition_root() call added here, and returns a loaded reranker with it. This job is skipped on a push that does not touch Dockerfile-relevant paths (confirmed on the 4.23.1 release push, run 35700002270), which is why it never blocked a release; the daily scheduled run hit it for real (run 35586189593, 2026-09-21). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NLvPnrr8Ab6cKPK1Kt3K7f Signed-off-by: cdeust <[email protected]>
|
ZETETIC-REVIEW: APPROVE Verified independently (read-only, no edits/commits). Findings ranked by severity; none block. Findings
No other findings. Every item below checks out. Verified claims
|
Summary
Closes #617
Since #568 (issue #560),
core/reranker_model.pyrequiresconfigure_reranker_filesystem()to run before any core function that touches the reranker cache directory..devcontainer/Dockerfile's FlashRank prewarm called_ensure_reranker()directly and never wired it, so every build failed the same way: 5 retries, the sameRuntimeErroreach time. The HF/sentence-transformers prewarm line above it is unaffected, it does not touch the reranker seam.This job is path-filtered and skipped on a push that does not touch Dockerfile-relevant paths, which is why it never blocked a release (confirmed on the 4.23.1 release push, run 35700002270: the job shows skipped,
ci-greenstill passed). The daily scheduled run hit it for real: run 35586189593, 2026-09-21, job 106290069933.Type of change
Test plan
wire_composition_root()call it raisesRuntimeError: reranker cache_dir provider not configured; with it added,_ensure_reranker()returns a loaded reranker..devcontainer/Dockerfile,Dockerfile,docker/Dockerfile,.clusterfuzzlite/Dockerfile) for another barepython -creachingmcp_server.core; the only other one importsmcp_server.__main__, which wires its own composition root on import.python3 scripts/check_doc_claims.pyandpython3 scripts/check_craftsmanship.py --base origin/main, both OK.Docker Build (devcontainer image)CI job on this PR is the actual reproduction: it touches.devcontainer/Dockerfile, so it will not be skipped this time.Audit notes
One-line change inside an existing
RUNinstruction; no new dependency, no change to what gets prewarmed or cached, only when the seam is wired first.🤖 Generated with Claude Code
https://claude.ai/code/session_01NLvPnrr8Ab6cKPK1Kt3K7f