4.0 KiB
Asset Bank Composition Persistence and Snapshot Propagation Agenda
Status: Open
Domain Owner: docs/studio
Cross-Domain Impact: docs/packer
Problem
When the developer clicks apply, the selected files for bank composition must be persisted and reflected back into runtime state.
That write path spans Studio and packer concerns:
- staged selected files must be serialized into
asset.json; - the older
inputsByRoleshape should give way to the newerartifactsshape; - the minimal runtime snapshot must reflect the persisted result after apply.
Context
The earlier agendas in this sequence assume apply may remain disabled or stubbed until persistence is ready.
This agenda isolates the write-path discussion so the rest of the UI can progress first.
The current direction is already mostly known:
- persistence should happen through packer, not by having Studio write manifest files directly;
- selected composition should be stored in
asset.json; - runtime state should be refreshed after persistence so
Asset Detailsstays coherent.
Options
- Let Studio write
asset.jsondirectly. - Route
applythrough packer services and let packer own manifest persistence plus snapshot refresh. - Persist only to runtime state first and defer manifest persistence.
Tradeoffs
- Direct manifest writes from Studio would bypass packer ownership and create duplicate write rules.
- A packer-owned write path is cleaner and aligns with existing asset mutation flows.
- Runtime-only persistence would create an unstable editing model and almost certainly drift from disk state.
Recommendation
Route apply through packer and persist selected files into asset.json using the newer artifacts representation.
Baseline expectations:
applysubmits the selected ordered files to packer;- packer updates
asset.json; - packer propagates the resulting minimal state back into the runtime snapshot;
- Studio refreshes the section from the updated details/snapshot state instead of trusting stale draft data.
Persistence Baseline
The first-wave persistence direction is:
artifactsreplaces the olderinputsByRolerepresentation inasset.json;- the bank-composition selection should therefore persist through
artifacts, not through a parallel legacy shape; - selected file order should remain explicit in persisted data rather than relying on array position alone.
Apply Refresh and Failure Baseline
After apply, the Studio should not trust stale draft state.
The first-wave refresh baseline is:
- packer persists the selected ordered files into
asset.json; - packer refreshes the minimal runtime snapshot state needed by
Asset Details; - the Studio rebinds the section from the refreshed persisted state and returns the section to consistent read-only mode.
The minimum refreshed state should include:
- persisted
selectedrows; - the current
availableprojection for details; - recalculated capacity state;
- recalculated blockers or eligibility state relevant to the section.
If apply fails:
- the draft must not be discarded;
- the section must remain in editing mode;
- the middleware/controller should publish
BankCompositionApplyFailed; - the UI should show a local error or hint surface;
- the user should still be able to retry, reset, or cancel.
Open Questions
No open questions remain in this agenda wave.
Resolved In This Agenda Wave
The following points are now closed:
artifactsshould replace the olderinputsByRoleshape rather than coexist with it for bank-composition persistence.- After
apply, packer should refresh the minimal snapshot state required byAsset Detailsand Studio should rebind from that refreshed persisted state. - If
applyfails, the draft remains intact, the section stays in editing mode, and the UI surfaces a local failure state while preserving retry, reset, and cancel.
Next Suggested Step
Turn this into a cross-domain decision or a paired docs/studio + docs/packer decision set that closes the apply write path.