FE-875: App runtime probe — boot, probe, classify#219
Draft
kostandinang wants to merge 2 commits into
Draft
Conversation
…cation (slice 1) The app-execution analogue of test-runner.ts: runProbe(spec, sandboxDir) boots an app from the worktree, polls readiness, exercises one HTTP feature endpoint, and returns a structured ProbeResult classifying the outcome as reachable (<400) / not-reachable (booted but endpoint absent — the FE-800 orphan) / infra (never booted), always tearing the boot process down. - types.ts: ProbeOutcomeKind / ProbeSpec / ProbeResult - app-probe.ts: runProbe + readiness poll + SIGTERM->SIGKILL teardown; spawn-error bails fast instead of polling to timeout - the boot argv + URLs are ProbeSpec INPUTS (cook-time grounding supplies them later), not a per-stack boot engine — harness owns the deterministic, read-only check; boot mechanics may lean on agent bash (honors the boundary) - tests boot real seeded node:http apps: reachable / orphan-404 / boot-fail / missing-binary / teardown Also hardens the FE-743 'comparable wall-clock' timing test: its absolute 25ms slack flaked under CPU contention from real-process test files (this slice's probe tests exposed it). Tolerance now scales with serialMs; a true serialized-parallel regression is many x serialMs, still caught. Remaining slices: mode-awareness, integration-oracle gating, ProbeSpec sourcing. Amp-Thread-ID: https://ampcode.com/threads/T-019ecb9a-9a08-733b-833d-76885fc8243a Co-authored-by: Amp <amp@ampcode.com>
This was referenced Jun 16, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
… port + assembles URLs (slice 2) Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019ecb9a-9a08-733b-833d-76885fc8243a
cb90e92 to
f7a632b
Compare
This was referenced Jun 16, 2026
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.

Stacks on FE-872. Fifth Arc-1 frontier — the concrete reachability mechanism behind
integration-oracle(without it, "reachable" collapses to "a test imports the module"). Slices 1 + 2 both land here.What?
Boot the host app from the cook worktree and exercise it over the wire — the app-execution analogue of
test-runner.ts.runProbe,app-probe.ts): boot → poll readiness → hit one HTTP feature endpoint → classify, always tearing the process down.reachable(< 400),not-reachable(booted but endpoint absent/erroring — the FE-800 orphan),infra(never booted). A spawn error bails fast instead of polling to timeout.buildProbeSpec,app-probe.ts): resolve aProbeTarget(boot argv + paths) into a runnableProbeSpecby allocating a free port and assembling the ready/feature URLs. The boot test's hand-rolled port dance becomes the production primitive it now dogfoods.Why?
Verification today only runs the test runner in the worktree, so "reachable" degrades to "a test imports the module" and the FE-800 orphan survives. The harness owns the deterministic, unshortcuttable check; the boot argv + paths are inputs (cook-time grounding supplies them later) — no per-stack boot engine. The port can't be hardcoded: under parallel cook each slice boots its own app and a fixed port collides, so port→URL binding is the one harness-owned piece (best-effort ephemeral, loopback-only, acknowledged TOCTOU window — no retry framework).
Tests
Real seeded
node:httpapps in tmp worktrees, no mocks: reachable; booted-but-404 → orphan; immediate-exit / missing-binary → infra; teardown leaves no process. PlusbuildProbeSpec: port allocated + URLs assembled, caller env layered underPORT, distinct ports across 8 concurrent allocations. (Also hardens the FE-743 wall-clock timing test, which flaked under the CPU contention real-process tests add — tolerance now scales withserialMs.)Deferred
Mode-awareness + where the
ProbeTargetargv/paths come from (architect intent + cook grounding) =integration-oracle(#6).Co-authored-by: Amp amp@ampcode.com
🤖 Generated with Claude Code