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

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend, security

調査の方向性

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.

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

説明

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.

主要言語
TypeScript
スター
19.9k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

danielmiessler/LifeOS のほかの issue

danielmiessler/LifeOS の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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