Report reliance as returned, reported, reported and served, or not recorded

オープン
#1,760 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
24/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
clickhouse, python
領域
api, backend, databases

調査の方向性

Start with the related proposal in #1149 and the named files server/memory/app/exposure_ledger.py, server/tasks/api/models_run.py, and server/memory/api/models_search.py; the issue says the required read-record version and hash storage is proposed separately in #1149. This issue also calls for a shared server-side state derivation, a changed memories_used wire shape, comparison output changes, and rollout evidence. Done means the four acceptance cases pass and the requested read-only deployment count and rolling-upgrade behavior are addressed.

索引モデルが issue の本文から書いたものです。

説明

enhancement
Company

ClickHouse

Component

Conversations, sessions and runs

Use case

#1149 keeps two kinds of evidence apart: content Loom returned, and content a client says it relied on, which stays labeled client-reported. It also requires that unknown revisions and unavailable usage data remain explicit.

A report that joins the two has to say what it shows when the read record is missing, and a missing record is ordinary:

  • the ledger write is best-effort, and a failed write is logged and dropped (server/memory/app/exposure_ledger.py);
  • the ledger can be turned off (memory_exposure_ledger_enabled) and its rows expire;
  • a read that returned nothing writes no row;
  • a read made over MCP is filed under the connection's implicit run, not the run the client later completes (recalled_keys in server/tasks/api/models_run.py).

If the join reads "reported, no record" as a mismatch, it flags honest reports.

Describe the solution you'd like

Derive the reliance state on read, in one server-side function every surface uses. This is a proposal; nothing is implemented or measured.

State Meaning
returned The run's read record shows the item at that version or hash.
reported The client names the item as relied on. Labeled client-reported.
reported_and_served Reported, and the reported version or hash is in that run's read record.
not_recorded The run has no read record for the item.
  • not_recorded is never a mismatch. This proposal defines no mismatch state: one needs proof that a run's read records are complete, which the ledger does not give.
  • A read record written before revisions were recorded matches by key, and the state carries "revision not recorded".
  • memories_used entries gain the version the client relied on, and the content hash where the read returned one. A memory.search hit carries version and no content hash today (server/memory/api/models_search.py). An entry with a key alone stays valid and reads reported.
  • A second list beside memories_used would give two fields for one fact, so the entry changes shape. That changes a wire field, and the change names the break.
  • For tasks that ran under both compared revisions, the comparison in #1149 also names the tasks that improved and the tasks that regressed, and prints the excluded and ungraded counts beside the totals. Ungraded runs get a count and no pass share. The sample counts, configuration differences, uncertainty and the bar on causal claims stay as #1149 states them.

Acceptance fixture, added to the cases #1149 lists:

  1. A run that retrieves an item and does not report it reads returned.
  2. A report whose version or hash is in the run's read record reads reported_and_served.
  3. A report for a run with no read record reads not_recorded, also with the ledger turned off.
  4. A comparison with ungraded runs shows their count and no pass share for them.

Evidence still needed before rollout:

  • A read-only count, on a deployment with closed runs, of the share of runs naming memories_used that have a read record under the same run id. It sizes how often not_recorded appears and whether MCP reads need a join key.
  • How a replica of the previous build answers the new entry shape while two builds serve side by side during a rolling upgrade.
Describe alternatives you've considered
  • Flag every reported item without a read record as unmatched. The four cases above make that a false flag.
  • Keep reliance as keys. Two revisions of one key then stay indistinguishable.
  • Call the joined state "confirmed". Loom confirms that the revision was served, not that the agent used it.
Where the need comes from

An AI tool suggested this feature

Additional context

Found by source review; no report was computed.

The states read the version and hash a read record carries, which is a separate storage proposal under #1149. Without it a read record matches by key only, and no state can name a revision.

Related: Proposed as part of #1149. Roadmap: #1232.

主要言語
Python
スター
263
フォーク
47
平均マージ
14時間 21分
マージ済み PR(30日)
873

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ClickHouse/loom のほかの issue

ClickHouse/loom の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。