Repository navigation
Description
Context
Part of #54. #3952 permits a verified owner to continue typed chat safety history from another login; #3962 selects pruning-safe durable account ownership for that history. Retained voice history still compares the caller with the originating principal exactly.
Inspected source: main 3c44ac6fc56d27675dadaf38a16254db53c39f69.
- Live startup opens retained history at
this.host.dialogue.open(packages/ui-server/src/ws/conversation.ts:442) and reads it at line 449. Current connection/principal/epoch authorization is separately checked byauthorizedat line 434. dialogueOwner(packages/ui-server/src/ws/dialogue-storage.ts:38) rejects another principal at lines 54–55.openDialogue(same file:99) adopts a typed chat's safety owner through an exact-principal query at line 142.pendingEpochFor(same file:77),activeEpochFor(:92),hasUnretainedVoice(:61),bindDialogue(:176),appendDialogue(:230),readDialogue(:298) andcloseDialogue(:410) are related ownership, adoption, liveness and evidence boundaries. Review their callers together; changing one comparison alone is insufficient.sameAccount(packages/ui-server/src/middleware/account-partition.ts:85) defines the existing account equivalence;prunePrincipals(packages/ui-server/src/db/principals.ts:410) removes terminal login rows. Neither login retention nor account equivalence changes in this issue.
Reproduced keylessly: real in-memory SQLite and openDialogue, with two live password-owner principals, produce sameAccount(first, second) === true, then Dialogue ownership mismatch when the second owner opens voice in the first owner's chat. No provider calls or brain-file writes. This proves the concrete storage mismatch, not a full running-device result.
Decision — maintainer, 2026-11-11
Option A: make retained voice/dialogue history account-owned too. A currently authorized login of the same owner may start a new voice conversation in the same chat across logins/devices, using its retained history. Capture durable, server-verified account ownership separately from immutable originating-principal attribution, consistent with #3962.
This ownership evidence survives original-login pruning and is not a credential. It does not restore an expired/revoked login, let another login take control of an existing live session, change authentication, or change exact-principal chat deletion. Unknown/foreign identities remain refused. Missing ownership proof already deleted cannot be reconstructed or assigned to the current caller.
The exact-login-only/separate-chat alternative was not selected. The durable decision-record follow-up #3985 is separate from implementation and is not a prerequisite to starting this fix.
Out of scope
- Chat deletion or its exact-principal admission/commit rules (
docs/decisions/chat-history-deletion.md). - Taking over, resuming, cancelling or otherwise controlling another login's active live session; current principal/connection/epoch authority, permission, expiry and revocation rules remain.
- Changing account equivalence, ambient/agent/system authority, principal-retention policy or provider-facing history.
- Implementing ui-server: a chat whose starting owner login was pruned can never be continued #3962's safety-history fix here, broader identity refactoring, new UI design, paid provider calls or physical-device qualification.
Scope
- Add durable server-derived account-ownership evidence for retained dialogue owners; keep original principal and per-entry/epoch attribution. Coordinate overlapping storage/identity work with ui-server: a chat whose starting owner login was pruned can never be continued #3962 and reuse its evidence model where applicable, without treating historical ownership as current authorization.
- Apply the selected history-access policy consistently to owner/session/alias resolution, opening, binding/adoption, reads, authorized writes and close/drain paths. Keep canonical history identity, generation and retired-chat fences intact.
- A typed-first chat and a first voice conversation from another authorized login of the same owner must use the verified canonical safety/history identity, rather than creating divergent owners. Refuse contradictory ownership; do not overwrite evidence to make it fit.
- Separate retained-history ownership from active/pending live-epoch authority. Audit the metadata comparisons and legacy/unretained-voice checks together so they neither reject an authorized new login merely due to historical attribution nor mistake another login's epoch for the caller's authority or make incomplete evidence complete.
- Enrich legacy ownership only from still-resolvable verified evidence. A missing/corrupt/conflicting owner with no durable evidence stays unknown and refused within the affected scope. Do not extend login retention or invent an owner-by-default backfill.
Acceptance criteria
- Two currently authorized owner logins can successively open voice in the same existing chat, retaining its canonical history identity and records. Cover voice-first and typed-first chats, session and owner/alias lookup, and binding/adoption. Other accounts and unknown/foreign targets remain refused before history transfer or provider effects.
- Write history under login A, expire or revoke and prune A using the real cleanup path, then open/read/continue that history under still-authorized owner login B. Durable ownership survives; A's credential remains invalid. Principal retention is unchanged.
- Account equivalence remains ui-server: an owner continuing a chat from another device is refused as a safety principal mismatch #3952/ui-server: a chat whose starting owner login was pruned can never be continued #3962's verified policy: owner logins may share retained history; ambient, agent/system and foreign identities gain no new cross-principal power. Evidence is server-derived, not client/model-asserted, and current auth-mode guesses cannot reinterpret old attribution.
- Legacy resolvable evidence can be enriched safely. Already-pruned proof without durable evidence, corrupt/conflicting ownership, stale generation and retired identities refuse. Unrelated chats remain usable; existing durable diagnosis/containment behavior stays intact.
- Original attribution, history records/order, aliases, taint/review evidence, coverage/gap facts and generations are preserved. Missing/unretained/unfinished voice evidence remains honestly partial or legacy after cross-login continuation. Migration or account matching does not mark it complete or clean.
- Current live-session principal/connection/epoch and revocation checks remain effective before and after asynchronous waits. A different login cannot resume/control an active conversation or submit/close another principal's pending epoch just by sharing history ownership. Existing exact-principal deletion refuses the second login exactly as before.
- Keyless storage and live-start integration tests prove the positive continuation and negative authority cases. Provider history remains byte-identical within each session's existing prefix; ownership metadata is not injected into provider messages. Named failing-first and restored mutation receipts cover both continuation and refusal/authority boundaries.
Verification
Extend the actual SQLite/runtime fixtures in packages/ui-server/tests/dialogue-storage.test.ts, dialogue-queue-adoption.test.ts, dialogue-owner-drain.test.ts, conversation-history.test.ts, live-history-source.test.ts and the existing principal/chat-lifecycle tests as needed for the named boundaries. Use the real pruning path and an offline fake live provider for start integration; assert zero provider effects on refused access. Do not replace a runtime claim with only a predicate test.
Record the original same-owner mismatch failing first, then mutations that remove durable ownership (pruned-origin continuation fails) and incorrectly admit a foreign/revoked caller (the refusal assertion fails). Restore mutations, run the focused affected tests with the repository test script, both applicable provider-history guards and required PR checks. No API keys, real provider calls or device access are required for implementation readiness.
Contract impact
Internal operational ownership schema and authorization checks are required. No new public CLI/MCP/wire fields, principal powers or deletion semantics are selected. Preserve the published dialogue messages/pages and existing error/coverage/generation contracts; any necessary documented machine-surface change must update its integration-contract component in the same CONTRACT: commit.
Refs #3952 and #3962. The two implementation issues coordinate shared ownership/schema changes; neither this ruling nor the decision-record task declares an extra implementation dependency.
2026-11-11: recorded the maintainer's option A, finalized the storage/authorization scope and meaningful proof requirements, and resolved needs: decision. Implementation remains open.
Activity
schlessera commentedon Nov 11, 2026
2026-11-11 triage at main
3c44ac6fc56d27675dadaf38a16254db53c39f69: a real SQLite/openDialogue control confirms sameAccount=true followed by Dialogue ownership mismatch for a second authorized owner login. Zero provider calls and brain-file writes. The body now states the account-owned versus exact-login choice, consequences and constraints; the maintainer’s answer is pending. Add needs: decision and keep agent-ready absent.schlessera commentedon Nov 11, 2026
Decision (maintainer, 2026-11-11): Option A — make retained voice history account-owned too.
A currently authorized owner may continue the same chat by voice across owner logins/devices, using durable server-verified account ownership while preserving original principal attribution. Unknown/foreign identities and missing ownership proof remain refused; expired/revoked credentials are not restored. Existing exact-principal chat deletion and current live-session principal/connection/epoch authority remain unchanged.
The body now specifies account-aware history lookup/adoption, durable evidence and legacy handling, real-pruning coverage, unchanged active-session authority and provider-prefix proof. No other needs prerequisite remains: remove needs: decision and add agent-ready. This records the ruling and implementation readiness, not a delivered fix.
The durable decision record is tracked in #3985, separately from the safety-history record #3978. It does not block implementation.
schlessera commentedon Nov 17, 2026
Claimed for implementation. Claim token:
claim-c0b475b3. Branch:fix/3963-voice-account-ownership.closure-only collisions with open drafts; no path collisions on cited files
fix(ui-server): refuse voice evidence written into another login's ep…
fix(ui-server): keep live owner identity when another login adopts a …
docs: follow the session catalog citation the adoption fix moved (#3963)
CONTRACT: fix(ui-server): let another owner login continue a chat's r…
schlessera commentedon Nov 17, 2026
Merged in #4139 as
d97405216through the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.