Skip to content

feat(native): hack up returns when every container has started; --wait keeps ready - #1124

Draft
roodboi wants to merge 38 commits into
nextfrom
claude-lead/up-started-b-cli
Draft

roodboi wants to merge 38 commits into
nextfrom
claude-lead/up-started-b-cli

Conversation

@roodboi

@roodboi roodboi commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

PR B of "native hack up returns when containers have started" (owner decision, Nov 20).

At started, in both modes

The CLI always passes --report-started. When the owner's graph_foreground_started line arrives:

  1. the ownership check (authoritative), then the frontend lifetime is registered (finalization active.json, the same attempt later gains the HTTPS lease), then the run mapping is saved, before the HTTPS lease or anything else acts on the line (ensureMapping, idempotent). A start killed in the window therefore has a mapping, with or without --wait. This closes finding B from the feat(runtime): report when every service of a native start has started #1110 review.

The owner holds the provider lease from its started line until its ready line, so nothing at started may take it. The mapping is read through lease-free graph status.

Without --wait, the rest of today's chain also runs at started, except the two steps that need the lease:

  1. the HTTPS lease: taken at the owner's ready line (the HTTPS owner admits a lease only after a leased inspection of a ready graph). A failure there stops the run;
  2. admission retire;
  3. the env fingerprint;
  4. up.after, as Compose up -d does today;
  5. the exit watcher;
  6. the down-hook debt;
  7. the detached launcher's release (readiness: "warming");
  8. the closing line with its warming count;
  9. build-image reclaim: at the owner's ready line (it takes the lease without waiting, so at started it would be skipped as busy).

When the owner later reports graph_foreground_ready, the routes are verified and All services ready · 12.1s is printed.

With --wait, steps 2 to 10 happen at ready, exactly as today, after the mapping step at started.

What users see

State Seen as
run warming closing line … up in 4.6s · native · 2 routes warming; up --json and ps --json have readiness: "warming", one field to read
run ready readiness: "ready"; foreground All services ready · Ns
service still waiting on its health goal ps STATE warming
route not checked yet counted in "N routes warming" and in services.warming

Commands while warming

  • ps: never calls owner-status (the owner is in its start loop). A test fails by hanging if it does.
  • exec and one-off run:
    • wait for ready, bounded by the start budget, with one line on stderr: waiting for the project to become ready…. Then they run, so up -d && hack exec api … keeps working;
    • a start that fails while they wait ends them with that outcome, and nothing runs;
    • an observation the wait cannot read decides nothing: the command's own checks refuse it, as before.
  • open: unchanged from today: it opens the route at once, and the route may not answer until ready. Waiting in open is cut from this PR to its own follow-up (lead's call, to keep the size down).
  • logs SERVICE without -f: a lease-free snapshot (graph logs, which on macOS reads through the observer and checks the recorded container before and after). The output format is unchanged from a ready run.
  • down: the owner accepts a stop or status request wherever its start loop checks cancellation (option 1): between engine operations, between final verification's listener-exit polls (25 ms) and between deferred-publication settlement rounds (100 ms). A request waits for at most one in-flight step: one engine request (40 s timeout after a 3 s connect), or one service's publication, each also bounded by the start's deadline. A stop never interrupts a publication: it takes effect after that publication commits or is withdrawn. down --remove-data waits for ready (graph_starting): stop first, then remove.
  • restart: stops through the owner, then resumes.
  • A second up: says "already running", names the services still warming, and applies no configuration change. --wait on an already running run does not wait (cut to the same follow-up). If a detached run stopped after it had started, the next up prints one stderr line naming the failure code. This is today's rule for a ready run, with the same hack restart hint. A service still waiting on its health check is warming, not "down".

One constant for whether --json and --no-interactive imply --wait: NATIVE_UP_SCRIPTS_WAIT_BY_DEFAULT = false, pending the owner's answer (Q4).

Runtime (Rust)

  • The owner answers its transport during the start loop, at every cancellation check, without a second lease:

    • stop: cancels the start, ending in cleanup with data retained, and replies in the after-ready shape;
    • status: answered lease-free, with runtime_error: "graph_starting";
    • every other request: refused with graph_starting.

    graph cleanup falls back to a lease-free receipt read on provider_busy, so a stop and a restart in the window go through the owner.

  • graph logs while warming: lease-free on macOS (observer reads, container identity checked before and after). graph logs-follow --no-follow stays as a lease-free finite read; the CLI now uses the snapshot instead, so its format matches a ready run.

  • Gates: logs -f and the service-exec gate accept started-observed (exec only for a started service; jobs stay at ready). graph status lists already-published ports while warming.

  • Failure after started: a run that fails after up returned keeps a value-free record, failed_after_started {code, service?, at}, in its own file next to the receipt (failed-after-started.json), not in the strict receipt. The owner's own cleanup keeps it. graph status reports it lease-free as a top-level key; ps shows a blocker line (failed after up returned · CODE, the time, and hack logs SERVICE); the next up prints it once. hack down removes it through the new graph clear-failure-after-started --run-id ID --json (it takes the cleanup lease and refuses, as graph_failure_record_not_stopped, unless the run is stopped or removed). graph cleanup and the next start remove it too. Compatibility: the receipt is unchanged. An older runtime tolerates an unknown file in the run directory (checked at 1f17dc3), and after down the file is gone.

  • Foreground failure after started: the owner's later failure ends the foreground as a start failure does, with the failed services' log tails and a nonzero exit.

  • Size: about 229 source lines in the first round, plus about 150 for the review fixes (lease-free snapshots, serving during final verification, the stop check in deferred settlement, the failure record). That is over the 250 limit; the review fixes asked for it. publication.rs is not touched; publishers.rs gets the one-line stop check the lead allowed.

Models

native-startup-owner/Owner.tla:

  • Phase and mapping: a started phase; PublishMapping at started in both modes; --wait as the WaitForReady constant.
  • Stop split: DownRequest queues a stop (stopQueued); AcceptStop is where the owner takes it between start passes; DownStop then cleans up.
  • Invariants: NoPrematureReturn, the new NoReturnWithoutMapping, DownCancelsWait (a down in the window cancels the owner's wait, then Ready never happens), DownHooksOnce, and NoHalfPublicationAfterStop (publication modelled as a two-step commit; the stop waits for it).
  • Negative controls, each failing for its pinned reason:
    • mapping-after-line (yours) and mapping-after-line-wait;
    • down-leaves-owner-waiting (yours, re-pinned to AcceptStop);
    • stop-without-accept (new: a stop that the owner never takes);
    • stop-mid-publication;
    • detached-before-started, detached-before-ready-wait;
    • and the earlier ones.
  • Second review: the publication guard is on AcceptStop, not on the request; DownRequest can queue a stop mid-publication, and the owner starts no new publication once it accepts. The frontend's own cancellation is a separate action, FrontendCancel (controller.abort()), with its own variable; DownStop needs both. New invariant StoppedFrontendCancelled, new control stop-before-frontend-cancel; stop-mid-publication now accepts mid-publication and still fails NoHalfPublicationAfterStop.
  • State counts: positive 1720, wait 806; 13 configurations.
  • Runs: the full model runner passed (352 controls). One earlier run stopped on native-image-batch negative with an equivalent witness (verified = {1, 3} against the pinned {1, 2}) under two TLC workers, a second flaky witness in a model this PR does not touch, next to HACK-2574.
  • The code-level boundary: the model's two-step publication is abstract. The Rust unit tests do not cover the real publication boundary (execution.rs sets "published" itself in its test, and foreground/tests.rs supplies its own cleanup reply). Only the VM scenario exercises a stop against a real publication. COVERAGE.md says so.
  • Docs: COVERAGE.md maps every action to the code, including the stop delay. A Pele state chart is added (state.mmd, state.svg, state.png): the label checker and the PNG checker pass, and the PNG was looked at.
  • Elsewhere: the model's description in docs/architecture.md and tests/models/tla/README.md, and docs/reference/v5-model-coverage.md, are updated.

Docs

  • docs/guides/native-candidate.md: a new "Started and ready" section, plus the two up paragraphs.
  • docs/versions/v5/native/start.md, the v5 start-here path.
  • docs/versions/v5/release-notes.md, in section 1 for scripts: up.after runs at started, and a hook that calls a URL needs --wait.
  • The agent guidance in src/agents/instruction-source.ts, with the plugin bundle regenerated.
  • docs/reference/cli.md, regenerated for --wait.

Fix after the second VM run

The cold up -d --wait with a service whose health check settles 45 s after it starts (and whose port is published only after that) failed after 74 s with bridge_endpoint_unavailable. Since the started line, the receipt is started-observed, and the scoped inspection behind each service's early publication (inspect_targets_scoped, used by admit_ready_service, start_selected and the upstream check) admitted only preparing and restoring. So when the slow service became ready, its inspection found nothing, and the port was refused instead of published. That check now uses start_phase(), which sees through started-observed to the start it belongs to, as the start loop's other checks already do. Both modes are affected the same way, because the CLI passes --report-started with and without --wait. Test: after_started_a_slow_port_is_deferred_then_published_not_refused runs the early-port case in started-observed (from preparing and from restoring). While the health check is starting, the port is pending (deferred, no endpoint, no refusal); once healthy, it has exactly one endpoint. It fails on the old check. The deferred settlement itself is macOS-only; the scenario covers it.

Second review (51f6e40), last list

  1. The VM failure: c2a6132, below.
  2. Receipt compatibility: the record's own file, above.
  3. Item 1, the rest:
    • a start that crashed after active.json and before its mapping: down finds the one orphan lifetime of the scope (frontend gone, neither completed nor recovered) from its record, which carries the run identity, and recovers it;
    • operation.lock records its holder (pid and birth); a lock whose holder is gone, or one left without a holder record for over 30 s, is taken over;
    • a down that captured v2 accepts the same attempt gaining its HTTPS lease (v3) before the stop, and waits on the new token.
  4. and 4. Cut: open waiting and the already-running --wait path are back to today's behaviour (own follow-up). Kept for exec and run: the wait pins the run first seen warming (another run ends it, never a stale success), and a success seen after the deadline is a timeout.
  5. The owner polls for a stop before each whole service publication in deferred settlement, and before each per-service and listener inspection of final verification.
  6. A foreground failure after started: log tails and a nonzero exit.
  7. Model: above.

Fix after the first VM run (c2a6132)

The first real-VM run of sc_started_b failed at its cold up -d --wait with provider_busy, recorded holder start. At started, the mapping step called graph inspect --startup-wait, which waits 5 s for the provider lease that the owner holds until ready. The fake invoke in the start tests recorded calls but never modelled the lease, so the suite stayed green. Fixed as above. The start test fixture now refuses every leased command between the started and ready lines. A new test runs the whole chain, with HTTPS, against that lease in both modes, and it fails on 51f6e40. Every other call in the chain is lease-free or local: runtime status, graph observe (exit watcher), graph status (startup status), finalization, admission, the env fingerprint, the down-hook debt and the startup observation. up.after hooks are user commands.

Review fixes (independent Codex review of 4471df9)

  1. A frontend killed after the mapping: the frontend lifetime is registered before the mapping is saved, so down and down --recover find and clean the run (tests for both).
  2. Ready without started under --wait is refused; the owner's started line must carry phase started-observed.
  3. Lease-free reads while warming: log snapshots and the log checks before and after a read use the lease-free status (CLI and Rust).
  4. (Cut in the second round, see above.) open waited only when the target is warming at the first look. It refuses on run replacement or a dead, exited or unhealthy target, and opens only after the goal is met, the publication is verified and the URL answers (bounded).
  5. Readiness in the answers: the started summary counts a job only once it exited 0 and a health goal only once healthy. The second up carries readiness, and a running completion job is warming.
  6. A stop during deferred publication is checked at the top of each settlement round; final verification serves requests between its polls.
  7. A detached failure after started is findable: the receipt field, ps, graph status and the next up, as above.
  8. --wait help text is per backend; restart --wait is described as native only.
  • Model: the AcceptStop split and the new control, above.

Tests

  • Wait helpers: tests/native-start-wait.test.ts covers exec waiting, its budget, a failed start, an unreadable observation, a replaced run, success after the deadline, and the constant.
  • Serve process, in tests/native-project-process.test.ts, in both modes:
    • the flag is passed;
    • without --wait, onReady runs at started and the ready line calls onAllReady;
    • with --wait, onStarted runs before onReady.
  • Start: the mapping, up.after and the release come before all-ready, and the release reports warming. The existing tests run the --wait path, and their expectations say the mapping is saved before the lease.
  • ps: a warming run is never asked for owner-status, and shows warming.
  • Second up: a warming service is not down, a service that exited is, and the JSON carries readiness and services.warming.
  • Exec and one-off: the lease-free status read comes first.
  • Review fixes: the lifetime upgrade (finalization), frontend lost after lifetime and mapping for down and down --recover, ready-without-started refused, log tails after started, the started summary, the failure field in ps. Rust: snapshots_of_a_warming_graph_complete_while_its_owner_holds_the_lease, a_failure_after_started_is_kept_through_cleanup_until_the_next_start, status_reports_a_failure_after_started_without_the_lease.
  • Gap: no unit test sends a stop during deferred settlement. The up-started-b Mac scenario covers it.
  • Rust:
    • run here: a_stop_during_a_publication_takes_effect_after_it, without_follow_the_existing_output_is_the_whole_read, and the --no-follow argument cases;
    • macOS only, compiled under the macOS lint: every_cancellation_check_serves_requests_and_a_stop_cancels and the_start_loop_answers_status_and_holds_a_stop;
    • plus the gate tests for log follow, exec, status and one-off.

Checks

At 7137f3121 (Rust gates run on the final Rust tree; only TypeScript changed after them):

  • Rust 1.97.1 (throwaway container, no network, cargo offline):
    • fmt, and clippy -D warnings on default and all features;
    • full cargo test: default library 1609 pass, all-features library 1813 pass, every target passes;
    • musl check: 0 errors;
    • macOS cross-clippy, plain and with features: pass.
  • TypeScript:
    • root bun run typecheck, bun run check (warnings only) and privacy:check: pass;
    • the touched test files (start, process, observe, down, finalization, detached up, already running, restart, exec, one-off, log follow, exit monitor, budget, start wait, foreground interrupt, runtime backend, project up, agent guidance, and the two guards): 602 pass, 0 fail.
  • Models: all 13 configurations of this model as pinned; the full model runner passed (352 controls).
  • Generated: docs:cli-reference (per-backend --wait help) and generate:agent-plugins (no change).
  • Not run: a VM; the macOS-only Rust tests (the owner serving its transport in the start loop and during final verification, lease-free snapshots); the full JS suite.
  • Lint: no new complexity warnings. Existing ones: nativeProjectPs is 23 (was 21 at base), the start onReady callback 26 (28 in the first round), handleOpen 23.

Notes

  • Size: TypeScript source about 610 lines, against the 700 limit; Rust about 229, against 250.
  • macOS-gated files touched: provider/graph/foreground.rs and its tests, provider/graph/startup/runtime.rs, provider/graph/foreground/transport.rs. They compile under the macOS cross-lint; their tests run on the Mac.
  • Crash points for the started-window harness, with the HACK-2511 note on lease-free exec: handoff eng-a3/up-started-b-notes.md.
  • Compose --wait: hack up -d --wait passes --wait to docker compose up -d. A foreground Compose up --wait and a Compose restart --wait refuse with a usage error rather than ignoring the flag.
  • Not in B:
    • per-service ready lines in the foreground: one All services ready line instead;
    • the authored (hack.yaml) native path: it ignores --wait and keeps returning at ready (PR D);
    • failure after started (PR C, same release).

🤖 Generated with Claude Code

roodboi and others added 30 commits November 22, 2026 09:42
The start loop records AllStarted once every service has started and is
running or has exited 0 (Compose's rule), before Ready and behind the
same deadline and cancellation checks. The graph receipt then moves to a
new phase, started-observed, which remembers its start (fresh, restore or
restart) in started_from, and the phase checks for a start in progress
or a live graph accept it. With the new --report-started flag, graph
serve and serve-restore print graph_foreground_started when that phase
is saved, before the unchanged ready line. The CLI does not pass the
flag yet, so what it sees is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	packages/runtime-core/src/main.rs
… it recoverable

From the lead's review of #1110:
- AllStarted writes the started-observed phase, saves and reports only
  when the owner was asked to report it; without the flag it changes
  nothing on disk;
- cross-boot dead-owner recovery accepts a started run, as same-boot
  recovery and down --recover advice already did;
- the CLI's start-status watcher keeps started-observed snapshots, so a
  timeout after every service started still names the unready service;
- down --recover and the stopped-pool recovery accept a started run;
- the started line is printed once, not again by a redelivery restore;
- HACK_NATIVE_REPORT_STARTED=1 is a test switch for the Mac recovery
  scenario until PR B makes the flag the default;
- restart's text and a misplaced doc comment are corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p without the flag

From the lead's second review of #1110:
- without --report-started the start loop neither checks the extra
  deadline nor records AllStarted, so a ready exactly at the deadline
  still succeeds;
- a started run never published, so across a boot its prior bridge
  generation is proved retired by the stopped restore history when its
  current slots are empty, and recovery no longer refuses it;
- the CLI test switch is removed; tests pass the flag directly;
- the recoverable-phase comment says only a restored run has a mapping
  in the started window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
roodboi and others added 4 commits November 22, 2026 20:18
…iring' into claude-lead/up-started-b-cli

# Conflicts:
#	packages/runtime-core/src/provider/graph/startup.rs
#	packages/runtime-core/src/provider/graph/startup/runtime.rs
…t keeps ready

Native up and restart return once every container has started (Compose's
rule); health checks and routes warm up after, and --wait returns at
ready as before. The owner always reports started: the run mapping is
saved first, in both modes and before the HTTPS lease, so a start killed
in the window can be stopped and recovered. Without --wait the rest of
the ready chain (lease, up.after, exit watcher, down-hook debt, detached
release, closing line) runs at started, and routes are checked when the
owner reports ready.

While a run warms: ps shows warming and never asks the owner; exec and
one-off run wait for ready, bounded; open waits for its service; logs
reads through the lock-free path; the owner accepts a stop between
start passes, after any publication in progress; a second up reports
the warming services. up --json and ps --json carry readiness. Compose
up -d --wait passes --wait through. Owner.tla gains the started phase,
NoReturnWithoutMapping, DownCancelsWait and NoHalfPublicationAfterStop
with their negative controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omplexity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 23, 2026 4:05am UTC

Request Review

@roodboi

roodboi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Ready for lead: 4471df9

PR B, a draft, stacked on #1110 (6021cfb) and #1101 (0df96b8, which contains #1090), merged as 1f17dc3. It lands only after #1101, and in the same release as PR C.

Your decisions, as built:

  • Option 1, the owner answers in the start loop:
    • Stop: accepted at every cancellation check between start passes, with no second lease. It cancels the start, ending in cleanup with data retained, then replies as it does after ready.
    • Status: answered lease-free, with runtime_error: "graph_starting". Every other request gets graph_starting.
    • Worst-case stop delay: one engine call, at most 40 s after a 3 s connect, so about 45 s. This is documented in the code and in COVERAGE.md. Engine calls are not interrupted.
    • During a publication: a stop takes effect after the publication has committed or been withdrawn, never half-way (Rust test, plus NoHalfPublicationAfterStop in the model).
    • Restart: stops through the owner, then resumes.
    • Rust size: about 229 source lines, against the 250 limit.
  • exec and one-off run: wait for ready, bounded by the start budget, with one stderr line, waiting for the project to become ready…. Then they run. A start that fails while they wait exits with that outcome. An observation the wait cannot read decides nothing.
  • Non-follow logs: done with the lease-free path (graph logs-follow --no-follow), not by waiting. With --json the output is line events.
  • ps: never calls owner-status while started-observed. The test makes that call never resolve, so it would hang if ps made it.
  • --wait: passes --report-started too, and saves the mapping at started. The return stays at ready. One model covers both modes.
  • Model:
    • DownCancelsWait now matches the code, and is mapped in COVERAGE.md;
    • new: NoReturnWithoutMapping (your mapping-after-line control, plus a --wait one), down-leaves-owner-waiting (yours), and stop-mid-publication;
    • positive 812 states, wait 394;
    • the Pele chart checkers pass, and I looked at the PNG.
  • Second up with changed config: today's rule for a ready run applies unchanged. It says "already running", names the services still warming, and says configuration changes were not applied, with the hack restart command.
  • --json: readiness: "warming" | "ready", one field in both up --json and ps --json.
  • Q4: one constant, NATIVE_UP_SCRIPTS_WAIT_BY_DEFAULT = false.
  • Docs:
    • the guide's new "Started and ready" section;
    • up.after at started in the guide, the release notes (section 1, for scripts) and the v5 start page;
    • the agent guidance, with the plugin bundle regenerated;
    • cli.md, regenerated for --wait.

One thing beyond what you listed: --wait is now a flag for both backends. On Compose, hack up -d --wait passes it to docker compose up -d. A foreground Compose up --wait, and a Compose restart --wait, refuse with a usage error rather than being silently ignored.

Checks on this head:

  • Rust 1.97.1 (no-network container):
    • fmt; clippy -D warnings, default and all features;
    • full cargo test: default library 1601, all features 1805, every target passes;
    • musl: 0 errors;
    • macOS cross-clippy, plain and with features: pass.
  • TypeScript:
    • root typecheck, bun run check and privacy: pass;
    • 16 touched test files: 481 pass, 0 fail;
    • after the Compose and lint edits: 88 and 55 pass.
  • Models: the full runner passed twice. A third run failed once on global-logging-optin off-removes-volumes, which this PR does not touch: its pinned witness is flaky under two TLC workers (setting = "unset" against the pinned "off"). It needs its own look.
  • Lint: no new warnings. Four existing complexity warnings grew; the PR body lists them.
  • Not run: a VM, the macOS-only Rust tests (the owner serving its transport during the start loop) and the full JS suite.

macOS-gated files touched: provider/graph/foreground.rs (and its tests), provider/graph/startup/runtime.rs, provider/graph/foreground/transport.rs.

Crash points for your started-window harness (P1 to P5, including your two) and the HACK-2511 paragraph on lease-free exec are in handoff/eng-a3/up-started-b-notes.md.

Not in B:

  • per-service ready lines in the foreground: one All services ready · Ns line instead;
  • the authored path, which still returns at ready (PR D);
  • failure after started (PR C).

roodboi and others added 4 commits November 23, 2026 00:14
- Register the frontend lifetime before the run mapping, so a frontend lost
  after the mapping is recovered by down and down --recover; the HTTPS lease
  upgrades the same finalization attempt.
- Refuse a ready line without started-observed under --wait.
- Read logs and their identity checks lease-free while a run warms.
- open waits for a warming target only, refuses a dead or replaced one, and
  opens after the goal, the publication and the URL answer.
- Count jobs and health goals by observation in the started summary; the
  second up reports readiness and waits under --wait.
- Check a stop at every deferred settlement round; serve requests during
  final verification polls.
- Keep a value-free failed_after_started receipt record, shown by graph
  status, ps and the next up.
- Model: split the stop into a queued request and the owner's acceptance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner holds the provider lease from its started line until its ready
line. The started chain asked for it three times: the run mapping's
`graph inspect` (both modes; refused after its 5 s wait, so a cold
`up --wait` failed with provider_busy), the HTTPS owner's acquire check (a
leased inspection of a ready graph) and build-image reclaim (skipped as
busy, so nothing was reclaimed).

- Read the mapping through lease-free `graph status`, retrying a journal
  that moves during the read, bounded.
- A started return takes the HTTPS lease and reclaims build images at the
  owner's ready line; an HTTPS failure there stops the run.
- The start test fixture now refuses every leased command between the
  started and ready lines, and a test runs the whole chain, with HTTPS,
  against it in both modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Keep failed_after_started out of the strict receipt: its own file next
  to it, kept by the owner's cleanup, reported by graph status, removed by
  hack down (new graph clear-failure-after-started), graph cleanup and the
  next start.
- down finds a start that crashed after registering its lifetime and
  before its mapping; operation.lock records its holder and a lock left by
  a gone holder is taken over; a down that captured v2 accepts the same
  attempt gaining its HTTPS lease.
- Cut open waiting and the already-running --wait path back to today's
  behaviour (own follow-up); the exec/run wait pins its run and treats a
  success after the deadline as a timeout.
- The owner polls for a stop before each whole service publication and
  between the inspections of final verification.
- A foreground failure after started prints its log tails and exits
  nonzero.
- Model: the publication guard is on acceptance; frontend cancellation is
  its own action (StoppedFrontendCancelled, stop-before-frontend-cancel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the started line the receipt is started-observed, and the scoped
inspection behind each service's early publication admitted only
preparing and restoring. When a service with a published port and a slow
health check became ready after the started line, its inspection found
nothing and the port was refused (bridge_endpoint_unavailable), ending
the start. The check now uses start_phase(), which sees through
started-observed to the start it belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant