feat(identity): add durable principal identity primitive#92
Conversation
Session: manual Producer: human
Session: 019f6534-6e28-7961-83d8-395d5a971897 Producer: ai-session Tool: codex
Session: 019f6534-6e28-7961-83d8-395d5a971897 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
|
@zane668 Thanks for the pr but I don't get like what's the point of the principal identity thing - isn't it the same as what the name is? what do you need it for? AI review: Review — PR #92: durable principal identity (P1)
VerdictDo not merge — close with #86/#87. Even with the bugs below fixed, this is 1275 lines of permanent, non-reconstructible data machinery with no runtime consumer. Its cost is front-loaded and irreversible; its only present capability is one inspection field. The problem that actually prompted it (#85) is fixable directly without any of this. If a concrete consumer that needs exact-incarnation identity is already committed and imminent, "fix then merge" becomes defensible. Absent that on the roadmap, the sequencing is inverted: build the primitive after the thing that needs it, not before. Why not, even bug-free
If it is fixed anyway — three blocking findingsAll three confirmed at source. 1. [P1] Recreated instance rows lose their principal, unrepairably
After a stopped-session resume or session-switch merge, the live row has Reachability caveat: the tracked-resume-same-name case short-circuits at 2. [P1] Concurrent v17→v18 migration can archive freshly-written v18 dataThe v18 migration SQL ( Race: processes A and B both read v17; A migrates and commits v18; B — already past its 3. [P2]
|
Summary
Scope
This is the P1 data and creation layer from #86. It intentionally does not add send authorization, vanilla re-attachment, tracked-resume retention, or stop semantics. Those remain separate follow-ups, including #87.
The branch is based on current main. Existing upstream CI baseline failures are isolated in #91; this PR does not duplicate those unrelated fixes.
Verification
Closes #86