Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
00cf011
Knowledge reports have kinds, states and checked transitions
VanshajPoonia Dec 1, 2026
4797f8f
Knowledge reports have a table and are covered by erasure
VanshajPoonia Dec 1, 2026
3798b2a
The person a token stands for is resolved in one shared module
VanshajPoonia Dec 1, 2026
48fd563
A memory key's readable version is checked without serving the row
VanshajPoonia Dec 1, 2026
84080b1
Agents report wrong, outdated or missing knowledge with knowledge.rep…
VanshajPoonia Dec 1, 2026
3272eb2
Knowledge reports are documented with their rollout rule
VanshajPoonia Dec 1, 2026
2e8b503
Knowledge reports are tested against ClickHouse
VanshajPoonia Dec 1, 2026
81376b3
Report writes stop at the erasure fence
VanshajPoonia Dec 1, 2026
b87542d
A repeated report is returned before its checks run again
VanshajPoonia Dec 1, 2026
5898805
Report versions carry the actor and source class of their write
VanshajPoonia Dec 1, 2026
6d250a0
A document report's target_key is described as its source URI
VanshajPoonia Dec 1, 2026
22a705d
Reading a report draws on the knowledge read bucket
VanshajPoonia Dec 1, 2026
ae47a2e
The cell control census classifies the report fence's delete
VanshajPoonia Dec 1, 2026
4ab25b3
The SDK surface snapshot lists the report methods
VanshajPoonia Dec 1, 2026
b231b3c
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 1, 2026
c09ea15
Repeated evidence does not count toward the cap
VanshajPoonia Dec 1, 2026
5ae937e
A reporter the directory cannot fold is refused
VanshajPoonia Dec 1, 2026
f915b21
A maintainer reads another reporter's report by their live grant
VanshajPoonia Dec 1, 2026
4775dc7
A memory report's id names the row its key is read in
VanshajPoonia Dec 1, 2026
8c2fdf9
A resolution names a published revision that corrected the target
VanshajPoonia Dec 1, 2026
e218525
Report version checks read the head with sequential consistency
VanshajPoonia Dec 1, 2026
445e214
A user erasure clears what a maintainer wrote on every report version
VanshajPoonia Dec 1, 2026
23986bd
Report writes and report erasures share a durable write fence
VanshajPoonia Dec 1, 2026
8145cf4
A report's references are checked on write and on every read
VanshajPoonia Dec 1, 2026
728eb89
A maintainer reads a report when their own identity cannot be folded
VanshajPoonia Dec 1, 2026
bf47805
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 2, 2026
eee5334
The cell scan counts knowledge reports as data whose org the request …
VanshajPoonia Dec 2, 2026
1333a1e
Knowledge report versions are written whole from a column set held to…
VanshajPoonia Dec 2, 2026
2e36a52
The report queue is named among the lists read whole
VanshajPoonia Dec 2, 2026
a6503b9
An unfolded reporter is refused with Loom's own text, not the caught …
VanshajPoonia Dec 2, 2026
011c94f
A resolution revision with a non-ASCII digit is refused, not a 500
VanshajPoonia Dec 2, 2026
525fa08
A resolution names the revision readers are served, not any number be…
VanshajPoonia Dec 2, 2026
e7691a3
A report write that carries a reason waits for its author's erasure
VanshajPoonia Dec 2, 2026
75e9968
A user erasure finds an end user's name in a report version's writer
VanshajPoonia Dec 2, 2026
d334e44
A memory report is bound to the row its key was found in
VanshajPoonia Dec 2, 2026
e58f75a
The read scope walk builds a body for adding evidence to a report
VanshajPoonia Dec 2, 2026
8705534
The report handlers test begins its cited run with a goal
VanshajPoonia Dec 2, 2026
8d88749
The statement corpus lists the knowledge report erasure statements
VanshajPoonia Dec 2, 2026
1223d02
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 2, 2026
1d66723
A report's target version above UInt64 is refused before the write fence
VanshajPoonia Dec 2, 2026
a5a5cfb
A memory report found under agent * stays on a row of its own user
VanshajPoonia Dec 2, 2026
b98a4d3
A resolution with no target names its maintainer and goes with their …
VanshajPoonia Dec 2, 2026
cec8aef
A user erasure finds the report versions their service account wrote
VanshajPoonia Dec 2, 2026
56d6ccf
Reports wait for older replicas of every deployment kind sharing the …
VanshajPoonia Dec 2, 2026
254f8df
The Go SDK reads a report's target_version as uint64, the column's range
VanshajPoonia Dec 2, 2026
6cbb240
Rolling-upgrades rule 70 counts replicas in every deployment sharing …
VanshajPoonia Dec 2, 2026
a242eb8
The Go SDK keeps a marked UInt64 field as uint64 when it also takes a…
VanshajPoonia Dec 2, 2026
1c0196f
A report's target_version takes a decimal string and reads back as ta…
VanshajPoonia Dec 2, 2026
b46e72e
The TypeScript client files and reads a report above 2^53 without rou…
VanshajPoonia Dec 2, 2026
634c1e8
A report links only reports its caller can read, refused as missing o…
VanshajPoonia Dec 3, 2026
3d5a596
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 3, 2026
735cb49
A report serves related reports and a maintainer's reason only to cal…
VanshajPoonia Dec 3, 2026
31c3224
A report queue row carries no target_changed, since it reads no target
VanshajPoonia Dec 3, 2026
22db0e4
A report names a document only to callers who may know of it
VanshajPoonia Dec 3, 2026
da1d7c2
The reports page names the synchronous insert, and that deleting a ta…
VanshajPoonia Dec 3, 2026
6777777
A report decides a mirrored document's address from its metadata, onc…
VanshajPoonia Dec 3, 2026
58f5a2b
A document report reads only the copy it was filed about
VanshajPoonia Dec 3, 2026
c584e9a
A report retains the proof of each mirrored address it serves, so the…
VanshajPoonia Dec 3, 2026
a642879
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 3, 2026
1163703
The knowledge reports rule in rolling upgrades is rule 71, after main…
VanshajPoonia Dec 3, 2026
7897dce
A report write keeps no proof of its target for its answer, so a writ…
VanshajPoonia Dec 3, 2026
5772508
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 3, 2026
0e71b18
A failed service-account registry read files no report
VanshajPoonia Dec 3, 2026
da563ac
A document report's retry finds it whichever copy is visible now
VanshajPoonia Dec 3, 2026
71cf230
A replica at schema version 120 holds report writes
VanshajPoonia Dec 4, 2026
337f5e0
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 4, 2026
2b653f8
Report erasure counts every acknowledged report
VanshajPoonia Dec 4, 2026
baae916
A report queue filtered by address keeps its visible copies before th…
VanshajPoonia Dec 4, 2026
5a15cc0
An address filter reads the copies of every acknowledged live report
VanshajPoonia Dec 4, 2026
60131ac
A report page keeps publication proofs only for the copies it lists
VanshajPoonia Dec 4, 2026
36e88b1
The report queue's answer stays out of the replay cache
VanshajPoonia Dec 4, 2026
77620f7
A document report read in another copy is refused, not bound to the c…
VanshajPoonia Dec 4, 2026
06bb7c2
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 4, 2026
c453012
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 4, 2026
830645d
test_degraded_unnoted no longer lists the gap asker fold that moved t…
VanshajPoonia Dec 4, 2026
eb372d7
The report queue reads with sequential consistency
VanshajPoonia Dec 4, 2026
f781069
A maintainer action without a reason keeps the reason the report holds
VanshajPoonia Dec 4, 2026
426728e
A document report names the doc_id it read, and binds only to that copy
VanshajPoonia Dec 4, 2026
e9c917b
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 4, 2026
d0bc2d0
A memory report read in another row is refused, not bound to the row …
VanshajPoonia Dec 4, 2026
fc1fcc6
Evidence from another caller is not found even while the report is busy
VanshajPoonia Dec 4, 2026
b259e43
The reports pages say reopen clears the assignee and what a user eras…
VanshajPoonia Dec 4, 2026
06f9ed2
loom.knowledge_reports drops its deleted column, which nothing writes
VanshajPoonia Dec 4, 2026
97080b9
target_sha256 says which hash a report names for a memory and a document
VanshajPoonia Dec 4, 2026
66bd149
The reports page says when a repeat without a key cannot find a memor…
VanshajPoonia Dec 4, 2026
7ef2d1a
Merge remote-tracking branch 'upstream/main' into issues/1147-knowled…
VanshajPoonia Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 238 additions & 0 deletions docs/architecture/knowledge-reports.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/architecture/rolling-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,17 @@ See the [participant lifecycle baseline](cells.md#participant-lifecycle-baseline
serves. No gate holds the rollout, and the mixed-version gate does not check this
rule.

74. **Knowledge reports** (`loom.knowledge_reports`, migration
`122_knowledge_reports.sql`): N-1's erasure saga has no step for the table. So while
any live replica, in every deployment sharing the database, has a schema version
below 122, or no heartbeat has been read, `knowledge.reports.submit`, `update` and
`evidence` answer 503, as knowledge gaps do under rule 48; N-1 serves no
`knowledge.reports.*` op. Before a rollback, delete the table's rows, then delete
again after the first N-1 replica serves
([knowledge reports](knowledge-reports.md#rolling-upgrades)).
`tests/unit/test_knowledge_reports.py` checks the refusal; the mixed-version gate
does not.

## What checks them

`scripts/gates/mixed_version.py` (`make test-mixed-version`, the `mixed-version` CI job,
Expand Down
1 change: 1 addition & 0 deletions docs/architecture/storage-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ it holds no provider identity or credential.
| `knowledge_mirrors` | RMT(version) `(org, namespace, mirror)` | Postgres `knowledge_mirrors` | SoR | step `knowledge_mirrors.forget` | 3 | the `acl-` namespaces a namespace's mirrored sources' documents live in ([document sources](document-sources.md#data-model)), read by key; no memory content; named in `server/knowledge/store/mirrors.py`, `server/identity/store/namespace_census.py` |
| `knowledge_source_listings` | RMT(version) `(org, namespace, source_id)` | stays | Derived | census, `knowledge_source_listings.delete` | — | when each mirrored source's last complete listing started, under its mirror's name; read beside the lists in `loom.documents`, so it stays in ClickHouse; no memory content; named in `server/knowledge/store/mirrors.py` |
| `knowledge_group_members` | RMT(version) `(org, namespace, source_id, group)` | stays | Derived | census, `knowledge_group_members.delete` | — | source-scoped directory snapshots for mirror permissions; read beside listings under sequential consistency, including with Postgres heads; no memory content; named in `server/knowledge/store/source_access.py` |
| `knowledge_reports` | RMT(version) `(org, namespace, report_id)` | stays | SoR | census, `knowledge_reports.delete`, user scope too | — | problem reports on memory claims and document passages, the reporter's words and references to gaps, reflections and runs, never copied text; a user erasure deletes the reports the user filed and clears what names the user or is their words on the others ([knowledge reports](knowledge-reports.md#erasure)); named in `server/knowledge/store/reports.py`, `server/erasure/store/steps_ledgers.py` |
| `conversations` | MT `(org, namespace, thread_id, ts, msg_id)`, by `toYYYYMM(ts)` | stays + Postgres `conversation_states` | SoR | census, `conversations.tombstone`, user scope too | 3 | messages, an append log read by scans; their tombstones and saved state move to Postgres `conversation_states` in wave 3 ([conversation state](#conversation-state)); named in `server/knowledge/store/conversations.py`, `server/erasure/store/exports.py` |
| `conversation_threads` | RMT(updated_at) `(org, namespace, thread_id)`, by `toYYYYMM(created_at)` | stays | SoR | census, `conversations.tombstone`, user scope too | — | threads: the title, metadata and `run_id` a caller sets with `conversation.create` and `conversation.update`, and a model title for an untitled thread, with no TTL; it stays because its tombstones must reach every version of the row, as today's mutations do, and no reader needs a Postgres commit of it; an update merges onto the row it reads, so a write racing another write can lose a field, and one racing a thread delete or an erasure brings the thread back, a race of today's code that no wave changes ([conversation state](#conversation-state)); named in `server/knowledge/store/conversations.py`, `server/erasure/store/exports.py` |
| `conversation_embeddings` | RMT(ts) `(org, namespace, embedding_model, thread_id, msg_id)`, by `toYYYYMM(ts)` | stays | Derived, SoR past its source's retention | census, `conversations.tombstone`, user scope too | — | message vectors, rebuildable at embedding cost while their messages are retained; it has no TTL, so past `conversations` retention its excerpt, vector and saved state are the only copy; its saved state and saver stay on its own rows as version-row inserts from wave 3 ([conversation state](#conversation-state)); named in `server/knowledge/store/conversations.py`, `server/erasure/store/mutations.py` |
Expand Down
69 changes: 46 additions & 23 deletions docs/features/knowledge.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,34 @@ a section the unit of retrieval, and the breadcrumb tells a hit where it came fr
All operations are in the [knowledge group](../reference/operations.md#knowledge) of
the operations reference.

| Operation | Role | Does |
| --------------------------- | ------ | -------------------------------------------------------------------------------------- |
| `knowledge.add` | writer | Store one document and its chunks. |
| `knowledge.bulk_add` | writer | Store up to 500 documents in one call; the same per-document behaviour as `add`. |
| `knowledge.upsert` | writer | Add or replace the document at a `source_uri`; earlier chunks are superseded. |
| `knowledge.search` | viewer | Hybrid passage search (vector, BM25 and exact keys fused). |
| `knowledge.get` | viewer | One document's full text and metadata by `source_uri`. |
| `knowledge.list` | viewer | Documents of one or more namespaces in cursor pages, filterable by tag and URI prefix. |
| `knowledge.outline` | viewer | A document's table of contents, and optionally one section's assembled text. |
| `knowledge.synthesize` | viewer | Complete a task over whole documents, or calculate over datasets, with the LLM. |
| `knowledge.update_metadata` | writer | Edit `title`, `description` or `tags`; `reindex=true` rewrites the chunks' context. |
| `knowledge.delete` | writer | Supersede a document and its chunks. |
| `knowledge.bulk_delete` | writer | The same for up to 500 `source_uris`. |
| `knowledge.restore` | writer | Undo a delete: the document's last version and its chunks are live again. |
| `knowledge.reads` | viewer | How often agents opened each document over the last `days` (1–30). |
| `knowledge.inspect` | viewer | A report on the namespace's documents ([below](#inspecting-a-namespaces-documents)). |
| `knowledge.dedup_list` | admin | Documents (and, optionally, chunks) of the namespace with identical content hashes. |
| `knowledge.dedup_resolve` | admin | Supersede one side of a duplicate pair. |
| `knowledge.ingest` | writer | Extract an uploaded file and publish it as a document revision (a job). |
| `knowledge.ingest_status` | viewer | A job's state, stage, coverage, warnings, failure and published revision. |
| `knowledge.ingest_cancel` | writer | Stop a job before it publishes. |
| `knowledge.formats` | viewer | The formats an ingest reads, the names that select each, and the upload's limits. |
| `knowledge.gaps.list` | admin | Questions several users asked that nothing answered ([below](#knowledge-gaps)). |
| Operation | Role | Does |
| ---------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| `knowledge.add` | writer | Store one document and its chunks. |
| `knowledge.bulk_add` | writer | Store up to 500 documents in one call; the same per-document behaviour as `add`. |
| `knowledge.upsert` | writer | Add or replace the document at a `source_uri`; earlier chunks are superseded. |
| `knowledge.search` | viewer | Hybrid passage search (vector, BM25 and exact keys fused). |
| `knowledge.get` | viewer | One document's full text and metadata by `source_uri`. |
| `knowledge.list` | viewer | Documents of one or more namespaces in cursor pages, filterable by tag and URI prefix. |
| `knowledge.outline` | viewer | A document's table of contents, and optionally one section's assembled text. |
| `knowledge.synthesize` | viewer | Complete a task over whole documents, or calculate over datasets, with the LLM. |
| `knowledge.update_metadata` | writer | Edit `title`, `description` or `tags`; `reindex=true` rewrites the chunks' context. |
| `knowledge.delete` | writer | Supersede a document and its chunks. |
| `knowledge.bulk_delete` | writer | The same for up to 500 `source_uris`. |
| `knowledge.restore` | writer | Undo a delete: the document's last version and its chunks are live again. |
| `knowledge.reads` | viewer | How often agents opened each document over the last `days` (1–30). |
| `knowledge.inspect` | viewer | A report on the namespace's documents ([below](#inspecting-a-namespaces-documents)). |
| `knowledge.dedup_list` | admin | Documents (and, optionally, chunks) of the namespace with identical content hashes. |
| `knowledge.dedup_resolve` | admin | Supersede one side of a duplicate pair. |
| `knowledge.ingest` | writer | Extract an uploaded file and publish it as a document revision (a job). |
| `knowledge.ingest_status` | viewer | A job's state, stage, coverage, warnings, failure and published revision. |
| `knowledge.ingest_cancel` | writer | Stop a job before it publishes. |
| `knowledge.formats` | viewer | The formats an ingest reads, the names that select each, and the upload's limits. |
| `knowledge.gaps.list` | admin | Questions several users asked that nothing answered ([below](#knowledge-gaps)). |
| `knowledge.reports.submit` | writer | Report a memory claim or document as wrong or outdated, or knowledge as missing ([below](#knowledge-reports)). |
| `knowledge.reports.get` | viewer | One report, for its reporter or an admin. |
| `knowledge.reports.list` | admin | The namespace's report queue, without anyone's words. |
| `knowledge.reports.update` | admin | Take, release, ask for evidence on, resolve, dismiss or reopen a report. |
| `knowledge.reports.evidence` | writer | The reporter adds evidence references to their own report. |

`knowledge.search` and `knowledge.reads` are hidden from MCP: neither is listed, and
`loom_op` refuses them too. An agent reaches the knowledge plane through
Expand Down Expand Up @@ -1739,6 +1744,24 @@ curl -s localhost:7777/v1/knowledge.gaps.list -H "Authorization: Bearer $LOOM_AP
How misses are recorded and grouped, their erasure and their rolling-upgrade notes are in
[knowledge gaps](../architecture/knowledge-gaps.md).

## Knowledge reports

An agent or client that finds a memory claim or a document wrong or outdated, or finds
knowledge missing, files a report with `knowledge.reports.submit`. A report never edits
its target. The namespace's admins read the queue with `knowledge.reports.list`, open a
report with `knowledge.reports.get`, and take, resolve with the revision that fixed the
target, or dismiss it with `knowledge.reports.update`. A reporter adds evidence to their
own report with `knowledge.reports.evidence`.

```bash
curl -s localhost:7777/v1/knowledge.reports.submit -H "Authorization: Bearer $LOOM_API_KEY" \
-H 'content-type: application/json' \
-d '{"org":"dev","namespace":"local","agent":"cli","kind":"outdated","target_kind":"memory","target_key":"pricing/plan","problem":"The plan price changed."}'
```

The reporter, the read checks, the states and their erasure are in
[knowledge reports](../architecture/knowledge-reports.md).

## Settings

| Setting | Effect |
Expand Down
Loading
Loading