docs(adapters): fix user-doc inaccuracies (closes spec PR #148 audit)#150
Closed
mmercuri wants to merge 2 commits into
Closed
docs(adapters): fix user-doc inaccuracies (closes spec PR #148 audit)#150mmercuri wants to merge 2 commits into
mmercuri wants to merge 2 commits into
Conversation
- frameworks-embedding.md: vector_store.query -> retrieval.query (source emits literal "retrieval.query" at vector_store_adapter.py:167,199,233 for Pinecone/Weaviate/Chroma wrappers respectively). Added taxonomy note clarifying that all backends normalize to retrieval.query, and cross-referenced the canonical spec at docs/adapters/embedding.md. - frameworks-benchmark_import.md: removed non-existent "case-insensitive heuristic" schema-detection claim. Source actually short-circuits with "if not mapping: return record" at adapter.py:423-434 — explicit-mapping-only behavior in v1.x. Noted v1.8 roadmap for heuristic detection consistent with spec PR #148 §7. - frameworks-benchmark_import.md: BenchmarkImportAdapter is a bare class, not a BaseAdapter subclass (adapter.py:70 declares "class BenchmarkImportAdapter:" with no superclass). Retitled doc to "Benchmark import (data importer)", added architectural note matching spec PR #148 §1, and clarified it has no connect/disconnect lifecycle, no capability declarations, and emits no telemetry events. Cross-referenced PR #148 specs (embedding.md, benchmark_import.md) as canonical for both files. No source code changes; doc-only fix.
…t.md (4th inaccuracy) The Persistence section claimed save_benchmark(metadata, records) but source uses insert_row(table, row) at adapter.py:441-444. Surfaced as bonus finding by agent a56bee25024184e15 while fixing the prior 3 inaccuracies in this PR. Cross-reference PR #148 canonical spec at docs/adapters/benchmark_import.md.
Contributor
Author
|
Adding follow-up commit for the 4th inaccuracy (Persistence section save_benchmark vs insert_row) that agent a56bee25024184e15 surfaced during the original fix. Now consolidated in this PR per reviewer ergonomics. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three pre-existing inaccuracies in the user-facing adapter docs that
spec PR #148 (
docs/adapters/embedding.md,docs/adapters/benchmark_import.md)surfaced. PR #148 added new spec docs and called out the inaccuracies in
those new specs but did NOT modify the inaccurate user docs. This PR
closes that loop.
Inaccuracies fixed
1.
docs/adapters/frameworks-embedding.md— wrong event nameWas: "emit
embedding.createandvector_store.queryevents"Now: "emit
embedding.createandretrieval.queryevents"Source emits the literal string
"retrieval.query":src/layerlens/instrument/adapters/frameworks/embedding/vector_store_adapter.py:167(Pinecone wrapper)src/layerlens/instrument/adapters/frameworks/embedding/vector_store_adapter.py:199(Weaviate wrapper)src/layerlens/instrument/adapters/frameworks/embedding/vector_store_adapter.py:233(Chroma wrapper)Updated 2 occurrences (intro + Events-emitted table). Added a taxonomy
note clarifying that vector-store retrieval is normalized to
retrieval.queryregardless of backend, with cross-reference to thecanonical spec at
docs/adapters/embedding.md.2.
docs/adapters/frameworks-benchmark_import.md— non-existent heuristicWas: "When no mapping is provided, the adapter applies a small set of
automatic heuristics (case-insensitive name match against the canonical
fields)."
Now: Explicit-mapping-only behavior, with v1.8 roadmap reference.
Source short-circuits when no mapping is provided:
There is no case-insensitive matching, no fuzzy aliasing — pass-through
only. v1.8 roadmap reference is consistent with spec PR #148 §7
("v1.8 — Schema-heuristic detection").
3.
docs/adapters/frameworks-benchmark_import.md— implies BaseAdapter inheritanceWas: Title "Benchmark import framework adapter"; body grouped it with
"the other framework adapters", implying the runtime-instrumentation
contract (
BaseAdapterlifecycle, capabilities, sinks).Now: Title "Benchmark import (data importer)"; new architectural note
explicitly calls out the bare-class shape.
Source declares no superclass:
This matches the architectural carve-out in spec PR #148 §1 (the adapter
is a one-shot ETL pipeline, not a runtime instrumentation adapter — no
connect()/disconnect()lifecycle, noAdapterCapabilityenum, nosinks, no telemetry events).
Out of scope (not changed)
The persistence section in
frameworks-benchmark_import.mddescribes asave_benchmark(metadata, records)store API, but the source actuallyuses
insert_row(table, row)(adapter.py:441-444). This is anadditional inaccuracy not in the original audit and was not requested
in the task scope. Recommend filing a follow-up issue.
Test plan
content on the
feat/instrument-frameworks-agentsbranch.vector_store.queryreferences indocs/,samples/,src/, ortests/after the edit(
grep -rn 'vector_store\.query'returns 0 matches).note), §3.3 (event payload schema reference), and §7 (v1.8
roadmap).
reviewed both files for broken markdown.
References
docs/adapter-specs-embedding-benchmark-importbranch)src/layerlens/instrument/adapters/frameworks/embedding/vector_store_adapter.pysrc/layerlens/instrument/adapters/frameworks/benchmark_import/adapter.py