feat(embedding): apply asymmetric query/document prefixes to embed calls

Analysed against e6aaa23d10 files changedby NullSense
Open PR on GitHub

Change-risk score

9.1out of 10Typical
Repository health
5.9to6.3base against this head

This change sits in the middle third of this repository's own risk distribution, so it is about as risky as the work around it. It is riskier than 63% of this repository's own commits.

No changed file lost health in this diff. 5 contracts changed, called by 27 symbols in files this PR does not touch.

Files changed
10
in this diff
Contracts changed
5
removed or signature
Outside callers
27
not in this diff
Findings added
1
5 resolved

Blast radius on the repo map

Every file in the repository, grouped into its own directories and sized by lines. The ones this PR changes are lit, and everything that imports them is marked.

packagestestsapi-clientclicoreserveruivscodewebunitsrcsrc/repowis…src/repowise/coresrc/repowise/server__tests__srcsrccligenerationhealthingestionpersiste…servertest_pro…workspaceagent_targe…commandsanalysisgenerationingestionworkspacemcp_serverroutersc4graphcomponen…mcp
changed, health fellchanged, health rosechanged, health heldimports a changed fileuntouchedchanged by this PR

Drawing 3,308 of 3,708 files at a readable size, grouped by directory and sized by lines of code. 10 changed here reach 23 more by import. 400 are too small to see at this width, which is what the frame below is for.

Inside packages/core/src/repowise/core

analysisgenerationingestionpersistencepipelineproviderssessionsupgradeworkspacedead_codehealthconcept_treecontextpage_generatordynamic_hin…external_sy…extractorsframework_edg…git_indexergraphlanguagesresolverscrudllmextractorsbiomarkerscomplexitydataflowperfrefactoringdialectskg_curation…se…co…sk…st…tr…ca…ch…fr…mo…se…incremental…per…effic…ar…bre…cod…co…contract…cr…di…re…re…updat…se…analy…cons…dy…evolu…extractor.pyrati…sema…te…vo…asse…fe…te…gr…orch…pert…va…cm…do…vi…py…fi…ind…_re…cp…jvm…jvm_…ts…gi…gra…pa…re…ant…bas…ge…oll…ope…CHANGE…key…ts…heal…

802 files, 10 changed by this PR and 12 that import one. Click any directory above to frame it instead.

Changed

Contracts this PR changes

Only symbols that were removed or had their signature changed. An added symbol has no prior callers, and a body-only change leaves the caller's contract intact, so neither is a finding.

embedsignature changedpackages/core/src/repowise/core/providers/embedding/ollama.py:87

7 callers outside this PR.

tests/unit/test_persistence/test_ollama_embedder.py::test_embed_empty_returns_emptytests/unit/test_persistence/test_ollama_embedder.py::test_embed_posts_batch_to_native_endpointtests/unit/test_persistence/test_ollama_embedder.py::test_embed_raises_when_server_returns_wrong_width_explicittests/unit/test_persistence/test_ollama_embedder.py::test_embed_raises_when_server_returns_wrong_width_inferredtests/unit/test_persistence/test_ollama_embedder.py::test_embed_supports_legacy_single_embedding_responsetests/unit/test_persistence/test_ollama_embedder.py::test_embed_width_check_not_triggered_on_emptytests/unit/test_persistence/test_ollama_embedder.py::test_env_timeout_is_applied_to_the_request
embedsignature changedpackages/core/src/repowise/core/providers/embedding/openrouter.py:88

7 callers outside this PR.

tests/unit/test_persistence/test_openrouter_embedder.py::test_embed_batch_returns_correct_counttests/unit/test_persistence/test_openrouter_embedder.py::test_embed_empty_returns_emptytests/unit/test_persistence/test_openrouter_embedder.py::test_embed_passes_model_and_inputtests/unit/test_persistence/test_openrouter_embedder.py::test_embed_raises_when_api_returns_wrong_widthtests/unit/test_persistence/test_openrouter_embedder.py::test_embed_returns_normalized_vectorstests/unit/test_persistence/test_openrouter_embedder.py::test_embed_uses_openrouter_base_urltests/unit/test_persistence/test_openrouter_embedder.py::test_embed_width_check_not_triggered_on_empty
embedsignature changedpackages/core/src/repowise/core/providers/embedding/edenai.py:104

6 callers outside this PR.

tests/unit/test_persistence/test_edenai_embedder.py::test_embed_empty_returns_emptytests/unit/test_persistence/test_edenai_embedder.py::test_embed_passes_model_and_inputtests/unit/test_persistence/test_edenai_embedder.py::test_embed_raises_when_api_returns_wrong_widthtests/unit/test_persistence/test_edenai_embedder.py::test_embed_returns_normalized_vectorstests/unit/test_persistence/test_edenai_embedder.py::test_embed_uses_edenai_base_urltests/unit/test_persistence/test_edenai_embedder.py::test_embed_width_check_not_triggered_on_empty
embedsignature changedpackages/core/src/repowise/core/providers/embedding/gemini.py:82

6 callers outside this PR.

tests/unit/test_persistence/test_gemini_embedder.py::test_embed_batch_returns_correct_counttests/unit/test_persistence/test_gemini_embedder.py::test_embed_empty_returns_emptytests/unit/test_persistence/test_gemini_embedder.py::test_embed_raises_when_api_returns_wrong_widthtests/unit/test_persistence/test_gemini_embedder.py::test_embed_raises_when_api_returns_wrong_width_custom_dimtests/unit/test_persistence/test_gemini_embedder.py::test_embed_returns_normalized_vectorstests/unit/test_persistence/test_gemini_embedder.py::test_embed_width_check_not_triggered_on_empty
searchsignature changedpackages/core/src/repowise/core/persistence/vector_store/in_memory.py:69

1 caller outside this PR, 2 inside it.

tests/unit/generation/test_embed_metadata.py::test_title_survives_into_the_vector_store

What this PR added, and what it took away

Introduced findings are the ones inside the lines this PR added, not the file's existing ones. The resolved column is the only place in the product that lists them.

Introduced (1)
  • lowdry violation
    tests/unit/test_persistence/test_embed_kind_prefix.py:109

    13% of file duplicated; worst clone shares 12 lines with tests/unit/test_persistence/test_embed_kind_prefix.py

Resolved (5)
  • function hotspot
    packages/core/src/repowise/core/persistence/vector_store/_base.py
  • io in loop
    packages/core/src/repowise/core/persistence/vector_store/_base.py
  • function hotspot
    packages/core/src/repowise/core/persistence/vector_store/lancedb_store.py
  • io in loop
    packages/core/src/repowise/core/persistence/vector_store/lancedb_store.py
  • function hotspot
    packages/core/src/repowise/core/persistence/vector_store/pgvector_store.py

Who else knows this code

The primary author of each changed file by share of its recent commits, mined from git history. Advisory: it says who has context, not who must review.

  • packages/core/src/repowise/core/persistence/vector_store/_base.pySwati Ahuja 52% of 8 commits
  • tests/unit/server/mcp/test_keyless_vector_leg.pyRaghav Chamadiya 100% of 5 commits
  • packages/core/src/repowise/core/providers/embedding/ollama.pybiggiesmallcap-blip 80% of 4 commits
  • tests/unit/cli/test_embedder_resolution.pyRaghav Chamadiya 100% of 7 commits
  • tests/unit/persistence/test_vector_store.pyRaghav Chamadiya 100% of 1 commits

Tests that cover this change

Test files that import a file this PR changes. Not a coverage measurement: it is the import graph, so it says which tests are worth running, not which lines they reach.

  • tests/unit/server/mcp/test_recoverable_caps_wire_contracts.py
  • tests/unit/server/mcp/test_why.py
  • tests/unit/server/mcp/test_why_evidence_contract.py
  • tests/integration/persistence/test_embed_batch_pg.py
  • tests/integration/test_mcp.py
  • tests/unit/cli/test_doctor_embed_recipe.py
  • tests/unit/server/test_app_embedder_backends.py
  • tests/unit/test_persistence/test_edenai_embedder.py
  • tests/unit/test_persistence/test_gemini_embedder.py
  • tests/unit/cli/test_shared_helpers.py
  • tests/unit/test_persistence/test_embedding_timeout_resolution.py
  • tests/unit/test_persistence/test_ollama_embedder.py
  • tests/unit/test_providers/test_deepseek_provider.py
  • tests/unit/test_providers/test_edenai_provider.py
  • tests/unit/persistence/test_embed_recipe.py
  • tests/unit/persistence/test_embed_text_cap.py
  • tests/unit/test_persistence/test_openrouter_embedder.py
  • tests/unit/server/mcp/test_answer_agreement.py
  • tests/unit/server/mcp/test_answer_confidence_reasons.py
  • tests/unit/server/mcp/test_answer_graph_expand_edges.py
  • tests/unit/analysis/test_ff_mcp_payload_decisions.py
  • tests/unit/cli/test_doctor_vector_decisions.py
  • tests/unit/persistence/test_coordinator_health.py
  • tests/unit/cli/test_persist_result_sweep.py
  • tests/unit/generation/test_embed_metadata.py
  • tests/unit/persistence/test_vector_evidence_snippet.py
  • tests/unit/persistence/test_vector_store_batching.py

Get this on your own pull requests

This page came from an index of repowise-dev/repowise. No model calls, no configuration, and it refreshes on every push. Install the bot and every pull request gets one of these.