Repository navigation
fix(persona): resume from canonical citizens/personas dir — persistence restored (Asha lives) - #1718
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A persona's home is written to
<root>/citizens/personas/<name>/(the Slice-4#142 layout:
identity.key+seed.json+engrams.sqlite), butResumeOrMintProviderscanned<root>/personas/— the pre-Slice-4 literal, apath that no longer exists. So every boot found
resumed_count=0and minted astranger instead of resuming the persona whose memory was sitting on disk.
Observed live this session: brought up Asha (her
identity.key+engrams.sqlitepersisted atcitizens/personas/Asha/), restarted the core — andit 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
context::citizens_kind_dir(root, kind)→<root>/citizens/<kind_slug>/,the single source of truth for the parent that
citizen_home_pathwrites homesunder. Read path and write path now derive from one helper — they can't
drift apart again.
ResumeOrMintProvider::newscanscitizens_kind_dir(root, Persona)instead ofthe legacy
join("personas").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
state replication (sync across the tailnet's airc daemons).
6 resume tests + 5
citizen_pathtests green; binary compiles.🤖 Generated with Claude Code