6.3 KiB
| id | ticket | title | status | created | accepted | agenda | plans | tags | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEC-0020 | studio-play-stop-cartridge-flow | Decision for Play/Stop build and pack preparation through build-owned artifacts | accepted | 2026-04-06 | 2026-04-06 | AGD-0023 |
|
|
Decision
Domain owner: studio.
Referenced subdomains: compiler, packer, runtime.
The Studio Play flow for this wave SHALL be implemented as an orchestration over existing domain operations, not as a separate shipping pipeline.
The decision is:
PlayMUST callbuildfirst.packMUST run only afterbuildcompletes successfully.PlayMUST treatbuild/as the runnable artifact root for this wave.PlayMUST NOT materialize or depend on a separatecartridge/directory in this wave.manifest.jsonMUST be generated deterministically intobuild/from the current build result and project-owned metadata.PlayMUST only need to evaluate whether each required operation succeeded or failed.- Detailed operation logs MUST remain available alongside the operation results consumed by
Play. - The Studio shipper service MUST own preparation orchestration and preparation-log aggregation for this wave.
- Preparation logs MUST preserve at least the distinct channels
build,pack-validation, andpack. - Drift/freshness reuse logic is explicitly out of scope for this wave.
- A future drift/freshness wave MUST use domain-specific
.studio/files rather than the main session-restoration snapshot.
Rationale
This decision intentionally keeps the first executable Play wave narrow.
The repository already shows:
- compiler ownership of
build/program.pbx, - packer ownership of
build/assets.paand companion build artifacts, - and no accepted requirement that a separate
cartridge/assembly step must exist before runtime execution.
Creating a new shipper/materialization layer now would add an extra boundary before the base Play integration exists.
Likewise, pushing drift/freshness inference into Play would make the shell the owner of compiler and packer validity rules, which is the wrong boundary.
This decision therefore chooses the smallest correct operational split:
Playorchestrates,shipperowns preparation orchestration and preparation-log aggregation,buildproduces compiler artifacts,packproduces packer artifacts,manifestis generated after successful preparation,- and runtime execution in the next wave may consume
build/directly.
Technical Specification
1. Orchestration Order
The Play preparation path MUST execute in this order:
buildpack(only ifbuildsucceeded)manifestgeneration inbuild/- handoff to the runtime-execution flow covered by a separate agenda/decision wave
Play MUST stop immediately on the first failed required step.
No cancellation of the preparation phase is defined in this wave.
2. Artifact Root
For this wave, build/ is the canonical runnable artifact root.
At minimum, the prepared runtime-facing output in build/ SHALL include:
program.pbxassets.pamanifest.json
Packer companion artifacts may remain in build/ as domain-owned outputs.
They do not redefine the minimum contract required by Play.
3. Result Contract
The result contract consumed by Play for this wave MUST be binary at the control-flow level:
successfailed
Play MUST NOT need to interpret finer-grained reuse or freshness states in this wave.
Operational logs from build, pack, and manifest generation MUST remain available so the shell can surface useful diagnostics without owning domain-specific decision logic.
For this wave, those preparation logs are owned and aggregated by the Studio shipper service.
4. Manifest Generation
manifest.json MUST NOT be copied opportunistically from an older location.
Instead, it MUST be generated on every successful preparation run:
- in
build/, - from the current build result,
- and from project-owned metadata required by the runtime-facing manifest contract.
5. Drift and Freshness Deferral
This decision does not authorize a freshness-based skip path yet.
Rules:
PlayMUST NOT infer artifact validity from file presence alone.- This wave MAY always execute
buildandpackwhenPlayis pressed. - If a later wave introduces drift/freshness control, that logic MUST be discussed separately before implementation.
- That later wave MUST keep operational metadata in dedicated domain files under
.studio/, with the agreed initial direction beingasset-workspace.jsonandeditor-workspace.json. - That later wave MUST NOT mix such metadata into
.studio/state.jsonby convenience.
6. Boundary With Existing Workspaces
The current ShipperWorkspace scratch implementation does not become the normative backend for Play by inertia.
This decision does not require:
- a new shipping module,
- a separate cartridge-materialization directory,
- or Play-owned drift heuristics.
Existing workspaces may remain useful as manual or diagnostic surfaces, but they MUST NOT redefine the Play preparation contract established here.
7. Preparation Logging Boundary
For this wave, preparation logging MUST follow these rules:
- build and pack remain owners of their own log production;
- the Studio shipper service aggregates preparation output for user-facing consumption;
- the aggregated preparation stream MUST preserve distinct source channels for
build,pack-validation, andpack; - downstream debugger/execution surfaces consume that aggregated preparation output rather than redefining preparation ownership.
Constraints
- This decision covers preparation only, not runtime process ownership or
Stopbehavior. - This decision does not yet define the exact manifest field mapping beyond deterministic generation from current build inputs and project metadata.
- This decision does not yet define a drift fingerprint model.
- Any later attempt to skip
buildorpackbased on freshness requires a new discussion wave or explicit revision of this decision. - Any later reintroduction of
cartridge/as a mandatory runtime root requires a new decision or explicit revision of this one.
Revision Log
- 2026-04-06: Initial draft from AGD-0023.