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

Abierto
#1,768 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
clickhouse, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
263
Forks
47
Merge medio
14 h 21 min
PR fusionados (30 d)
873

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ClickHouse/loom

Todos los issues de ClickHouse/loom

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.