Make brokered --print a real no-launch preview #1593

Closed
opened 2026-07-28 08:43:13 +00:00 by coilyco-ops · 2 comments
Member

Problem

Operators use --print to answer what Ward would launch before consuming capacity or changing state.

From a read-only director, Ward currently forwards --print through the normal asynchronous launch path. The broker creates a launch request, journal, and dispatch artifact, starts a launch worker, then relies on the child Ward process to notice --print before creating the container.

The command may avoid the final container launch, but everything before that looks and behaves like a real dispatch. Its output even says broker Ward launch started. An operator cannot safely distinguish a preview from work entering the fleet.

Core invariant

A print request is a read-only plan calculation, not a launch request.

It must never consume capacity, reserve work, enter dispatch lifecycle state, or require later inspection to prove that nothing launched.

Required behavior

  • Detect --print before broker launch admission.
  • Send a distinct synchronous plan request to the broker.
  • Resolve the plan using the same host-side configuration and defaults as a real launch.
  • Return the resolved plan directly to the requesting terminal.
  • Create no launch journal, dispatch artifact, peer admission, reservation, issue comment, container, or staged launch assets.
  • Skip launch-only capacity, backpressure, preflight, and recovery machinery.
  • Label the output clearly as PLAN ONLY and state that no launch was accepted.
  • Never use accepted, launch-started, pending, or log-following language for a preview.
  • Keep ordinary non-print dispatch behavior unchanged.

Acceptance criteria

  • Brokered and local --print render the same resolved launch plan.
  • A brokered preview leaves the issue, broker queue, dispatch artifacts, reservations, capacity, Docker state, and asset staging unchanged.
  • Preview errors return synchronously as plan-resolution errors.
  • Tests prove the launch path is never entered.
  • Removing --print from the same command still performs the normal brokered launch.
  • Repository validation passes.

Headless execution boundary

Use an in-process synthetic broker, temporary state roots, fake tracker responses, and fake launch hooks. Do not launch a real container or mutate a live issue for acceptance.

## Problem Operators use `--print` to answer what Ward would launch before consuming capacity or changing state. From a read-only director, Ward currently forwards `--print` through the normal asynchronous launch path. The broker creates a launch request, journal, and dispatch artifact, starts a launch worker, then relies on the child Ward process to notice `--print` before creating the container. The command may avoid the final container launch, but everything before that looks and behaves like a real dispatch. Its output even says `broker Ward launch started`. An operator cannot safely distinguish a preview from work entering the fleet. ## Core invariant **A print request is a read-only plan calculation, not a launch request.** It must never consume capacity, reserve work, enter dispatch lifecycle state, or require later inspection to prove that nothing launched. ## Required behavior * Detect `--print` before broker launch admission. * Send a distinct synchronous plan request to the broker. * Resolve the plan using the same host-side configuration and defaults as a real launch. * Return the resolved plan directly to the requesting terminal. * Create no launch journal, dispatch artifact, peer admission, reservation, issue comment, container, or staged launch assets. * Skip launch-only capacity, backpressure, preflight, and recovery machinery. * Label the output clearly as `PLAN ONLY` and state that no launch was accepted. * Never use accepted, launch-started, pending, or log-following language for a preview. * Keep ordinary non-print dispatch behavior unchanged. ## Acceptance criteria * Brokered and local `--print` render the same resolved launch plan. * A brokered preview leaves the issue, broker queue, dispatch artifacts, reservations, capacity, Docker state, and asset staging unchanged. * Preview errors return synchronously as plan-resolution errors. * Tests prove the launch path is never entered. * Removing `--print` from the same command still performs the normal brokered launch. * Repository validation passes. ## Headless execution boundary Use an in-process synthetic broker, temporary state roots, fake tracker responses, and fake launch hooks. Do not launch a real container or mutate a live issue for acceptance.
coilyco-ops changed title from Make brokered --print render a true launch plan without launch-start wording to Make brokered --print a real no-launch preview 2026-08-05 18:10:43 +00:00
Author
Member

Decision resolved by Kai on 2026-08-05.

The core contract is that --print is a read-only plan calculation, not a launch request. Brokered previews must use a distinct synchronous plan path and leave no launch journal, dispatch artifact, reservation, capacity record, issue mutation, container, or staged launch asset.

The broker returns the host-resolved plan directly with PLAN ONLY wording. Ordinary non-print dispatch remains unchanged.

Priority is P2 because a dry-run flag is a safety boundary.

Decision resolved by Kai on 2026-08-05. The core contract is that --print is a read-only plan calculation, not a launch request. Brokered previews must use a distinct synchronous plan path and leave no launch journal, dispatch artifact, reservation, capacity record, issue mutation, container, or staged launch asset. The broker returns the host-resolved plan directly with PLAN ONLY wording. Ordinary non-print dispatch remains unchanged. Priority is P2 because a dry-run flag is a safety boundary.
Author
Member

Landed on canonical main in 60c078a0.

Evidence:

  • Brokered --print now uses a distinct synchronous plan action with no request id.
  • Plan handling bypasses launch admission, workers, peer admission, journals, artifacts, staging, reservation, capacity, Docker readiness, preflight, and recovery.
  • Local and brokered output starts with PLAN ONLY - no launch was accepted.
  • Launch requests carrying --print are rejected, while the ordinary non-print launch path remains durable and unchanged.
  • Synthetic broker, launch-hook, artifact-root, staging-root, and protocol regression fixtures pass.
  • Full tests, build, vet, lint, policy boundary, release contract, pre-commit, and ward doctor pass.
Landed on canonical `main` in `60c078a0`. Evidence: * Brokered `--print` now uses a distinct synchronous `plan` action with no request id. * Plan handling bypasses launch admission, workers, peer admission, journals, artifacts, staging, reservation, capacity, Docker readiness, preflight, and recovery. * Local and brokered output starts with `PLAN ONLY - no launch was accepted`. * Launch requests carrying `--print` are rejected, while the ordinary non-print launch path remains durable and unchanged. * Synthetic broker, launch-hook, artifact-root, staging-root, and protocol regression fixtures pass. * Full tests, build, vet, lint, policy boundary, release contract, pre-commit, and `ward doctor` pass.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/ward#1593
No description provided.