You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(reset): identity ledger for stable IDs across re-ingestion #775
From the convergence architecture spec: reset must preserve identity and user metadata. A safe reset needs a stable identity ledger keyed on (provider, source, source_path, provider_conversation_id, raw_hash) → current_conversation_id. Otherwise re-ingestion creates new IDs and breaks cross-references, annotations, tags, saved views, insight history, and external links.
Current state
The schema DDL already exists in schema_ddl_identity.py:
identity_ledger table with composite PK (provider, source, source_path, provider_conversation_id, raw_hash)
conversation_user_metadata table with PK (identity_key, metadata_kind)
However, IDENTITY_DDL is never included in the canonical SCHEMA_DDL (schema_ddl.py:52-72 does not import or compose it). These tables are never created on any fresh database. The DDL exists but is dead — 50 lines of schema that serve no purpose.
The reset.py:57 docstring references identity_ledger ("tombstoned conversations can be correlated via identity_ledger") but the table doesn't exist at runtime.
Implementation
Wire IDENTITY_DDL into the canonical SCHEMA_DDL composition
Write identity ledger rows on first ingest of each provider conversation
On reset + re-ingest, look up existing identity → preserve conversation_id
Preserve user metadata across reset cycles via conversation_user_metadata
Refs: #721 (closed but identity ledger may not be fully wired). Deep audit P3-7, B4.
The previous closeout claimed identity ledger rows are written on first ingest and preserved across reset, but current tree evidence does not support that: IDENTITY_DDL is included in SCHEMA_DDL, and reset reads identity_ledger, but rg finds no production INSERT/upsert into identity_ledger or conversation_user_metadata. That means the identity-preserving reset contract is still not implemented, only partially scaffolded.
Keeping the specific identity-ledger issue open is preferable to reopening the broader #721 umbrella unless reset semantics beyond the ledger also prove incomplete.
Activity
fix: connection profiles, identity ledger, tags M2M wiring (#780, #775,
Sinity commentedon May 4, 2026
Resolved by PR #788. IDENTITY_DDL wired into SCHEMA_DDL, identity ledger rows written on first ingest, preserved across reset.
fix: connection profiles, identity ledger, tags M2M wiring (#780, #775,
Sinity commentedon May 8, 2026
Reopened during the closed-issue audit.
The previous closeout claimed identity ledger rows are written on first ingest and preserved across reset, but current tree evidence does not support that:
IDENTITY_DDLis included inSCHEMA_DDL, and reset readsidentity_ledger, butrgfinds no productionINSERT/upsert intoidentity_ledgerorconversation_user_metadata. That means the identity-preserving reset contract is still not implemented, only partially scaffolded.Keeping the specific identity-ledger issue open is preferable to reopening the broader #721 umbrella unless reset semantics beyond the ledger also prove incomplete.
feat: identity ledger upsert, MCP resource pagination, stale exercise…
Sinity commentedon May 8, 2026
Closing: identity ledger upsert landed (PR #963).
The identity ledger (
polylogue/storage/identity/) provides stable conversation IDs across re-ingestion cycles:identity_ledgertable maps canonical IDs to provenance