plans/prompts/wave_2/pr_a5_multi_producer_channels.md
Implement PR A5 of plans/cleanup-state-machines.md ("A5 — Multi-producer channels with explicit non-machine owners"). The plan wins over this prompt. Prereq: A4 landed (facade pattern, applyUrl/token coupling resolved, app-exit template from A3). Remove retired atoms' allowlist entries; update the plan's A5 status.
Appendix recipes: "app_run/preview_iframe: previewError channel", "app_run: console trio", "app_run/chat_stream: package-manager warning unit", "clearPreviewRuntimeForAppAtom (retire last)". The verified corrections in these recipes are load-bearing — especially the SIX preview-error writer sites (four in PreviewIframe.tsx, including dyad-app-sourced cloud-sandbox errors) and the release-age-over- pnpm-migration priority direction.
Scope, three units plus the finalizer:
Cross-cutting: stores expose source interfaces a later remote/main producer can feed (plan: "not described as authoritative shared lifecycle"); facade methods tagged with intent classes; multi-consumer registries.
Verify: typecheck, full unit tests, lint. Suites per recipes: preview_iframe/commands.test.ts, useRunApp.test.tsx (error/console/ warning ranges), PackageManagerWarningBanner.test.tsx (ported priority test), previewRuntimeAtoms.test.ts (deleted; buffer/tail cases become store unit tests), harness seeds via controller events; e2e-tests/package_manager.spec.ts must pass UNCHANGED. /deep-review — this is a heavy PR. Branch cleanup-a5-multi-producer; /pr-push.