Align internal guidance with pipeline preflight

This commit is contained in:
2026-11-28 04:35:07 +00:00
parent 5382058b28
commit d5056d77b6
10 changed files with 58 additions and 11 deletions

View File

@@ -59,6 +59,9 @@ perform native request preparation; explicit smoke tests can perform network or
model work and retain native supported/applicable/result distinctions. model work and retain native supported/applicable/result distinctions.
Pipeline validation is separately application-owned offline preflight, not a Pipeline validation is separately application-owned offline preflight, not a
mode added to native configuration validation. mode added to native configuration validation.
The explicit pipeline preflight command submits its readiness value through the
same [native reporting API](https://forge.maximumdirect.net/base-layer/commandkit/src/tag/v0.8.0/docs/consumers/guide.md#invocation-reporting),
including when readiness fails; process and delivery outcomes remain distinct.
Application run inputs reuse `NewResourceFlags` and `NewExecutionFlags`, selecting Application run inputs reuse `NewResourceFlags` and `NewExecutionFlags`, selecting
profile/session and execution controls while leaving prompt/source inputs profile/session and execution controls while leaving prompt/source inputs
@@ -79,7 +82,8 @@ domain artifacts, not a saved report, are the durable deliverables.
The nonempty ckprompt declarations also install optional invocation usage The nonempty ckprompt declarations also install optional invocation usage
reporting. Notarius propagates the invocation context and joins its work before reporting. Notarius propagates the invocation context and joins its work before
returning; it supplies no manual flag, accounting totals, or final usage callback. returning; it supplies no manual flag, accounting totals, or final usage callback.
Requested debug capture has its own independent native group. See Run debug capture has its own independent native group; preflight smoke usage
remains in native smoke reports instead. See
[native usage reporting][usage] and [CLI internals](../internal/cli.md#native-reporting-and-outcomes). [native usage reporting][usage] and [CLI internals](../internal/cli.md#native-reporting-and-outcomes).
Native reporting handles result/diagnostic destinations, visibility, progress, Native reporting handles result/diagnostic destinations, visibility, progress,

View File

@@ -42,6 +42,11 @@ control effective values.
## Execution, Interpretation, And Continuation ## Execution, Interpretation, And Continuation
Pipeline preflight uses native [resource inspection](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/resource_inspection.go)
and [smoke diagnostics](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/smoke_diagnostics.go)
for selected targets. Notarius owns readiness interpretation and retains native
reports separately from ordinary execution observation.
Modules build `RunRequest` with selected prompt/profile/session, owned inline Modules build `RunRequest` with selected prompt/profile/session, owned inline
artifacts and variables; they interpret `RunResult` into typed domain values. artifacts and variables; they interpret `RunResult` into typed domain values.
Notarius materializes source/references and contextual identity projections Notarius materializes source/references and contextual identity projections

View File

@@ -21,7 +21,7 @@ continue to use their caller-supplied contexts.
The constructor wires: The constructor wires:
- native help/version and installed shell completion; - native help/version and installed shell completion;
- application pipeline declarations and a native run alias; - application pipeline declarations and native run and preflight aliases;
- ckconfig whole-application and focused PromptKit scopes, sharing one loader; - ckconfig whole-application and focused PromptKit scopes, sharing one loader;
- ckprompt resource/requirements inspection, concrete request validation, - ckprompt resource/requirements inspection, concrete request validation,
prepared preview, namespace selection, and explicit smoke testing. prepared preview, namespace selection, and explicit smoke testing.
@@ -63,10 +63,11 @@ with production entries.
- validating: domain resolution plus known-resource preflight, supplying the - validating: domain resolution plus known-resource preflight, supplying the
same captured engine only when model roles require it. same captured engine only when model roles require it.
[Preflight](../../internal/preflight/preflight.go) accepts collaborators/data; [Offline dependency validation](../../internal/preflight/preflight.go) accepts
it does not load configuration, register/construct modules, read execution collaborators and data without reading execution inputs or allocating state.
inputs, render CLI reports, or allocate state. Partial profiles pass native Partial profiles pass inspection. The same package also discovers selected
inspection, with concrete request readiness deferred until preparation. initial targets and orchestrates explicit native smoke checks; the CLI owns
their input, destination, capture, and presentation boundaries.
## Run Inputs And Native Overrides ## Run Inputs And Native Overrides
@@ -93,6 +94,15 @@ Framework/model code transports it rather than deriving another session.
## Run Orchestration ## Run Orchestration
[pipeline_invocation.go](../../internal/cli/pipeline_invocation.go) shares
loading, selection, reference materialization, construction, input reading,
and session selection between run and
[preflight](../../internal/cli/pipeline_preflight.go). The latter parses through
the prepared pipeline, probes destinations, discovers targets, and hands native
observations to its readiness report without invoking the runner or cache store.
It finalizes requested capture before report delivery; assessment and capture or
delivery outcomes remain independently meaningful.
The native command declaration in [pipeline_run.go](../../internal/cli/pipeline_run.go) The native command declaration in [pipeline_run.go](../../internal/cli/pipeline_run.go)
creates a private owner for each invocation. That owner performs the ordered creates a private owner for each invocation. That owner performs the ordered
handoff and keeps capture and publication state local to that run: handoff and keeps capture and publication state local to that run:
@@ -160,7 +170,8 @@ behavior. There is no universal Notarius envelope or parallel serializer.
[schema tests](../../internal/cli/native_schema_load_test.go) cover native [schema tests](../../internal/cli/native_schema_load_test.go) cover native
composition, captured contexts, and operator contracts. composition, captured contexts, and operator contracts.
- [Pipeline command tests](../../internal/cli/pipeline_commands_test.go) cover - [Pipeline command tests](../../internal/cli/pipeline_commands_test.go) cover
listing/showing/preflight without execution inputs or state. offline listing, showing, and validation; [preflight tests](../../internal/cli/pipeline_preflight_test.go)
cover readiness reporting and the explicit online route.
- [Override tests](../../internal/cli/execution_overrides_test.go) and - [Override tests](../../internal/cli/execution_overrides_test.go) and
[run tests](../../internal/cli/pipeline_run_test.go) cover supplied values, [run tests](../../internal/cli/pipeline_run_test.go) cover supplied values,
routing, references, sessions, and run ordering. routing, references, sessions, and run ordering.

View File

@@ -29,6 +29,13 @@ operation invokes a model.
## Requests And Fixed Operation Inputs ## Requests And Fixed Operation Inputs
Explicit pipeline preflight inventories selected initial profiles and access
scopes, then invokes native smoke diagnostics using request-scoped overrides.
It interprets supported/applicable reports and affirmative facts rather than
treating a nil error as readiness. Smoke reports and usage remain separate from
ordinary execution observer totals. The [native smoke contract](https://forge.maximumdirect.net/base-layer/promptkit/src/tag/v0.25.0/smoke_diagnostics.go)
owns diagnostic mechanics.
Core owns the shared engine. A model module prepares transcript, references, contextual identity projections, and any Core owns the shared engine. A model module prepares transcript, references, contextual identity projections, and any
normalization candidate mapping once. It constructs a `promptkit.RunRequest` normalization candidate mapping once. It constructs a `promptkit.RunRequest`
with its selected prompt, profile/session, native artifact inputs, and variables. with its selected prompt, profile/session, native artifact inputs, and variables.

View File

@@ -19,6 +19,9 @@ and statically selected prompt IDs. Specs can be inspected without constructing
modules. The resolver applies model-profile selections only to model roles. modules. The resolver applies model-profile selections only to model roles.
Static initial/correction dependencies use the same constants as request builders; Static initial/correction dependencies use the same constants as request builders;
they are preflight declarations, not asset manifests or execution fingerprints. they are preflight declarations, not asset manifests or execution fingerprints.
The separate initial-prompt selection identifies independently targeted initial
requests; correction dependencies remain in the complete offline list. Validator
prompt declarations identify assessment requests.
[BuildRequest](../../internal/framework/pipeline/construction.go) supplies [BuildRequest](../../internal/framework/pipeline/construction.go) supplies
dependencies, option values, and prepared references; one-shot validators may dependencies, option values, and prepared references; one-shot validators may

View File

@@ -12,6 +12,8 @@ cmd/notarius -> internal/cli: native commands, one selected config result/engine
-> resolve + offline preflight + materialize + typed preparation -> resolve + offline preflight + materialize + typed preparation
-> pipeline: parse -> chunk -> ordered lane work -> logical files -> pipeline: parse -> chunk -> ordered lane work -> logical files
-> internal/cli: publication -> requested capture finish -> report -> internal/cli: publication -> requested capture finish -> report
-> explicit preflight: shared local preparation -> destination checks
-> native target diagnostics -> capture finish -> readiness report
``` ```
The executable supplies build identity. The composition root owns native command The executable supplies build identity. The composition root owns native command
@@ -27,7 +29,7 @@ streams or roots. Standard inspection/preflight paths do not become runs.
| Application configuration | [internal/core/config](../../internal/core/config/) | Composed ConfigKit/native settings definition, source-aware normalization, detached runtime conversion, application validation, effective domain resolution. | | Application configuration | [internal/core/config](../../internal/core/config/) | Composed ConfigKit/native settings definition, source-aware normalization, detached runtime conversion, application validation, effective domain resolution. |
| Generic source and typed contracts | [internal/core/source](../../internal/core/source/), [internal/framework/contracts](../../internal/framework/contracts/) | Documents/units/chunks, typed production/assessment, source references, codecs, native execution selections, and small cache/evidence collaborators. | | Generic source and typed contracts | [internal/core/source](../../internal/core/source/), [internal/framework/contracts](../../internal/framework/contracts/) | Documents/units/chunks, typed production/assessment, source references, codecs, native execution selections, and small cache/evidence collaborators. |
| Pipeline framework | [internal/framework/pipeline](../../internal/framework/pipeline/) | Registries, typed resolution, core-invoked preparation and execution, complete candidate assessment, ready-job workers, ordered handoffs, reuse eligibility, evidence/output assembly. | | Pipeline framework | [internal/framework/pipeline](../../internal/framework/pipeline/) | Registries, typed resolution, core-invoked preparation and execution, complete candidate assessment, ready-job workers, ordered handoffs, reuse eligibility, evidence/output assembly. |
| Offline dependency preflight | [internal/preflight](../../internal/preflight/) | Known native prompt/profile checks on already resolved composition and supplied engine; no synthetic request or execution input reads. | | Pipeline preflight | [internal/preflight](../../internal/preflight/) | Offline known-resource checks plus selected-target discovery and explicit native smoke observation interpretation. |
| Semantic reconciliation | [internal/framework/semanticreconcile](../../internal/framework/semanticreconcile/) | Prepared reconciliation operations, bounded candidate/window inputs, request-local proposal safety, typed fresh application, and evaluation-scoped details. | | Semantic reconciliation | [internal/framework/semanticreconcile](../../internal/framework/semanticreconcile/) | Prepared reconciliation operations, bounded candidate/window inputs, request-local proposal safety, typed fresh application, and evaluation-scoped details. |
| Embedded content | [assets](../../assets/) | Content-only native prompt/profile/schema/message files imported with filesystem contexts; no behavioral registry. | | Embedded content | [assets](../../assets/) | Content-only native prompt/profile/schema/message files imported with filesystem contexts; no behavioral registry. |
| Accepted-result cache | [internal/framework/artifactcache](../../internal/framework/artifactcache/) | Raw accepted artifact/plan bytes under native content keys, confined atomic publication, and deployment-owned creation permissions. | | Accepted-result cache | [internal/framework/artifactcache](../../internal/framework/artifactcache/) | Raw accepted artifact/plan bytes under native content keys, confined atomic publication, and deployment-owned creation permissions. |

View File

@@ -55,6 +55,9 @@ registries and the shared native engine. Builders receive independently owned
build requests. Exact Go type, codec, evidence-projector, registration, and build requests. Exact Go type, codec, evidence-projector, registration, and
constructor checks happen before source parsing. There is no correction transport, constructor checks happen before source parsing. There is no correction transport,
asset registry, or persistent execution identity to collect. asset registry, or persistent execution identity to collect.
`PreparedPipeline.ParseSource` shares the constructed adapter's parsing and
generic document validation with explicit preflight. The runner uses that same
operation and creates its source index once; preflight does not chunk or execute.
Pure [profile and binding copies](../../internal/framework/pipeline/profile_copy.go) Pure [profile and binding copies](../../internal/framework/pipeline/profile_copy.go)
detach supported mutable options, references, and controls without interpreting detach supported mutable options, references, and controls without interpreting
names or defaults; decoding and resolution perform their own normalization. names or defaults; decoding and resolution perform their own normalization.

View File

@@ -122,6 +122,12 @@ in [CLI Reference](../cli.md#output-streams-and-exit-statuses) and the
## Capture Lifecycle ## Capture Lifecycle
Explicit preflight uses the same allocation and terminalization lifecycle, with
temporary output/cache access probes instead of a run directory or cache store.
It records performed native smoke reports separately from execution observations;
capture failure stops remaining diagnostics and is independent of assessment
and report delivery. See [preflight operation](../operations.md#preflight-lifecycle).
[Debug selection](../../internal/cli/run_debug.go) preserves native boolean and [Debug selection](../../internal/cli/run_debug.go) preserves native boolean and
supplied directory semantics independently of verbosity. The run path alone supplied directory semantics independently of verbosity. The run path alone
calls [debug.Start](../../internal/framework/debug/recorder.go). calls [debug.Start](../../internal/framework/debug/recorder.go).

View File

@@ -285,11 +285,14 @@ native supplied-value semantics. CommandKit, ckconfig, and ckprompt own standard
commands, parsing, presentation, and delivery outcomes. Notarius supplies domain commands, parsing, presentation, and delivery outcomes. Notarius supplies domain
commands and report content, not a universal result envelope. commands and report content, not a universal result envelope.
Offline preflight shares domain resolution and checks statically known module, Offline pipeline validation shares domain resolution and checks statically known module,
reference, initial/correction/validator prompt, and applicable profile dependencies reference, initial/correction/validator prompt, and applicable profile dependencies
before execution. It requires no transcript, reference bytes, credentials, before execution. It requires no transcript, reference bytes, credentials,
provider call, or run storage. Dynamic selections remain runtime checks. provider call, or run storage. Dynamic selections remain runtime checks.
Shared loaders allocate no run storage; capture belongs to the run path. Shared loaders allocate no run storage. Explicit online pipeline preflight may
read selected inputs and references, probe invocation destinations, allocate
requested capture, and run native diagnostics. The pipeline application owns
readiness interpretation; ordinary run does not implicitly perform those probes.
## Trust Boundaries And Threat Scope ## Trust Boundaries And Threat Scope
@@ -353,7 +356,8 @@ execution claims on cache hits.
Debug is never a cache input. Capture requires explicit enablement and a nonempty Debug is never a cache input. Capture requires explicit enablement and a nonempty
effective destination; directory configuration alone does not enable it. Requested effective destination; directory configuration alone does not enable it. Requested
capture is required work: allocate before engine construction/preflight, record capture is required work for run and explicit preflight: allocate before engine
construction and pipeline resolution, record
incrementally, and finalize once before successful reporting. Capture failures incrementally, and finalize once before successful reporting. Capture failures
fail the invocation while retaining available evidence and primary causes. fail the invocation while retaining available evidence and primary causes.
Update the relative `latest` link at session start, never completion. Update the relative `latest` link at session start, never completion.

View File

@@ -477,6 +477,8 @@ needed to verify documentation. Four focused public docs fit one prompt.
## Stage 10: Align Internal Documentation And Architecture Boundaries ## Stage 10: Align Internal Documentation And Architecture Boundaries
**Status:** Complete.
**Goal:** Document the implemented shared preparation/native smoke boundaries in **Goal:** Document the implemented shared preparation/native smoke boundaries in
their existing canonical homes, with narrow architecture wording changes. their existing canonical homes, with narrow architecture wording changes.