Skip to content

[VAM-005] Freeze canonical Memory Object contract - #501

Open
zycaskevin wants to merge 6 commits into
codex/vam-002-memory-change-envelopefrom
codex/vam-005-memory-object-contract
Open

[VAM-005] Freeze canonical Memory Object contract#501
zycaskevin wants to merge 6 commits into
codex/vam-002-memory-change-envelopefrom
codex/vam-005-memory-object-contract

Conversation

@zycaskevin

@zycaskevin zycaskevin commented Aug 21, 2026

Copy link
Copy Markdown
Owner

問題

完成 VAM-001、VAM-002、VAM-003 後,Vault v1.0 還缺一份可由程式讀取的核心記憶契約:究竟哪些物件屬於 Vault,以及 Vault 提供哪些能力。若沒有這層契約,後續 Digital Life Identity Runtime 容易把 Identity/Personality 等責任重新塞回 Vault。

本 PR 做什麼

  • 凍結五種 canonical Memory Object:
    • event
    • experience
    • decision
    • knowledge
    • interaction
  • 凍結六種 Vault capabilities:
    • Storage
    • Retrieval
    • Provenance
    • Confidence
    • Lifecycle
    • Governance
  • 將 Personality、Identity、Relationship、Life Phase、Human Modeling 明列為非責任範圍。
  • 新增 provider-independent MemoryObject contract 與 provider operations:
    • create_memory_object_candidate
    • search_memory_objects
    • get_memory_object
  • POST /memory/create 加入向後相容的 memory_kindconfidence 欄位。
  • OpenAPI 發布 machine-readable memory-layer contract。
  • VAM-002 change envelope 使用 canonical kind,並保留不透明 application metadata。
  • 未知 legacy memory type 會安全映射為 knowledge,原值保留於 metadata,不遺失來源資訊。

為什麼要做

這是 Vault 作為「Governed Memory Infrastructure」的最後一塊明確邊界。Identity Runtime 之後只把 Vault 當 Memory Provider,不需要猜測 Vault 的資料種類與能力,也不能把人類建模責任混入 Vault Core。

非範圍

  • 不建立 Digital Life Identity Runtime
  • 不加入 Personality/Identity/Relationship/Life Phase/Human Modeling
  • 不改資料庫 schema 或執行 migration
  • 不改 active-memory authority
  • 不合併、不發布、不部署
  • 不提交或覆寫原工作樹中的 VLT-001 草稿

驗證

  • Focused Gateway/provider/change/object tests: 48 passed
  • Deployment docs tests: 12 passed
  • Ruff(changed Python): passed
  • Full Local Green:
    • isolated identity: 446 nodes
    • remaining suite: 2936 passed, 10 skipped, 1 pre-existing warning
  • DEP strict verification: passed

風險與治理

  • 這是 L2 contract/API change,合併前必須完成獨立審查。
  • Hosted CodeRabbit review 正在對目前 head 執行;所有新發現會先修正並重驗。
  • PR 已轉為 Ready;本地完整 Green 與嚴格 DEP 證據已更新,等待 hosted checks。

Stacked dependency

本 PR 以 #500 / codex/vam-002-memory-change-envelope 為 base,因為它延伸該 PR 的 provider/gateway change contract。

合併順序:

  1. 先審查並合併 [VAM-002] Stabilize generic Memory Change Envelope #500
  2. 再把本 PR retarget/rebase 到 main
  3. 重跑 hosted checks 與獨立審查後才可合併

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ccf4e1a-5ae0-4101-aaa7-d1ba9cd28480

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@zycaskevin
zycaskevin marked this pull request as ready for review August 21, 2026 12:01
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.

1 participant