Accept shared preflight preparation and side effects

This commit is contained in:
2026-11-28 03:44:29 +00:00
parent 1a2917272d
commit bc0f798020

View File

@@ -126,25 +126,55 @@ mechanics remain implementation choices within this approach.
## 3. Shared Preparation, Input Validation, And Side Effects
**Status:** Open.
**Status:** Accepted; implementation pending.
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.
Share ordinary local preparation between run and preflight: configuration and
invocation selection, lane/reference binding and module options, prompt/profile
dependency checks, module construction, input reading/parsing through its adapter,
and external-reference materialization/validation through its domain owners.
Extract reusable domain-owned checks where validation currently lives inside
execution; do not duplicate integration rules in the CLI. Validate generated
producer/consumer wiring and compatibility during preparation, and generated
content when execution produces it.
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.
Use ordinary shared helpers with a clear handoff to pipeline execution or native
smoke orchestration. Complete local input, reference, and destination checks before
paid smoke checks. Shared preparation does not invoke smoke tests automatically
for run. No general preparation framework or persistent prepared-invocation record
is needed. Run continues to validate its own invocation and inputs.
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.
| Destination | Preflight behavior |
| --- | --- |
| Output | Create the root if needed, write a temporary access-probe file, then remove it. Failure fails preflight. |
| Requested debug | Allocate a real debug session through the existing capture lifecycle. Failure fails preflight. |
| Cache used by selected work | Probe access with a temporary file; problems produce warnings. |
| Cache with bypass | No cache access. |
**Decision:** Pending: reusable preparation boundaries, destination probe depth,
flag effect mapping, and requested-debug lifecycle.
Probes clean up their own files; newly created destination directories may remain.
Auto and refresh have the same preflight access behavior, without reading or
modifying accepted cache entries. No cache-store initialization is needed merely
to probe access. Preflight publishes no extraction artifacts.
Share argument declarations and preserve defaults, precedence, and explicit-empty
distinctions. Configuration, input, lane, and reference controls select checked
work; profile and applicable execution overrides flow into native smoke requests;
output/cache controls select destinations and access behavior. Execution-only
controls remain accepted without manufacturing corresponding preflight work.
Formatting, verbosity, quiet mode, and usage reporting remain native. Preserve
PromptKit's smoke retry defaults when omitted and forward explicitly supplied,
supported overrides without another retry loop. Genuinely deterministic selected
work needs no provider calls.
Start requested debug capture early enough to record preparation failures, update
`latest` at session start, and finalize through the existing lifecycle. Capture
effective selection, useful input/reference diagnostics, native smoke results,
and failures. Reuse native observations for usage and preserve cancellation and
capture failure causes. Private capture filenames remain implementation choices.
**Decision:** All four recommendations accepted: shared owner-led local
preparation, local checks before paid probes, practical destination effects with
best-effort cache access, and native flag/reporting behavior with the existing
debug lifecycle. Readiness-report details remain for Item 4.
## 4. Reports, Outcomes, And Consumer Contract