SatisfactionCapture persists <private> spans verbatim into MEMORY/LEARNING on a low rating

Aperta
#2,626 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, security

Direzione di ricerca

Read hooks/SatisfactionCapture.hook.ts, especially captureLowRatingLearning and the explicit and implicit call paths, then check how stripPrivateContent is used in LIFEOS/TOOLS/CaptureEnvelope.ts and the memory writers. Trace captureFailure and the Errata row as the issue suggests. Done when private spans from feedback and response context are not persisted in low-rating learning files, with related writers checked for the same gap.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What happens

On a low rating (< 5), captureLowRatingLearning in hooks/SatisfactionCapture.hook.ts writes the rating comment and the last assistant response straight into MEMORY/LEARNING/<category>/<YYYY-MM>/…_LEARNING_low-rating-N.md. Neither string passes through stripPrivateContent, so any <private>…</private> span in either one is persisted verbatim.

In 8.761.0 (b7efec97):

  • hooks/SatisfactionCapture.hook.ts:427-482: summaryOrComment goes into the **Feedback:** line and detailedContext goes into ## Context, then writeFileSync(filepath, content, 'utf-8').
  • hooks/SatisfactionCapture.hook.ts:530 (explicit) and the implicit path pass explicitResult.comment and getSessionLastResponse(...) unchanged.

Why it matters

LIFEOS/DOCUMENTATION/Memory/CortexContract.md:154 says that private spans are "never persist or export", and stripPrivateContent (LIFEOS/TOOLS/CaptureEnvelope.ts:20) already exists for this. MemoryReviewer.ts and MemorySystem.ts call it before they persist anything. The low-rating learning file is persisted memory as well, but it skips that boundary.

Repro (traced in the code; I did not run it)

  1. Rate a turn low, with a comment that holds a private span, e.g. 3 - <private>secret detail</private> wrong file.
  2. Open the newest MEMORY/LEARNING/*/*/…_LEARNING_low-rating-3.md. The span is there verbatim.

Suggested fix

Inside captureLowRatingLearning, wrap both strings before they are used, which also covers getLearningCategory:

summaryOrComment = stripPrivateContent(summaryOrComment);
detailedContext = stripPrivateContent(detailedContext);

I have not checked the other writers on the same path, captureFailure and the Errata row. They may need the same treatment.

Lingua principale
TypeScript
Stelle
19.9k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di danielmiessler/LifeOS

Tutte le issue di danielmiessler/LifeOS

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.