165 lines
9.2 KiB
Markdown
165 lines
9.2 KiB
Markdown
# Pipeline Preflight Discussion
|
|
|
|
## Purpose And Status
|
|
|
|
This document records the accepted direction and open decisions for
|
|
[Narratio's feature request](narratio-feature-request.md). The request owns the
|
|
consumer's requested behavior; this discussion owns Notarius design decisions
|
|
before a formal roadmap and implementation plan. Accepted decisions here refine
|
|
the original request, including its proposed coverage disclosures. No new preflight
|
|
command is implemented by this document.
|
|
|
|
The overall direction below is accepted. Numbered decision sets remain proposals
|
|
until explicitly accepted; their details are not implied implementation approval.
|
|
Current behavior belongs in [CLI Reference](../cli.md),
|
|
[CLI Internals](../internal/cli.md), and [Operations](../operations.md).
|
|
|
|
## Accepted Direction
|
|
|
|
- Notarius owns readiness for its selected pipeline, including relevant provider
|
|
targets and interpretation of native diagnostic observations. Narratio should
|
|
not reconstruct those decisions or supply a duplicate profile inventory.
|
|
- Add `notarius preflight PIPELINE_ID` with the same invocation inputs as `run`.
|
|
Provide `pipeline preflight` with the top-level spelling as a native alias.
|
|
Preserve defaults, precedence, path origins, and supplied-value distinctions.
|
|
- Keep `pipeline validate` as the existing offline configuration/dependency check.
|
|
New preflight explicitly permits input reads, destination probes, provider
|
|
contact, smoke inference costs, and requested debug capture.
|
|
- Share run declarations, selection, reference binding, and applicable preparation
|
|
logic. Do not run extraction and interrupt it as a substitute for preflight.
|
|
- Use native PromptKit diagnostics and CommandKit reporting/outcomes. Keep provider
|
|
mechanics upstream; consider an upstream addition if required observations or
|
|
target resolution cannot be obtained cleanly through native APIs.
|
|
- Do not publish extraction artifacts or populate, refresh, invalidate, or use
|
|
accepted cache entries as proof of present provider readiness.
|
|
- A supplied synthetic transcript is ordinary input. Readiness covers that input,
|
|
not a future real transcript; execution still validates its own input.
|
|
- A small machine-readable readiness report is the command's product, not a new
|
|
execution ledger, persisted receipt, or reporting sidecar system.
|
|
|
|
## 1. Required Checks And The Meaning Of Ready
|
|
|
|
**Status:** Accepted; implementation pending.
|
|
|
|
Preflight validates that the selected pipeline is coherent and satisfied by the
|
|
supplied inputs, then runs the available, applicable native PromptKit smoke checks
|
|
against the backends/profiles implicated by that pipeline. This affirmative
|
|
contract is sufficient for user documentation; no catalogue of substantive
|
|
execution behavior outside preflight is needed.
|
|
|
|
| Area | Required check |
|
|
| --- | --- |
|
|
| Configuration and selected work | Valid effective selection, module options, lane selection, static prompt/profile dependencies, and binding compatibility. |
|
|
| Supplied input and external references | Readable input accepted by its input adapter; required external references accepted by their domain owners after run-equivalent binding/unbinding. |
|
|
| Generated dependencies | Valid producer/consumer wiring and compatibility. |
|
|
| Provider targets | Available, applicable native PromptKit smoke checks against the selected backends/profiles. |
|
|
| Output and requested debug | Practical access checks for destinations required by the invocation. |
|
|
|
|
A failed required check or inability to complete it, including cancellation,
|
|
produces unsuccessful readiness. Native diagnostic observations still require
|
|
interpretation: a diagnostic finishing without a Go error does not necessarily
|
|
mean its check passed.
|
|
|
|
An unavailable backend diagnostic capability is neither a failure nor an omission.
|
|
For example, absence of a native authentication check needs no compensating proof,
|
|
warning, or coverage disclaimer. Run the applicable checks PromptKit provides;
|
|
do not introduce a Notarius capability checklist that a backend must satisfy
|
|
beyond those native diagnostics. This supersedes the earlier proposal to disclose
|
|
unavailable checks and general execution coverage limits.
|
|
|
|
Cache access problems warn rather than fail preflight, consistent with execution's
|
|
best-effort cache policy; bypass requires no cache access. Output and requested
|
|
debug destination failures remain failures.
|
|
|
|
Producer strict/permissive mode does not change the smoke-check verdict or turn
|
|
failed checks into success through fallback. Preflight performs its own defined
|
|
checks; producer fallback belongs to substantive pipeline execution.
|
|
|
|
**Decision:** All three recommendations accepted with the clarified rationale:
|
|
required checks must complete successfully, cache problems remain warnings, and
|
|
producer fallback mode does not alter readiness. Unavailable native diagnostic
|
|
capabilities need no failure, omission, or caveat reporting. Target selection
|
|
mechanics remain for Item 2; report details remain for Item 4.
|
|
|
|
## 2. Effective Target Discovery And Probe Coverage
|
|
|
|
**Status:** Open; depends on Item 1.
|
|
|
|
Cover applicable model-backed chunking, extraction, normalization, correction,
|
|
validators, and other selected model roles. Apply invocation overrides and native
|
|
prompt defaults; profile names alone do not establish effective target identity.
|
|
Continuation inheritance must follow native execution semantics.
|
|
|
|
Recommend sharing a probe only for equivalent effective targets and capability
|
|
requirements, retaining the affected bindings in findings. A backend ID alone is
|
|
insufficient when models or effective selections differ. Avoid secret-bearing
|
|
identities in reports. Do not maintain a second native resolution algorithm.
|
|
|
|
Inspect the available native inspection/requirements/smoke APIs and current module
|
|
selection contracts. Decide how to discover the implicated targets, including
|
|
dynamic selections, without preparing fabricated domain artifacts or rebuilding
|
|
module execution. Select checks using native availability/applicability under
|
|
Item 1; escalate concrete target-resolution API gaps upstream.
|
|
|
|
**Decision:** Pending: resolution boundary, equivalence for probe reuse, necessary
|
|
probe set, and treatment of dynamic selections under Item 1's readiness policy.
|
|
|
|
## 3. Shared Preparation, Input Validation, And Side Effects
|
|
|
|
**Status:** Open.
|
|
|
|
Reuse run argument declarations and effective invocation selection, then share
|
|
applicable reference/materialization and input-adapter work. Where reference
|
|
validation lives inside execution today, expose reusable domain-owned checks rather
|
|
than copy them into the command. Keep generated-content validation deferred.
|
|
|
|
Recommend practical destination checks using narrowly scoped temporary probes,
|
|
cleaning up only their own probe files. Directory creation may be allowed without
|
|
publishing an extraction bundle. Preserve cache best-effort behavior and require
|
|
no cache lookup or mutation. `--cache refresh` never refreshes acceptance here.
|
|
|
|
Define the effects of every accepted run control, debug allocation/finalization,
|
|
and native usage observation. Preserve cancellation and capture failure causes.
|
|
No provider calls are needed for genuinely deterministic selected work. Run still
|
|
performs its own checks; a previous preflight is not a durable authorization token.
|
|
|
|
**Decision:** Pending: reusable preparation boundaries, destination probe depth,
|
|
flag effect mapping, and requested-debug lifecycle.
|
|
|
|
## 4. Reports, Outcomes, And Consumer Contract
|
|
|
|
**Status:** Open; depends on readiness semantics.
|
|
|
|
Recommend one small native report with pipeline, overall readiness, scoped check
|
|
results, failures, and actionable warnings. Use stable machine-readable
|
|
finding codes and identify relevant input/binding/target without requiring prose
|
|
parsing or provider-specific interpretation by Narratio.
|
|
|
|
Interpret native observations faithfully without treating an unavailable capability
|
|
as a failed or omitted check. No coverage-limit inventory or general execution
|
|
disclaimer is required. Provide useful assessment output on failed checks when
|
|
possible, together with an unsuccessful process outcome. Native invalid-configuration, cancellation, credential
|
|
omission, and report-delivery semantics remain intact. Quiet/format behavior stays
|
|
native. Do not add a universal error envelope or mandatory persisted report.
|
|
|
|
**Decision:** Pending: minimal fields and codes, failure-report delivery, readiness
|
|
aggregation, and documented consumer expectations.
|
|
|
|
## 5. Verification And Roadmap Handoff
|
|
|
|
**Status:** Open after preceding choices.
|
|
|
|
Plan focused offline tests with fake providers and temporary destinations for
|
|
run/preflight selection equivalence, reference overrides, target coverage and
|
|
native observations, partial/unsupported results, cancellation, failed report or
|
|
capture delivery, and absence of extraction/cache mutation. Use independent expected
|
|
outcomes; do not duplicate upstream provider suites or require paid inference.
|
|
|
|
Update canonical command/consumer documentation with implemented behavior. Clarify
|
|
the architecture's existing offline-preflight boundary while retaining it for
|
|
`pipeline validate`; describe the explicit online command separately. Once decisions
|
|
are settled, consolidate a formal target roadmap and prepare staged implementation
|
|
work. Exact private types and filenames remain implementation choices.
|
|
|
|
**Decision:** Pending.
|