Skip to content

feat(memory): add retrieval history and reversible graph feedback - #260

Merged
lipluscodex merged 2 commits into
mainfrom
259-ngr-memory-feedback
Sep 30, 2026
Merged

lipluscodex merged 2 commits into
mainfrom
259-ngr-memory-feedback

Conversation

@lipluscodex

@lipluscodex lipluscodex commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Lin:

Closes #259

検索履歴、資料の selected→validated→used、半減期3600秒の活性度、実 graph path の confirmed 強化と receipt 指定取消しを一つの永続 feedback 機能として追加します。同じ GitHub principal の client 間で共有し、keyword の順位を保持したまま opt-in の graph 同 hop 内へ学習を反映します。

  • 成功した search/scan/fetch と0件結果へ UTC trace と版別 source_id/provenance を追加。部分取得・保存失敗は trace を発行せず feedback 不可とします。
  • live inline doc/wiki は返した本文の SHA-256 を版として index snapshot と区別。索引 timestamp が同じでも live 本文更新は別 source_id とし、memory には hash/provenance のみ保存します。
  • batch、段階、idempotency、並行更新は既存 IssueStore の SQLite transaction で処理し、2 hop の実 edge/delta と因果的取消しを audit に残します。
  • Worker/stdio bridge 全4 tool の nested 入出力 schema・bounds・defaults・annotations を実 protocol と比較。日英 requirements/README/memory 仕様、manifest を同期します。

検証: 通常テスト311件、実 Worker/SQLite/D1 テスト89件、bridge テスト33件、schema drift、TypeScript、Wrangler dry-run が通過。合成 fixture の検索→used→confirmed→corrected、独立寄与の保持、principal 分離、reindex、既存 unchanged event ID 補修を含みます。検索品質の向上は未評価です。

運用条件: D1 migration 0008 を Worker deploy/自動 deploy を起こす merge より先に適用してください。既存 comment/review 行は、deploy 後の有界な /admin/backfill-source-identities で DO の canonical ID から補修できます。具体的な確認・適用手順と synthetic lifecycle は docs/2-feedback-memory(.ja).md にあります。新 binding/class migration は不要です。公開 version/tag/release、本番 DB 変更、deploy はこの PR の実装段階では行っていません。stdio artifact には新しい2つの schema JSON が必要です。

Lin: 検索 trace、資料の利用段階、減衰する活性度、confirmed の実 path 寄与と receipt 指定取消しを認証 principal ごとの原子的な SQLite memory として追加する。Worker と bridge の全 tool 契約、0008 移行と既存 event ID の有界補修、日英仕様を同期する。
@lipluscodex lipluscodex self-assigned this Sep 30, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
github-rag-mcp 679915a Sep 30 2026, 11:14 AM

@lipluscodex lipluscodex left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lin:

親 self-review: 修正待ち(head 352626e)。検索履歴、段階利用、principal分離、減衰、saved graph pathの強化と因果的取消し、全tool schema、既存eventの移行を確認。CI/test/Workers Buildsは成功。

残る1点: include_content:true の inlineDocContent は doc/wiki の最新本文をGitHubから返すが、identifySource は索引の updated_at をversionにする。索引後に本文が変わった場合、違う実版を同じsource_idで記録してしまう。Issue #259の版別provenance・正確な資料利用の契約により修正が必要。

live inlineには返した本文のblob SHA/content hashなどの実版識別を付け、indexed snapshotから区別する。本文はmemoryに複製せずhash/provenanceのみ保存する。検索順位は維持し、索引timestampが同じでlive本文だけ更新された場合のsource_id分離を実MCPテストで確認する。仕様にもlive inlineとstored-content fetchの版の違いを明記する。

次: 担当へ修正を依頼済み。修正headのCIを確認して再レビューする。本番migration/deployは未実施、mergeはその準備後に行う。

Lin: live inline doc/wiki の返した本文を SHA-256 で版識別し、index snapshot と分ける。同じ索引 timestamp でも live 本文更新を別 source_id として記録する。本文は memory に複製せず、実 MCP 回帰と日英仕様・bridge contract を同期する。

@lipluscodex lipluscodex left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lin:

親 self-review: 合格。対象headは 679915a。

Issue #259の4機能を確認しました。UTC検索traceと版別source provenance、principal別の履歴と段階利用、半減期による上限付きactivation、used済みの実1〜2hop pathへのconfirmed-only強化、receipt寄与だけを戻して後続の独立寄与を保持する取消しが実装されています。原子的batch、retry/conflict、並行更新、reindex、canonical eventの移行、keyword順位とgraph軸の維持、Worker/bridge全4toolの契約も確認しました。

前回の修正要求は解消済みです。live inline doc/wikiは実際に返した本文のSHA-256版を用い、索引timestampは補足情報としてのみ扱います。固定index timestampでlive本文を変更する実MCP回帰でID分離と旧usageの非転用を確認しています。本文はmemoryに複製しません。

test、CI、Workers Buildsが当該headですべて成功。通常311件、実Worker/SQLite/D1 89件、bridge33件、全tool schema/wire、TypeScript、Wrangler dry-runの根拠を確認しました。日英README/requirements/owned memory仕様と配布manifestを同期。必要なevent identity migrationとbackfillを含み、要求外の機能追加はありません。検索品質向上の主張は行いません。

次は運用段階です。autoモードで追加のmerge承認は不要ですが、本番0007/0008 migrationの先行適用と列の確認を済ませ、最新CLEAN状態でsquash mergeします。その後Worker deployment、既存eventの有界backfill、成果物を確認します。公開version/tag/releaseは別の人間確認を保持しています。

@lipluscodex
lipluscodex merged commit 4594bb6 into main Sep 30, 2026
3 checks passed
@lipluscodex
lipluscodex deleted the 259-ngr-memory-feedback branch September 30, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(memory): add retrieval history, usage, activation, and reversible graph feedback

1 participant