4.0 KiB
4.0 KiB
PR-13 Embedded Bootstrap, Container-Owned Event Bus, and Packer Composition Root
Domain Owner: docs/packer
Cross-Domain Impact: docs/studio
Briefing
After the cleanup baseline, the next step is to make embedded Studio bootstrap explicit and introduce one composition root for the packer.
This is where the Studio Container becomes a contract plus global holder, while the concrete embedded boot and prometeu-packer-v1 wiring move into the application layer.
Objective
Deliver the embedded bootstrap contract, explicit PackerEventSink wiring, and an explicit prometeu-packer-api to prometeu-packer-v1 composition root for Studio embedding.
Dependencies
./PR-12-cleanup-and-unused-surface-removal-before-runtime-service-wave.md../specs/5. Diagnostics, Operations, and Studio Integration Specification.md- cross-domain reference:
../../studio/specs/2. Studio UI Foundations Specification.md
Scope
- define the embedded packer bootstrap contract
- define the packer composition root for the active service wave inside the application layer
- keep
prometeu-studiobound only toprometeu-packer-api - wire the Studio
Containercontract/holder as the owner of the shared typed event bus reference used by the host-sidePackerEventSinkbridge - ensure application boot installs a
Containerimplementation before packer-backed use begins - make the active embedded runtime entrypoint explicit enough that future capabilities do not depend on hidden constructors or side boot paths
Non-Goals
- no runtime snapshot yet
- no read migration yet
- no write lane yet
- no alternate bootstrap retained for inactive
doctor,build/pack, or reconcile paths
Execution Method
- Define the explicit packer bootstrap/composition entrypoint.
- Make the host-provided
PackerEventSinkan explicit dependency for Studio embedding. - Refactor Studio
Containerinto a contract plus installed global holder. - Move concrete packer wiring to the application layer that chooses
prometeu-packer-v1. - Remove remaining ambiguity around packer-local versus container-owned event visibility by bridging
PackerEventSinkinto the host bus at the application layer. - Remove remaining embedded bootstrap variants that only exist to keep inactive service surfaces alive.
Acceptance Criteria
- the active packer wave has one explicit composition root
prometeu-studiodepends only onprometeu-packer-api- the application layer installs the
Containerimplementation and choosesprometeu-packer-v1 - Studio
Containerowns the shared typed event bus reference through its installed implementation - the packer composition root receives an explicit
PackerEventSinkrather than reaching directly into host event bus types - packer-backed work starts only after
Container.install(...) - packer publication uses
PackerEventSink, and the application layer bridges that sink into the container-owned path when embedded in Studio - no public
PackerEventSink.noop()-style default is treated as acceptable production bootstrap behavior - hidden bootstrap paths that only support inactive service surfaces are removed
Validation
- bootstrap tests for the packer composition root
- Studio boot tests for
Container.install(...) - integration tests for packer event visibility through the host bridge into the container-owned path
Affected Artifacts
prometeu-packer/prometeu-packer-api/src/main/java/p/packer/**prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/**prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/events/**prometeu-studio/src/main/java/p/studio/Container.javaprometeu-studio/src/main/java/p/studio/events/**prometeu-app/src/main/java/p/studio/App.javaprometeu-app/src/main/java/p/studio/AppContainer.java