Files
clean-architecture-frontend…/docs
DongHyeonkaandClaude Opus 5.5 a80b153163 fix(cross-context): keep broadcast receive after publish failure, report degraded open (R-2.3)
A tab whose BroadcastChannel postMessage failed once called
closeBroadcast(), which also removed its receive listener. Publishers
that broadcast successfully never write a storage pulse, so from then on
the tab missed every other tab's event while reporting
ACTIVE_STORAGE_FALLBACK. A tab whose BroadcastChannel failed to open had
the same blind spot and the same healthy-looking status.

Per D-4 there is no dual broadcast+storage publishing. Instead:
- A publish failure only sets broadcastPublishFailed. Later publishes go
  to storage, and the channel stays open for receiving.
- BROADCAST_OPEN_FAILED now yields the additive status
  DEGRADED_STORAGE_FALLBACK (the union lives in the adapter and is only
  passed through by bootstrap). A browser without BroadcastChannel at all
  keeps ACTIVE_STORAGE_FALLBACK, because every tab there uses storage.
- A successful storage publish recomputes the status instead of forcing
  ACTIVE_STORAGE_FALLBACK, so it cannot hide the degraded state.

Existing tests fixed: "falls back when BroadcastChannel open or publish
fails" and "enters explicit local-only degradation when every transport
fails" expected ACTIVE_STORAGE_FALLBACK for a tab whose channel failed to
open. The ops runbook lists the new status.

Verified: "keeps receiving broadcasts after its own broadcast publish
fails" (received [] instead of [BROADCAST]) and the open-failure status
assertion (ACTIVE_STORAGE_FALLBACK) failed before the fix and pass now.
check:architecture, check:types:app, check:types:test, lint,
test:component, verify:documentation pass. test:unit passes except
removal-fixture, which needs generated artifacts/release files that a
fresh worktree lacks.

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