Repository navigation
Description
Verdict
Every entity the knowledge pipeline writes to the graph is attributed to the
string "ecl_pipeline" — the name of the machinery that wrote it, not the
document it came from. Attribution is not missing; it is occupied.
autobot-backend/knowledge/pipeline/loaders/redis_graph_loader.py:93
"source": "ecl_pipeline",So "which document did this fact come from?" has no answer, for every fact in
the graph. A consumer reading source gets a plausible, populated,
identically-valued field — which is why no check has caught it: any guard
asserting the field is non-empty passes.
The identity is already at the seam
autobot-backend/knowledge/pipeline/base.py:30
self.document_id: UUID | None = NonePipelineContext carries document_id through every stage, and
RedisGraphLoader receives that context and writes the constant anyway. The
value this field should hold is already in scope at the line that discards it.
That makes this the smallest possible change with the largest reach: no new
stage, no new producer, no schema decision.
DOCUMENT nodes exist today, and not for the reason anyone would assume
DOCUMENT has no ingest producer. It is produced only as a spaCy NER label
mapping — knowledge/pipeline/cognifiers/entity_extractor.py:51-52:
"LAW": "DOCUMENT",
"WORK_OF_ART": "DOCUMENT",So ingesting a PDF creates a DOCUMENT node only if its text happens to
mention a law or an artwork. That is vocabulary reuse, not attribution.
This matters for how the work is verified: a naive check for "do DOCUMENT
nodes exist?" answers yes today, and would answer yes with nothing fixed.
The acceptance criteria below therefore assert the node's relationship to an
ingested document, never its existence.
#17543 declared CODE and DOCUMENT in the vocabulary
(autobot_memory_graph/core.py:49-50). Declaring was the precondition; this is
the producer.
Scope: DOCUMENT only, and why CODE is excluded
CODE has no producer at all and cannot get one here.
codebase_indexing_service.py writes to Chroma directly — there is no
PipelineContext and no loader to extend, so linking code needs a seam built,
not extended. Whether codebase indexing should route through the ECL pipeline or
emit graph nodes alongside Chroma is a separate architectural decision and must
not ride on this change.
Supporting measurement: the autobot_code collection is referenced 0 times
from llc/ and 0 times from autobot_memory_graph/.
Acceptance criteria
-
RedisGraphLoadercreates exactly oneDOCUMENTnode per ingested
document, keyed onPipelineContext.document_id. - Every entity, relationship and event that loader writes attributes to that
node's identity. No write carries"ecl_pipeline"as itssource. - A test ingests two different documents and asserts the entities from each
attribute to differentDOCUMENTnodes. Existence-only assertions are
explicitly insufficient — see the NER note above; a test that only checks
DOCUMENTnodes exist passes on unfixed code. - A test covers
document_id is None(the field isUUID | None) and
asserts the loader does not invent an identity or silently fall back to a
constant. Whatever it does instead must be distinguishable in the output
from a real attribution. - A guard fails if any graph write reintroduces a literal constant as
source, so the class cannot return by a different path. - The ACs above are verified against a real ingest, not a fixture alone,
because the seam is the pipeline's own wiring.
Deconfliction
- This issue: the producer. The loader change, the
DOCUMENTnode, the
attribution. Makes a fact's source identifiable. - Umbrella: knowledge base intake is built but two legs are severed — upload has no UI, transcriber output cannot land #17527 (58): the round trip. Whether a document ingested by each path is
retrievable via chat and via LLC with its source identifiable. Proves a
source is reachable.
Neither blocks the other, and the seam between them is the source field this
issue gives a real value.
Related
#17543 (declared the vocabulary), #17527 (the round trip), #759 (the ECL
pipeline), #3230 (PropertyGraph typed edges)
Activity
mrveiss commentedon Sep 27, 2026
This is one of two instances of the same defect — the other is #17631
Recording the class rather than the incident, because a reader who finds one
should find the other.
Neither needs new plumbing. Both are one write away from making the join
possible, and both would pass any guard that only asserts the field is
populated — which is why neither was caught.
The Chroma half is #17631, measured on the deployment: the per-project
attribution mechanism was shipped as a leakage fix (#1710), the read path
requires it (
where={"source_id": source_id}), and it is populated on 79 rowsout of roughly 18,000. So it is implemented, proven, and unwritten on the path
that matters — the same sentence as this issue with one word changed.
Empirical support for this issue specifically, from the same measurement: the
deployed memory graph has all three RediSearch indexes present and
num_docs=0on every one, with zeroentity:*keys. SoDOCUMENThas noingest producer, as this issue states — and the NER path has never produced
anything here either. One consequence worth recording: the
"ecl_pipeline"constant cannot be demonstrated from live data, because there are no entity
records to inspect. This issue stands on source evidence; the host corroborates
the absence, not the constant.
mrveiss commentedon Sep 28, 2026
Chunking triage — a proposal, not an assignment
priority: medium— not applied.origin/mainsince 2026-08-14 references this issue.Nothing was relabelled, moved or closed by this pass.
github-actions commentedon Nov 2, 2026
needs-structure: this issue is missing:M<n> - ...:v0.9.6 - knowledge baseis not a goal milestonephase:M<n>.<k>label whose<n>matches the goal milestone: found noneThe label clears on the next issue event once all three are present (#19522).