Skip to content

fix(personas): restrict persona-file seeding to guardians and invalidate trust cache on guardian creation#24878

Merged
siddseethepalli merged 1 commit into
mainfrom
run-plan/drop-user-md/fix-r1-1
Apr 11, 2026
Merged

fix(personas): restrict persona-file seeding to guardians and invalidate trust cache on guardian creation#24878
siddseethepalli merged 1 commit into
mainfrom
run-plan/drop-user-md/fix-r1-1

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Apr 11, 2026

Summary

Two post-plan fixes from the drop-user-md review:

  1. Guardian-only seeding. upsertContactChannel previously called ensureGuardianPersonaFile on every new contact (Slack, phone, email, etc), which fired the users/ directory watcher and evicted live conversations on every inbound message from a new contact. Restrict seeding to guardian creation only.

  2. Trust-cache invalidation. The guardian-persona auto-allow rule from the permissions defaults is only backfilled during trust-store.loadFromDisk(). Runtime guardian creation paths (self-heal, first-message-seeds-guardian) did not invalidate the cache, so the rule was never backfilled for those guardians and the model had to approve its first file_edit on users/<slug>.md. Call clearTrustCache() after guardian creation.

Also rename ensureGuardianPersonaFile(slug) to ensureGuardianPersonaFile(userFile) for parameter clarity — the argument is a full filename, not a bare slug.

Fixes gaps identified during drop-user-md plan review.


Open with Devin

@siddseethepalli siddseethepalli merged commit 2a7e050 into main Apr 11, 2026
@siddseethepalli siddseethepalli deleted the run-plan/drop-user-md/fix-r1-1 branch April 11, 2026 22:24
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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