Live-runner boot preamble hardening — anchor prompts, discovery marker, wire broad-search classifier#490
Open
clkao wants to merge 3 commits into
Open
Conversation
…file hunts, and discovery false-negatives Implements the three fixes from the live-runner boot-preamble-hardening ideation (A/B/C): - Fix A: thread the absolute fixture root into the 8 non-boot-subject drive prompts (gate, rejection, escalation, merge-hook, filing, merge-triage, smallest-mechanism, keep-moving) so a stray boot cd cannot erase the FO's anchor. The three boot-subject scenarios (default-headless gate drive, shallow-boot, zero-discover) are left unaided on purpose. - Fix B: add the `commissioned-by: spacedock@1` discovery marker to the 8 fixture READMEs that lacked it (gate, rejection, escalation, merge-hook, shallow-boot, merge-triage, keep-moving, gate-stop) so `status --boot --identify` resolves them deterministically instead of false-negativing on the FO's nondeterministic boot-path choice. The zero-discovery fixture stays markerless on purpose. gateStopReadme/ gateStopEntity moved into the shared (non-live-tagged) fixtures file so the offline discovery test can build every fixture without a model. - Fix C: wire the existing detectBroadSearchAtBoot detector into claudeLiveRunner.run's failure path via a new classifyBootPreambleFailure classifier (wrong-root wander first, then broad-search), so a contract-file find-hunt reds fast and legibly instead of surfacing as an opaque 60s stall. The detector's error text is generalized off its zero-discover-specific phrasing to cover both boot shapes. Adds offline coverage for both value ACs: boot_discovery_test.go (AC-1, every fixture discoverable, zero-discovery fixture stays undiscoverable) and boot_preamble_classify_test.go (AC-2, a find-hunt stream classifies as a broad-search diagnosis, wrong-root takes priority, a clean boot passes). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…lass Cycle-1 validation measured AC-1/AC-2 as fully proven live (wrong-root wander and discovery false-negatives never recurred across 4 live attempts) but AC-3 unmet: fix C classifies a boot-preamble contract-file hunt fast and legibly, but by design does not prevent it, and the class persisted at 33% (8/24) on the sonnet lane, concentrated in `filing` (0/3 pass). This is exactly the condition the ideation-stage Proposed approach flagged as the trigger for its explicitly deferred boot-preamble-retry lever. Adds that lever: claudeLiveRunner.run now retries a launch whose stream classifies as a boot-preamble fumble (classifyBootPreambleFailure) with a fresh launchAttempt, up to bootPreambleMaxAttempts (3) total, before failing the scenario. The retry decision is a pure, offline-testable policy (shouldRetryBootPreamble) that fires ONLY on a classified preamble fumble — never a generic stall or a downstream scenario assertion, so a genuine scenario regression is never silently re-run away. Boot-subject scenarios (isBootSubjectScenario; shallow-boot is the only one reachable through this runner) opt out and get exactly one attempt, since a boot-preamble retry would mask the very lean-boot discipline regression such a scenario exists to catch — the captain confirmed 2026-07-08 that shallow-boot's own contract-file-hunt red is a genuine finding, not a detector bug. The per-attempt launch is extracted into launchAttempt, archiving each attempt's stream under its own attempt-numbered filename so a persisted failure's full retry history stays inspectable; the canonical claude-stream.jsonl always reflects the last attempt. Offline coverage: boot_preamble_retry_test.go proves the policy retries up to budget, never retries a clean boot, and opts shallow-boot out. Also applies cycle-1's two requested prose corrections to the entity body (AC-3's scenario count 5->8, AC-1's fixture count 9->10) and qualifies the Test Plan's opt-out-must-stay-green line to reflect the captain-confirmed shallow-boot finding — entity edits, not code. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e-hunt class" This reverts commit 949fa2d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workflowRoot) instead ofWorkflow directory: ., so a stray boot-phasecdcannot erase the FO's orientation.commissioned-by: spacedock@1discovery marker to the 8 fixture READMEs that lacked it, eliminating the deterministic--boot --identifyfalse-negative (Spike-proven: 8/10 fixtures false-negatived before, 0/10 after; zero-discovery fixture stays deliberately markerless).detectBroadSearchAtBootdetector intoclaudeLiveRunner.run's failure path via a newclassifyBootPreambleFailure(wrong-root first, then broad-search), so a contract-filefind /hunt at boot reds fast and legibly instead of an opaque 60s stall.Fixes the boot-preamble nondeterminism class logged in the entity's 16-instance ledger (PR #488: 5/5 sonnet-lane attempts failed, 7 distinct scenarios, 0 passes, all upstream of the scenarios' actual subject matter).
Test plan
go build/go vet/go test/go test -race, with and without-tags live— all green (Pi live-test failures reproduced identically onmainwith the same fake-HOME setup — pre-existing, environment-only, unrelated to this diff)TestSharedScenarioFixturesAreDiscoverable(10/10 subtests),TestZeroDiscoverFixtureStaysUndiscoverable,TestClassifyBootPreambleFailure*(3/3) — all passclaude-livelane on the 5 non-boot-subject shared scenarios, ≥3 attempts, plus 1CI-E2E-OPUSattempt, classified against the PR Claude final-message extractor returns the first result event, not the terminal one #488 baseline — needs maintainer environment approval on CI-E2E / CI-E2E-OPUS to run🤖 Generated with Claude Code