Plan pipeline preflight implementation

This commit is contained in:
2026-11-28 04:00:34 +00:00
parent 714d4456d9
commit 8c09077def
2 changed files with 543 additions and 90 deletions

View File

@@ -1,13 +1,12 @@
# Pipeline Preflight Implementation Roadmap
# Pipeline Preflight Feature Roadmap
## Purpose And Status
**Status:** Accepted design; implementation not started.
This roadmap is the planning authority for pipeline-aware preflight. It
consolidates all five accepted discussion items, including Item 5's verification,
staged implementation, and documentation handoff, and replaces the retired
discussion document. There are no remaining open product decisions.
This roadmap defines the target behavior and accepted product decisions for
pipeline-aware preflight. There are no remaining open product decisions.
[Implementation Plan](implementation.md) owns sequencing and implementation tasks.
[Narratio's original feature request](narratio-feature-request.md) remains context.
The accepted design here governs implementation where it refines that request,
@@ -16,8 +15,7 @@ Current behavior remains documented in [CLI Reference](../cli.md),
[CLI Internals](../internal/cli.md), and [Operations](../operations.md); this
roadmap does not claim that the new command is implemented.
Implement the three stages below in order, with focused tests accompanying each
stage. Private helper types, observer wiring, debug filenames, and exact check
Private helper types, observer wiring, debug filenames, and exact check
identifiers remain implementation choices within the accepted contracts.
## Accepted Direction
@@ -201,12 +199,11 @@ serialize the same report value. Quiet mode and diagnostic routing remain native
Do not introduce a schema-version envelope, saved receipt, mandatory sidecar, or
report-storage option. Consumers can save stdout when they need a record.
## 5. Verification And Roadmap Handoff
## 5. Verification And Documentation Requirements
**Decision:** Item 5 accepted: verify Notarius orchestration with real internal
components and simulated providers, consolidate planning into this staged roadmap,
and update canonical documentation as implementation lands. The discussion
document is retired; the original request remains linked context.
Verify Notarius orchestration with real internal components and simulated
providers. Canonical documentation describes the feature when implemented;
the implementation plan owns that documentation handoff.
Use existing configuration loading, registries, input adapters, and temporary
files. Simulate external provider contact with a small fake provider or local HTTP
@@ -228,81 +225,3 @@ exact provider call counts where they protect the agreed deduplication of paid
checks. Test observable behavior rather than private helper structure, incidental
wording, or debug filenames. Do not duplicate upstream provider suites or build
an exhaustive matrix of every flag combination. Follow [Testing Policy](../policy/testing.md).
## Implementation Stages
### Stage 1: Share Local Preparation
**Status:** Not started.
- Extract reusable invocation declarations and local preparation from the run
composition path, retaining existing loading, reference resolution, prepared
module construction, and source/domain validation owners.
- Make source parsing and required external-reference checks reusable by run and
preflight; extract domain-owned checks currently buried in substantive
execution only where necessary. Preserve construction-before-parsing behavior.
- Keep shared loaders free of destination allocation and native smoke calls.
Keep the existing offline `pipeline validate` behavior intact.
- Add focused tests for selection and preparation behavior, retaining existing
run tests as regression coverage.
**Completion:** Run uses the shared local preparation path with its existing
behavior preserved, and preflight can reuse those checks without invoking
substantive pipeline stages. Relevant focused tests pass.
### Stage 2: Implement The Preflight Command
**Status:** Not started; depends on Stage 1.
- Declare `pipeline preflight` and its native `preflight` alias using the shared
invocation inputs and supplied-value semantics.
- Discover selected profiles/backends from resolved selections and native APIs.
Verify producer and validator coverage, prompt defaults, endpoint-only profiles,
and applicable invocation overrides. Add a small shared target-selection
operation only where an actual caller requires it; raise concrete upstream API
gaps rather than duplicating native resolution.
- Implement local destination probes and then the deduplicated native smoke
checks, interpreting native observations according to Sections 1 and 2.
- Reuse requested debug allocation/finalization and native usage observation.
Preserve cancellation and operation/capture causes.
- Implement the readiness report, native text/JSON/YAML presentation, failed
assessment delivery, and native outcomes from Section 4.
- Add focused orchestration and CLI tests for probe coverage, destination effects,
cache preservation, native observations, reporting, and failure propagation.
**Completion:** Both command spellings perform the accepted checks against the
effective invocation, produce useful readiness assessments with native outcomes,
and respect the agreed filesystem and cache effects. Focused offline tests pass.
### Stage 3: Verify Consumer Integration And Document The Feature
**Status:** Not started; depends on Stage 2.
- Complete representative command-level verification of the assembled workflow,
including Narratio's ordinary supplied synthetic input and external references.
Use simulated provider contact; no special Narratio fixture mode is needed.
- Update [CLI Reference](../cli.md) with the command, flag effects, small report,
and outcomes, including a concise structured-output example checked against
the implementation.
- Update the [subprocess consumer guide](../consumers/subprocess.md) for the
preflight-then-run workflow and consumption of unsuccessful assessments.
- Update relevant [CLI](../internal/cli.md), [pipeline](../internal/pipeline.md),
and [run-state](../internal/state.md) internals and [Operations](../operations.md)
for shared preparation, native diagnostics, and permitted filesystem effects.
- Clarify the [architecture policy](../policy/architecture.md)'s offline-preflight
boundary: retain it for `pipeline validate` and describe the explicit online
command separately. User documentation describes affirmative behavior without
a capability disclaimer inventory. Canonical documentation changes accompany
the behavior they describe; finish cross-document review in this stage.
- Run the normal repository-wide checks:
```sh
go test ./...
go vet ./...
go build ./cmd/notarius
```
**Completion:** The representative consumer workflow is verified, canonical
documentation describes the implemented contract, and repository-wide checks
pass. Review all accepted requirements against implementation and test evidence
before marking this roadmap implemented.