Skip to content

agentdid: add encrypted custody, purpose-bound signing and v1 identity documents - #2090

Open
santoshkumarradha wants to merge 9 commits into
app/v3from
feat/agent-identity-v1
Open

santoshkumarradha wants to merge 9 commits into
app/v3from
feat/agent-identity-v1

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Closes #2084.

New conversations retain Ed25519 signing and independent X25519 encryption keys in a v1 identity document. Private keys are encrypted under the profile cell key; custody uses URL-safe encoding. Purpose-bound signatures verify using only the public DID, and sealed messages require the recipient's companion key. Commands and agents.list still expose only the public DID.

Public-only identities migrate on their next metadata write without changing the DID. Their discarded signing key remains explicitly unavailable, while they gain encryption custody. Unknown document versions survive metadata writes byte-for-byte. Copies and branches mint fresh identities.

User-flow QA caught and fixed metadata writes when restoring unchanged approval/effort dials, and unintended sync eligibility when custody creates a fresh profile. Restoring saved dials applies them without rewriting the folder. Custody follows the vault's existing first-use solo policy and preserves the policy of existing profiles. Shared-chat fixtures now explicitly establish their paired profile; simulated pairing ends solo mode as the production pairing path does.

Targets app/v3, where prerequisite #2027 merged; that implementation is absent from dev. Rotation and custody rewrapping after profile-cell-key rotation remain outside this change.

Validation of the implementation at 697d5a17a (application code unchanged by the subsequent CI cleanup):

  • Passed: actual binary E2E. Drives the built app through its desktop stdin/stdout protocol with a scripted model and real bash execution. Checks public-only command environment and listing, durable signing custody, restart, byte-identical legacy open, migration after sending, future-document preservation after rename, and first-use privacy.
  • Passed: sync and privacy regressions. Six affected sync/held-chat flows, solo-to-paired transition, client-ID restart, unpaired app send, and the real CLI's quiet default across six build stamps.
  • Passed: custody race checks, locally and in Linux CI. Tests include purpose separation, tampering, malformed envelopes, wrong recipients/profiles, paired-profile relocation, copied-folder isolation, and future versions.
  • Passed locally: final clean build, vet, manual gates, carried help, belt pages, and schema checks. The app schema exposes no private identity fields. Repository dependency files are unchanged.
  • Broad repository checks are not green. The previous full package run exposed the regressions fixed above and existing failures. The 250 changelog findings match the untouched base exactly; Linux base probes independently reproduce prompt/tool budgets, tool registration, complexity, viewer/relay behavior, missing Git author setup, and flaky take-back failures. One takeover assertion failed once in the full candidate suite, then passed 100 isolated attempts on both candidate and base; it is not claimed fixed. The broad repository rerun had not completed before the CI cleanup triggered a fresh run.
  • Passed: sealed-history portability 20 consecutive times on the final commit, including sealed task history and the no-absolute-path law.

Final-commit binary QA, race checks, repository rerun, and independent base probes.

CI follow-up: removed the one-off Compare existing failures on the untouched base job from PR acceptance. That diagnostic ran only the base revision and reported its known failures as a failed PR check. Its historical logs remain linked above as evidence. The built-binary user-flow tests, sync/privacy regressions, race checks, repeated sealed-history tests, and broad repository gates remain enabled and unchanged. No candidate tests are skipped or marked as allowed failures. Fresh checks are running after this workflow-only change.

@santoshkumarradha
santoshkumarradha marked this pull request as ready for review October 31, 2026 06:36
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