Share immutable prepared execution metadata
This commit is contained in:
@@ -142,11 +142,10 @@ one execution-precedence and error-ordering implementation while allowing a
|
||||
full backend pool to reject work before expensive schema, artifact, and
|
||||
rendering operations. `Prepare` discards the plan after returning its public
|
||||
metadata. `Run` retains the plan through initial and repaired-output validation
|
||||
and discards it when the operation ends. Prepared execution transfers the
|
||||
completed preparation's owned message, input-hash, and copied-schema values
|
||||
into its private payload, while deep-copying mutable provider extras and
|
||||
creating an independent details snapshot. Claim completion or discard clears
|
||||
the execution payload without removing the details snapshot.
|
||||
and discards it when the operation ends. Prepared execution retains one
|
||||
immutable, redacted metadata snapshot shared by execution and internal details.
|
||||
The facade detaches mutable public details. Claim completion or discard clears
|
||||
execution-only payload references without modifying the retained metadata.
|
||||
|
||||
The root facade's `Engine.ValidateRequest` uses the same complete preparation
|
||||
path as `Prepare` and discards the resulting internal prepared value without
|
||||
@@ -176,7 +175,7 @@ encoding of that session, every role and content value, and cache-control
|
||||
presence and values; its hexadecimal value is opaque.
|
||||
|
||||
The configuration snapshot is read-only after engine construction. Concurrent
|
||||
`Prepare` and `Run` calls copy their resolved targets and keep all invocation
|
||||
`Prepare` and `Run` calls use detached captured targets and keep invocation
|
||||
state local.
|
||||
|
||||
## Run Flow
|
||||
|
||||
@@ -352,6 +352,13 @@ selection, and mutation-isolation tests. Retain typed/numeric runtime cases.
|
||||
|
||||
## Stage 13: Share One Immutable Prepared Metadata Snapshot
|
||||
|
||||
**Completed:** Prepared execution and internal details share one immutable,
|
||||
redacted snapshot; cleanup clears only execution payload references and the
|
||||
facade retains the outward copy. Obsolete copy-failure tests and the remaining
|
||||
retired direct-validation mock were removed. Go 1.27.3 `go test -race
|
||||
./internal/usecase . -run 'Prepared|Repair|SchemaFilePreparationDetachesLargeAnnotation'`
|
||||
passed, including lifecycle, details, schema, and repair cases.
|
||||
|
||||
**Findings:** 5–6. **Files:** `internal/usecase/prepared_execution.go`,
|
||||
`prepared_execution.go`, `convert.go`, lifecycle/ownership tests.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user