Skip to content

Semantic layer: install hint names the wrong venv, [semantic] lacks onnxruntime, doctor reports a missing runtime as info #46

Description

@NetDevAutomate

Found while fixing semantic: failed (0.0s) on the web header (studyloop tool venv missing the semantic runtime; fixed by the installer change on fix/tool-env-semantic-deps). Three defects in the same class remain. Each makes a missing runtime harder to see or to fix.

  1. The install hint points at the wrong venv. embedding_store.INSTALL_HINT is uv tool install 'agent-session-tools[semantic]'. It reaches the learner through the warm's failure detail, which is the chip's tooltip, and through doctor. That command installs into agent-session-tools' own tool venv, not the studyloop venv that runs studyloop web, so following it changes nothing the learner sees.
  2. [semantic] does not declare onnxruntime. The default backend (auto) resolves to ONNX for bge-small-en-v1.5, and onnx_encoder.py imports onnxruntime, tokenizers, huggingface_hub and numpy directly. A dry run shows agent-session-tools[semantic] resolves no onnxruntime. It arrives only through kokoro-onnx in [tts], so [all] works by coupling and [semantic] alone fails at onnxruntime is not installed.
  3. doctor reports a missing runtime as info. check_query_encoder_artefact returns info: semantic layer not installed; ... does not apply when sentence_transformers is absent, even when a surface resolves to hybrid. That is the silent lexical-only degradation the check exists to report. The probe (sentence_transformers) is also not what the ONNX path imports.

Definition of done

  • [semantic] declares every module the ONNX encoder and vector store import directly. A contract test pins this: onnxruntime, tokenizers, huggingface-hub, numpy, sqlite-vec.
  • The missing-runtime hint names a command that fixes the venv that raised it (for a source install, ./scripts/install.sh --tools-only).
  • doctor warns, not infos, when any surface resolves to hybrid and the ONNX path's modules are not importable in the running venv. The fix hint is the one above.
  • One RED per item before its GREEN.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions