refactor: drop unused shared.embedder global (#149)
The module-level `shared.embedder` global was written by `create_embedder()` but never read from production code — the embedder flows through the `EMBEDDER` ContextKey via `context.provide` / `use_context`. Drop the global along with the two test readers that kept it alive: - `tests/test_daemon.py` — the `daemon_sock` fixture pre-loaded an embedder and monkeypatched `dm.create_embedder` to reuse it. That was only useful as a cross-module cache via the now-dead global; with a session-scoped fixture, `run_daemon()` loads the embedder once from the saved settings regardless. - `tests/test_chunker_registry.py` — removed a stale `monkeypatch.setattr(_shared, "embedder", stub)` whose comment claimed CodeChunk.embedding read the global at schema resolution time. It reads the EMBEDDER ContextKey instead; the stub is already wired through `Project.create(..., stub, ...)`.
J
Jiangzhou committed
da886d5d0d0e83b68e0056a6fac70cb2330320c2
Parent: a264038
Committed by GitHub <noreply@github.com>
on 4/24/2026, 4:51:28 PM