v1 slice 2: the model generalizes and anonymizes each lesson, under a rate and a daily cap #5

Open
opened 2026-11-25 18:00:08 +00:00 by uranus · 0 comments
Member

Purpose (feature): a lesson reaches mcl-rag in its general, anonymized form, written by a small local model, and none is ever dropped when the budget rests.

After slice 1. From the design (#1): ollama on loopback through the OpenAI-compatible endpoint, qwen2.5:7b-instruct by default (a setting).

  • Copy mcl-spartan's mind_llm, mind_breaker and mind_budget (apps/mcl_spartan/src/inhabit_mind/), DECIDED "Copy now, library later". Name the source commit in the copy.
  • The worker sends each queued lesson to the model to generalize and anonymize, then runs the leak scan on the model's output. Privacy never rests on the model.
  • Rate clock and daily token cap: while resting, lessons stay queued in the log and are taken up when it opens. Unlike spartan, nothing is dropped.
  • No model configured: slice 1's path, unchanged.

Done when:

  • With a stand-in model, the stored text is the model's rewrite, and the leak scan runs on that rewrite (a rewrite that keeps a private name is refused).
  • With the cap reached, new lessons stay queued and are stored after the reset. None is lost (count before = count after).
  • A model that fails or times out trips the breaker. The lesson stays queued, not refused.
  • Tests never reach a real model server or any outside service.

Refs #1

Purpose (feature): a lesson reaches mcl-rag in its general, anonymized form, written by a small local model, and none is ever dropped when the budget rests. After slice 1. From the design (#1): ollama on loopback through the OpenAI-compatible endpoint, `qwen2.5:7b-instruct` by default (a setting). - Copy mcl-spartan's `mind_llm`, `mind_breaker` and `mind_budget` (`apps/mcl_spartan/src/inhabit_mind/`), DECIDED "Copy now, library later". Name the source commit in the copy. - The worker sends each queued lesson to the model to generalize and anonymize, **then** runs the leak scan on the model's output. Privacy never rests on the model. - Rate clock and daily token cap: while `resting`, lessons stay `queued` in the log and are taken up when it opens. Unlike spartan, nothing is dropped. - No model configured: slice 1's path, unchanged. Done when: - [ ] With a stand-in model, the stored text is the model's rewrite, and the leak scan runs on that rewrite (a rewrite that keeps a private name is refused). - [ ] With the cap reached, new lessons stay `queued` and are stored after the reset. None is lost (count before = count after). - [ ] A model that fails or times out trips the breaker. The lesson stays `queued`, not `refused`. - [ ] Tests never reach a real model server or any outside service. Refs #1
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-scribe#5
No description provided.