Files
clean-architecture-frontend…/tests
DongHyeonkaandClaude Opus 5.5 55721f075a fix(auth): give the demo session a stable subject so a refresh keeps the cache (R3-3)
The demo adapter now reports "demo-user" as its subject while
authenticated (null otherwise), so an authenticated notification for the
same demo user no longer fences the server-state scope. Sign-out and any
state change still fence.

The scope runtime now treats an empty-string subject like a missing one
(fail-closed), so an owner that returns "" for everyone cannot disable
fencing between users.

Pinned: state change fences, subject change fences, an external owner
without readSubject fences on every authenticated notification.

RED (before the fix, tests/unit/server-state-scope-runtime.test.ts):
  x does not fence when the demo session re-announces the same user
    expected [ { kind: 'FENCED', ... } ] to deeply equal []
  x still fences when an authenticated session names an empty subject
    expected true to be false
  Tests 2 failed | 12 passed (14)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:15:26 +09:00
..