Skip to content

feat: unify Oven event bus architecture#18

Closed
alowpoly wants to merge 1 commit into
mainfrom
codex/event-bus-architecture
Closed

feat: unify Oven event bus architecture#18
alowpoly wants to merge 1 commit into
mainfrom
codex/event-bus-architecture

Conversation

@alowpoly

Copy link
Copy Markdown
Contributor

What

  • Publish post-commit observational events for canonical Oven data, bindings, definitions, lifecycle moves, and burns. Event identities include durable generations so an X -> Y -> X transition remains observable while retries stay idempotent.
  • Replace the old stream ceiling and fragile tail counter with paginated internal discovery, committed tails, bounded retention, and explicit replay reset semantics. Live invalidation and subscriber catch-up now use independent watermarks.
  • Route every JSON Oven, including Differential Testing, through one process-wide snapshot store, projection coordinator, and bounded response-admission path.
  • Route every live browser Oven through one bounded snapshot client and OvenRuntime, using events only to invalidate before a conditional canonical refetch. A 30-second reconciliation fallback remains.
  • Remove handler warming, page-owned polling, the legacy /ovens/<id>/view route, and private response caches. Streaming Diff content SSE and the Differential Testing worker inbox remain intentional separate transports.

Why

The previous partial bus could miss return-to-identical-content publications, mismatch scenario subscriptions with Oven-scoped data events, stop observing after 64 streams, baseline past an uncommitted event, let stale replay delay live invalidation, and bypass shared memory admission in Differential Testing. Several canonical writers also emitted no event, leaving the fallback timer to hide producer gaps.

This change makes canonical state the only data authority and gives the event bus one job: prompt a bounded conditional reread.

Validation

  • npm run build:dashboard
    • index-CmGKifu2.js — 431,165 bytes, SHA-256 66fa7d5057caca71776e662656fea4420ceaaacee2db1afddb27713dbd5a6f34
    • index-BaZeu40K.css — 96,184 bytes, SHA-256 8ca440bac2469cb7bfc7e886bd42a34cf25e9ceac76a902ceaad90869bc2e7dc
  • npm run verify — passed
  • npm run verify:package — 139 files, 1,538,980 bytes unpacked
  • git diff --check — passed
  • Architecture source audit — 299 production files; one snapshot store, observer, coordinator, and browser invalidation EventSource owner; all live pages and canonical writers covered; no retired warm/poll/legacy route matches
  • Reproducible architecture measurement:
    • idle: legacy 2 requests/reads/parses and 131,172 bytes; canonical 0
    • three-event burst: legacy 3 refreshes; canonical 1
    • unchanged canonical reread: HTTP 304 with zero body/read/parse work
    • three SSE clients over two ticks: 2 shared live scans plus 2 bounded catch-up scans, versus 6 legacy scans
    • maximum 4 MiB response: concurrent request rejected with 503; abort released admission; retry returned 200
  • Exact-build Playwright fixture:
    • ordinary Oven idle for 46.163 seconds and Visual Parity idle for 32.314 seconds with one initial snapshot and no 2-second polling
    • durable publication triggered one conditional 200; unchanged publication produced a zero-byte 304
    • simulated publication failure recovered through canonical fallback
    • forced SSE disconnect recovered the next durable publication after reconnect
    • event payload bytes never became rendered state

The Oven Catalogue, Storybook, layout-library, and Performance Tracing adapter work in the shared checkout are intentionally excluded from this PR.

@alowpoly

Copy link
Copy Markdown
Contributor Author

Superseded by #19 on the unprefixed event-bus-architecture branch.

@alowpoly alowpoly closed this Jul 22, 2026
@alowpoly
alowpoly deleted the codex/event-bus-architecture branch July 22, 2026 18:54
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