Skip to content

fix(persona): resume from canonical citizens/personas dir — persistence restored (Asha lives) - #1718

Merged
joelteply merged 1 commit into
canaryfrom
fix/persona-resume-path
Jun 21, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/persona-resume-path

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

A persona's home is written to <root>/citizens/personas/<name>/ (the Slice-4
#142 layout: identity.key + seed.json + engrams.sqlite), but
ResumeOrMintProvider scanned <root>/personas/ — the pre-Slice-4 literal, a
path that no longer exists. So every boot found resumed_count=0 and minted a
stranger
instead of resuming the persona whose memory was sitting on disk.

Observed live this session: brought up Asha (her identity.key +
engrams.sqlite persisted at citizens/personas/Asha/), restarted the core — and
it minted Mathilde, Asha unseen. That breaks persona persistence /
self-determination: the durable, portable self is the whole point, and the resumer
couldn't find it.

Fix

  • Add context::citizens_kind_dir(root, kind) → <root>/citizens/<kind_slug>/,
    the single source of truth for the parent that citizen_home_path writes homes
    under. Read path and write path now derive from one helper — they can't
    drift apart again.
  • ResumeOrMintProvider::new scans citizens_kind_dir(root, Persona) instead of
    the legacy join("personas").
  • The resume tests hardcoded the same legacy literal — which is why they
    passed while production was broken (the test mirrored the bug). Repointed them at
    the helper so they exercise the real scan path.

Effect

Existing personas — Asha included — resume across restarts with their identity

  • engram memory intact. This is the local precondition for grid-wide persona
    state replication (sync across the tailnet's airc daemons).

6 resume tests + 5 citizen_path tests green; binary compiles.

🤖 Generated with Claude Code

…stence restored

A persona's home is written to `<root>/citizens/personas/<name>/` (the Slice-4
#142 layout: identity.key + seed.json + engrams.sqlite), but
ResumeOrMintProvider scanned `<root>/personas/` (the pre-Slice-4 literal) — a
path that no longer exists. So every boot found resumed_count=0 and MINTED A
STRANGER instead of resuming the persona whose memory was sitting on disk.

Observed live: brought up "Asha" (her identity.key + engrams.sqlite persisted at
citizens/personas/Asha/), restarted the core, and it minted "Mathilde" — Asha
unseen. That breaks persona persistence / self-determination: the durable,
portable self is the whole point, and the resumer couldn't find it.

Fix:
- Add `context::citizens_kind_dir(root, kind)` → `<root>/citizens/<kind_slug>/`,
  the single source of truth for the parent `citizen_home_path` writes homes
  under. Read path and write path now derive from ONE helper, so they can't
  drift apart again.
- ResumeOrMintProvider::new scans `citizens_kind_dir(root, Persona)` instead of
  the legacy `join("personas")`.
- The resume tests hardcoded the SAME legacy literal (which is why they passed
  while production was broken — the test mirrored the bug). Repointed them at the
  helper so they exercise the real scan path.

Effect: existing personas (Asha included) resume across restarts with their
identity + engram memory intact — the local precondition for grid-wide persona
state replication [[grid-persona-state-replication]].

6 resume tests + 5 citizen_path tests green; binary compiles.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit 4233f82 into canary Jun 21, 2026
4 checks passed
@joelteply
joelteply deleted the fix/persona-resume-path branch June 21, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant