prometeu-studio/docs/packer/pull-requests/PR-16-write-lane-command-completion-and-used-write-services.md
2026-03-24 13:42:44 +00:00

72 lines
3.3 KiB
Markdown

# PR-16 Write Lane, Command Completion, and Used Write Services
Domain Owner: `docs/packer`
Cross-Domain Impact: `docs/studio`
## Briefing
After queries are runtime-backed, the next step is the minimal command surface actually used by Studio.
This PR introduces the project write lane, synchronous command completion semantics, and the write services currently needed by Studio, without reintroducing doctor, build, or reconcile work.
## Objective
Deliver the write lane plus only the write/command surface currently exercised by the Studio `Assets` workspace on top of the runtime model.
## Dependencies
- [`./PR-14-project-runtime-core-snapshot-model-and-lifecycle.md`](./PR-14-project-runtime-core-snapshot-model-and-lifecycle.md)
- [`./PR-15-snapshot-backed-asset-query-services.md`](./PR-15-snapshot-backed-asset-query-services.md)
- [`../decisions/Concurrency, Observability, and Studio Adapter Boundary Decision.md`](../decisions/Concurrency,%20Observability,%20and%20Studio%20Adapter%20Boundary%20Decision.md)
- [`../specs/5. Diagnostics, Operations, and Studio Integration Specification.md`](../specs/5.%20Diagnostics,%20Operations,%20and%20Studio%20Integration%20Specification.md)
## Scope
- implement the project-scoped write lane
- define durable visibility after successful commit
- define request/response command semantics with optional `Future`-based completion
- implement only the write surface currently used by Studio `Assets`
- preserve causal lifecycle events for command execution
- reintroduce command/write support in `prometeu-packer-v1` without collapsing the `prometeu-packer-api` boundary
## Non-Goals
- no doctor
- no build/pack
- no background reconcile observer
## Execution Method
1. Add the runtime-backed write lane.
2. Define synchronous command response plus optional `Future` completion semantics.
3. Reintroduce only the currently used write services onto the runtime.
4. Remove command surfaces that remain out of scope for the active Studio service wave.
5. Preserve asynchronous lifecycle events as observability, not as the primary command contract.
## Acceptance Criteria
- same-project commands are serialized by the packer
- committed state becomes visible only after successful durable commit
- synchronous command APIs may expose `Future` completion directly
- the write services currently used by Studio run on the runtime-backed path
- no doctor/build/reconcile behavior is introduced by this PR
- deferred command surfaces are not kept alive in the active implementation by placeholder adapters
## Validation
- write-lane concurrency tests
- commit failure/recovery tests
- command completion tests for response plus `Future`
- write regression tests for the active Studio write surface
- negative validation proving `doctor`, `build/pack`, and reconcile command paths are not part of the active wave
## 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/models/**`
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/events/**`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/**`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/testing/**`
- `prometeu-studio/**` command integration coverage