added packer PRs
This commit is contained in:
@@ -66,6 +66,24 @@ Operations must distinguish:
|
||||
|
||||
This distinction is part of the service semantics and must be visible to the UI.
|
||||
|
||||
## Concurrency Model
|
||||
|
||||
The packer concurrency model is conservative and project-scoped.
|
||||
|
||||
Rules:
|
||||
|
||||
- observable correctness takes priority over speculative parallelism;
|
||||
- operations are coordinated per project workspace, not globally across unrelated projects;
|
||||
- Studio is a consumer of packer coordination results, not the owner of packer concurrency policy.
|
||||
|
||||
### Baseline Operation Matrix
|
||||
|
||||
- read/read may run concurrently when each read observes a coherent snapshot;
|
||||
- read/write must not expose torn intermediate state to consumers;
|
||||
- write/write on the same project is serialized;
|
||||
- build/write on the same project is serialized unless a future spec introduces an explicit transactional coordination model;
|
||||
- background observation may continue while a serialized write lane is active, but it must not publish misleading post-state before commit visibility.
|
||||
|
||||
## Preview/Apply Model
|
||||
|
||||
Sensitive mutations use staged intent.
|
||||
@@ -126,6 +144,40 @@ Rules:
|
||||
- background observation and reporting may be continuous;
|
||||
- conflicting sensitive mutations must not race arbitrarily;
|
||||
- observable mutation behavior remains coherent from the UI perspective.
|
||||
- the baseline write policy is a single-writer semantic lane per project;
|
||||
- preview generation may run outside the final commit section, but apply/commit remains serialized;
|
||||
- build and sensitive mutation apply must not interleave on the same project in a way that obscures final state;
|
||||
- cancellation or failure must leave the observable project state in a coherent post-operation condition.
|
||||
|
||||
### Event Envelope
|
||||
|
||||
Packer events must be structured enough for adapters to preserve causality and user-facing meaning.
|
||||
|
||||
At minimum, each event must carry fields equivalent to:
|
||||
|
||||
- `project_id` or workspace identity
|
||||
- `operation_id`
|
||||
- `sequence`
|
||||
- `kind`
|
||||
- `timestamp`
|
||||
- `summary`
|
||||
- `progress` when applicable
|
||||
- `affected_assets` when applicable
|
||||
|
||||
Rules:
|
||||
|
||||
- `operation_id` is stable for the full lifecycle of one logical operation;
|
||||
- `sequence` is monotonic within one operation;
|
||||
- adapters may remap event shapes for UI consumption, but must not invent causal relationships not present in packer events.
|
||||
|
||||
### Event Ordering and Coalescing
|
||||
|
||||
Rules:
|
||||
|
||||
- events emitted for one operation must be observable in causal order;
|
||||
- repeated progress updates may be coalesced by adapters or sinks;
|
||||
- lifecycle boundaries such as preview-ready, apply-success, apply-failure, build-started, and build-finished must remain individually observable;
|
||||
- low-value repeated observation events must not drown out actionable failures or terminal state.
|
||||
|
||||
## Incremental and Watch Integration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user