diff --git a/docs/roadmap/preflight-discussion.md b/docs/roadmap/preflight-discussion.md index 31e67988..b643c9e2 100644 --- a/docs/roadmap/preflight-discussion.md +++ b/docs/roadmap/preflight-discussion.md @@ -178,22 +178,51 @@ debug lifecycle. Readiness-report details remain for Item 4. ## 4. Reports, Outcomes, And Consumer Contract -**Status:** Open; depends on readiness semantics. +**Status:** Accepted; implementation pending. -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. +Emit one small command-specific readiness report through CommandKit, accompanied +by the ordinary process exit status: -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. +| Field | Meaning | +| --- | --- | +| `pipeline` | Selected pipeline ID. | +| `ready` | Whether all required checks completed successfully. | +| `checks` | Results of performed checks, including actionable warnings. | +| `debug_directory` | Capture location when available. | -**Decision:** Pending: minimal fields and codes, failure-report delivery, readiness -aggregation, and documented consumer expectations. +Each check has a stable identifier, relevant scope, a result (`passed`, `failed`, +or `warning`), and a human-readable message. Scope identifies the relevant input, +binding, backend, profile, or destination. Supply stable finding codes where +consumers need to distinguish failure reasons. Consumers need no prose parsing or +provider-specific interpretation to determine readiness. Keep native diagnostic +detail in debug capture; do not duplicate failures and warnings in separate lists. +Exact identifiers and field representation within checks remain implementation +choices consistent with this contract. + +Readiness is true when all required checks complete successfully, and false when +any required check fails or cannot complete. Cache warnings do not prevent +readiness. Unavailable native capabilities add no invented check or warning. +Retain useful results gathered before failure without adding a hypothetical or +unperformed-check inventory. No third overall partially-ready state is needed. + +When an assessment is available, report it even when readiness is false, then +return an unsuccessful outcome. Failures before an assessment can be constructed, +such as malformed arguments, use native error handling. Consumers check process +status, decode an available structured report for assessment details, and use +stderr for native explanations when no usable report is available. A ready report +does not override a nonzero status: capture or delivery can fail independently. +Preserve native exit classifications, cancellation, credential omissions, and +operation/delivery causes rather than adding preflight-specific exit codes. + +Default text gives a concise ready/not-ready summary and actionable failures and +warnings; verbose presentation includes successful check details. JSON and YAML +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. + +**Decision:** All four recommendations accepted: a small scoped readiness report, +straightforward readiness aggregation, useful failed assessments with native +outcomes, and native presentation with a concise human view. ## 5. Verification And Roadmap Handoff