prometeu-studio/docs/studio/pull-requests/PR-10e-bank-composition-workspacebus-events-and-local-orchestration.md
2026-03-24 13:42:49 +00:00

71 lines
2.6 KiB
Markdown

# PR-10e Bank Composition WorkspaceBus Events and Local Orchestration
Domain owner: `docs/studio`
## Briefing
Connect the `Bank Composition` section-scoped coordinator to the Studio workspace event model using the minimal notification-oriented contract already decided.
This slice keeps user actions local while making draft, capacity, and apply lifecycle visible to the rest of the workspace when needed.
## Objective
After this PR:
- the section keeps user commands local to the section-scoped coordinator;
- the minimal `workspaceBus` notifications exist for bank-composition state changes;
- external observers can react to draft, capacity, and apply lifecycle without owning section-local commands.
## Dependencies
- [`../decisions/Bank Composition WorkspaceBus Interaction Decision.md`](../decisions/Bank%20Composition%20WorkspaceBus%20Interaction%20Decision.md)
- [`./PR-10d-bank-composition-family-policies-and-section-coordinator.md`](./PR-10d-bank-composition-family-policies-and-section-coordinator.md)
## Scope
- add the first public bank-composition events:
- `BankCompositionDraftChanged`
- `BankCompositionCapacityChanged`
- `BankCompositionApplyRequested`
- `BankCompositionApplied`
- `BankCompositionApplyFailed`
- keep section-local actions local to the coordinator
- publish capacity notifications with:
- `progress`
- `severity`
- `blocked`
- wire section subscribers/publishers as needed inside `Asset Details`
## Non-Goals
- no conversion of all section actions into public bus commands
- no cross-workspace event taxonomy expansion beyond the minimal first-wave set
- no packer write-path implementation in this slice
## Execution Method
1. Add the event classes and payloads.
2. Publish draft and capacity notifications from the coordinator.
3. Publish apply-requested/applied/apply-failed lifecycle notifications at the right boundaries.
4. Keep move/reorder/edit/reset/cancel orchestration local.
5. Add tests for event publication and subscription behavior.
## Acceptance Criteria
- the minimal first-wave bank-composition events exist on `workspaceBus`
- user actions such as move and reorder are not exposed as public bus commands
- capacity events publish absolute `0..1` progress plus severity and blocked state
- apply lifecycle notifications are observable outside the section
## Validation
- unit tests for event publication
- unit tests for event payload correctness
- unit tests confirming section-local actions remain local
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/events/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- tests for bank-composition event flow