Keep a person's rejection of a rule-made copy and never remove a copy by rule

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
clickhouse, python
領域
backend, databases

調査の方向性

Start with server/memory/app/copy_ops.py and read how memory.copy_to and memory.cross_promote record copy lineage. Then trace the existing memory and rule-related entry points; the issue says no rule record exists yet and leaves the rejection record, erasure, and rule-revision behavior undecided. Done means the four acceptance cases are covered and the required read-only count is available.

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

説明

enhancement
Company

ClickHouse

Component

Memory and search

Use case

#1142 adds curation rules that share a copy of a matching memory with a team. Its criteria say "repeated runs do not create duplicate copies. A changed source revision or rule revision is reevaluated" and "document supported reversal; removing a copy cannot undo prior disclosure."

Two cases follow from those and are not decided there:

  • A person removes a copy a rule made. On the next run the source still matches and the destination holds no copy, so the rule shares it again and overrides the person.
  • A source stops matching its rule. A rule that then removes the shared copy deletes a row no writer asked to delete, and the copy may already have been read.
Describe the solution you'd like

Three behaviours for a rule-made copy. This is a proposal; nothing is implemented or measured.

  • Origin on the copy. A copy a rule made records the rule id and the rule revision beside the existing copy lineage.
  • A person's rejection holds. When a person removes or rejects a rule-made copy, Loom remembers it for that rule and that source content hash. The next run skips the item with that reason. A changed source revision is evaluated again.
  • No automatic removal. A rule never removes a shared copy. A source that no longer matches is reported in the run history as "no longer matches".
  • A rule reads source metadata only, never another rule's output, so the order rules run in does not change the result.

What Loom has that this builds on: memory.copy_to and memory.cross_promote write cross_promoted_from_memory_id and cross_promoted_from_namespace on the copy (server/memory/app/copy_ops.py). No rule record exists yet.

Acceptance fixture:

  1. A person removes a rule-made copy; the next run skips the item and records the reason.
  2. The source is edited; the next run evaluates it again.
  3. A source stops matching; its copy stays, and the run history has a "no longer matches" entry.
  4. Two rules run in either order produce the same copies.

Evidence still needed before rollout:

  • A read-only count, on a deployment that uses memory.copy_to or memory.cross_promote, of copies a person later removed. It sizes how often a rule would share an item again.

Three decisions are open:

  • Where the rejection record lives.
  • How it is erased with its source, since it holds a source content hash.
  • Whether a new rule revision clears it.
Describe alternatives you've considered
  • Share again on every run. The person's removal lasts until the next run.
  • Remove the copy when the source stops matching. That is a deletion by rule, and #1142 already says removal cannot undo disclosure.
  • Remember the rejection by key alone. A corrected source revision would then stay blocked.
Where the need comes from

An AI tool suggested this feature

Additional context

Found by source review; no rule was run and no copy was made.

Related: Proposed as part of #1142. 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 を短くまとめたダイジェスト。