Skip to content

Fleet does the labor — Slice 1: round-trip proof + prompt hardening (v1.10.0-rc.1)#79

Merged
Ryfter merged 10 commits into
masterfrom
feature/fleet-labor-slice1-roundtrip
Jul 5, 2026
Merged

Fleet does the labor — Slice 1: round-trip proof + prompt hardening (v1.10.0-rc.1)#79
Ryfter merged 10 commits into
masterfrom
feature/fleet-labor-slice1-roundtrip

Conversation

@Ryfter

@Ryfter Ryfter commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Fleet Does the Labor — Slice 1: Round-Trip Proof + Prompt Hardening (v1.10.0-rc.1)

First slice of the "fleet does the labor" track: prove that each enabled instrument actually answers a real prompt, and harden the dispatch pipe — so a later slice can build the executor on a pipe known to work. No repo-apply here — the -Spawner executor is Slice 2.

Spec: docs/superpowers/specs/2026-07-04-fleet-labor-slice1-roundtrip-proof-design.md (d077). Plan: docs/superpowers/plans/2026-07-04-fleet-labor-slice1-roundtrip-proof.md.

What's in it

  • fleet doctor --live — sends a 4-challenge canary battery to every ENABLED provider (cli + http) in one round-trip and reports live_ok | live_fail(reason) | skip. The battery (PONG / 42 / PARIS / COLD) is scored k/4; only PONG's answer appears in the prompt, so an echoing/wrong template scores 1/4 and correctly fails. --timeout <s> (default 60) and --json supported. Exit 0 iff every enabled provider is live_ok, else 1. Default (non-live) path unchanged.
  • Prompt hardening — clean-tail CLI templates (ending in a standalone quoted "{{prompt}}") now dispatch via stdin, immune to the 965-byte / quote-mangling wall. Embedded-{{prompt}} and shell-wrapped templates stay on the legacy path.
  • New scripts/fleet-probe-lib.ps1 (canary classifier + reachability + timeout-guarded live probe), deploy-wired into bootstrap.ps1 with a test-bootstrap deploy assert. Docs: commands/fleet.md, AGENTS.md. Plugin 1.9.0 → 1.10.0-rc.1.

Quality

  • Suites all green (0 FAIL): fleet-probe-lib 21, fleet-dispatch 19, fleet-lib 40, fleet-doctor 12, bootstrap 59 (+1 deploy assert), conductor 105 (no regression).
  • Built subagent-driven, streamlined ceremony (haiku transcription tiers + sonnet for the dispatch edit + opus whole-branch review).
  • Opus review: READY TO MERGE, 0 Critical.

Two fixes after the review

  1. Canary battery (c6b9764) — the review found the single PONG token lived inside its own prompt, so an echo-back false-passed live_ok. Replaced with the 4-challenge battery; echo-back now scores 1/4 and fails.
  2. stdin:true dispatch regression (5bec3e6) — a Critical the review missed: Task 3 routed stdin:true providers through Resolve-FleetCommand -Prompt '', which a mandatory [string] param rejects, breaking every stdin:true provider (github-models, box-private reviewer pairs). The fixture had no stdin:true provider, so the suites didn't catch it. Fixed (resolve {{model}} inline, no empty-prompt binding) + added a stub-stdin fixture and round-trip asserts to close the coverage gap.

Upgrade note

The stdin promotion changes dispatch for real interpolating providers whose template ends in a quoted {{prompt}} (codex exec, gh copilot suggest, ollama run, agy --print, claude -p): they now receive the prompt on stdin. Re-run fleet doctor --live after upgrading to confirm your box's roster still answers.

Out of scope (Slice 2 / later)

The -Spawner executor that applies repo changes; routing changes; per-provider latency/quality benchmarking.

Ryfter and others added 10 commits July 4, 2026 23:23
…t-does-the-labor track)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…hardening

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… empty-prompt binding

Task 3 routed stdin:true providers through Resolve-FleetCommand -Prompt '',
which a mandatory [string] param rejects, breaking every stdin:true provider
(github-models, box-private reviewer pairs). Resolve {{model}} inline for both
stdin paths instead. Add a stdin:true fixture provider + round-trip asserts —
the gap that let this through review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…G token

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 07:37
@Ryfter
Ryfter merged commit 9602c43 into master Jul 5, 2026
1 check passed
@Ryfter
Ryfter deleted the feature/fleet-labor-slice1-roundtrip branch July 5, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements “Fleet does the labor” Slice 1 by adding a live round-trip probe (fleet doctor --live) that verifies enabled providers actually answer a deterministic canary battery, and hardens CLI dispatch by promoting certain templates to stdin-based prompting to avoid quoting/965-byte issues.

Changes:

  • Add scripts/fleet-probe-lib.ps1 with canary battery scoring, reachability checks, and timeout-guarded live probing.
  • Extend fleet doctor with -Live/-TimeoutS/-Json to report live_ok | live_fail(reason) | skip and exit nonzero if any enabled provider fails.
  • Promote “clean-tail quoted {{prompt}}” CLI templates to stdin dispatch via Test-StdinSafe, plus fixtures/tests/docs/version bump and deploy wiring.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/fleet-probe-lib.ps1 New canary battery + reachability + timeout-guarded probe implementation.
scripts/test-fleet-probe-lib.ps1 Unit tests for canary scoring, reachability, and probe behavior.
scripts/fleet-lib.ps1 Adds Test-StdinSafe and promotes eligible CLI templates to stdin dispatch.
scripts/test-fleet-dispatch.ps1 Tests stdin-safe predicate and stdin:true regression coverage.
scripts/fleet-doctor.ps1 Adds -Live probing mode and JSON/table rendering for live results.
scripts/test-fleet-doctor.ps1 End-to-end tests for fleet doctor --live, including exit codes and JSON shape.
scripts/fixtures/fleet-sample.yaml Adds stub-stdin provider fixture for stdin:true coverage.
scripts/test-fleet-lib.ps1 Updates provider-count assertion for the expanded fixture roster.
scripts/bootstrap.ps1 Deploy manifest updated to include fleet-probe-lib.ps1.
scripts/test-bootstrap.ps1 Adds deploy assertion for fleet-probe-lib.ps1.
docs/superpowers/specs/2026-07-04-fleet-labor-slice1-roundtrip-proof-design.md New design spec documenting live probing + prompt hardening approach.
docs/superpowers/plans/2026-07-04-fleet-labor-slice1-roundtrip-proof.md New implementation plan (task breakdown, tests, wiring, docs).
commands/fleet.md Updates /baton:fleet docs for doctor --live usage and hints.
AGENTS.md Adds a fleet health note recommending fleet doctor --live.
.claude-plugin/plugin.json Version bump to 1.10.0-rc.1.

Comment on lines +46 to +52
$up = ([string]$Output).ToUpperInvariant()
$score = 0
$missing = @()
foreach ($ch in $script:FleetCanaryChallenges) {
if ($up.Contains(([string]$ch.token).ToUpperInvariant())) { $score++ }
else { $missing += [string]$ch.token }
}
Comment on lines +72 to +76
if ($Provider.kind -eq 'cli') {
$bin = ([string]$Provider.command_template -split '\s+')[0]
if (Get-Command $bin -ErrorAction SilentlyContinue) { return @{ reachable = $true; reason = $null } }
return @{ reachable = $false; reason = 'not-on-PATH' }
}
Comment thread scripts/fleet-lib.ps1
Comment on lines +193 to +195
if ($template -notmatch '\s+(["''])\{\{prompt\}\}\1\s*$') { return $false }
$head = $template -replace '\s+(["''])\{\{prompt\}\}\1\s*$', ''
if ($head -match '[|><&;`]' -or $head -match '\$\(') { return $false }
Comment thread commands/fleet.md
---
description: Manage and invoke the LLM fleet. `doctor` health-checks providers, `test` dispatches a prompt to one provider, `list` shows the registry.
argument-hint: doctor | test <name> "<prompt>" [--model <m>] | list
argument-hint: doctor [--live] [--timeout <s>] | test <name> "<prompt>" [--model <m>] | list
Comment thread commands/fleet.md
Comment on lines +21 to +24
& pwsh -NoProfile -File "$HOME/.claude/scripts/fleet-doctor.ps1" -Live -TimeoutS 60
```

Echo the table to the user.
Echo the table to the user. With `--live`, each enabled provider receives a `PONG` canary and reports `live_ok`, `live_fail(<reason>)`, or `skip`; a `no-canary` reason means the provider ran but didn't answer (often a wrong command template for this box). Plain (no `--live`) performs the fast PATH/reachability check only.
- Guard `0/0` NaN in any division (this slice has none — assert none is introduced).
- Box-private: never write real roster/endpoint values into the shared seed `fleet.yaml`; placeholder hosts only. The live probe reads the box-private live roster at run time.
- Tests are hermetic: temp `fleet.yaml` fixtures, temp `BATON_HOME`, `try/finally` restore. NEVER touch real `~/.baton`, `~/.claude`, `D:\Dev\Grimdex`, or `D:\dev`.
- The canary prompt constant is exactly `Reply with exactly the word PONG and nothing else.` and the token constant is exactly `PONG`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants