Skip to content

fix: mark local runner execs as placement-resolved (#8115) - #8124

Merged
chubes4 merged 1 commit into
mainfrom
fix/8115-wp-codebox-ready-check-recursion
Jul 14, 2026
Merged

fix: mark local runner execs as placement-resolved (#8115)#8124
chubes4 merged 1 commit into
mainfrom
fix/8115-wp-codebox-ready-check-recursion

Conversation

@chubes4

@chubes4 chubes4 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes the recursive process-spawn storm when inspecting/checking the wp-codebox component (bug: WP Codebox component inspection recursively spawns runtime checks #8115), where homeboy component show / extension show and check-wp-codebox-runtime-core.mjs spawn each other unbounded and saturate the host.
  • Root cause: prepare_runner_process only stamped the dispatch-only placement markers (HOMEBOY_RUNNER_HOSTED_EXEC, HOMEBOY_RUNNER_PLACEMENT_RESOLVED, HOMEBOY_RUNNER_ID) for non-local runners (runner.kind != RunnerKind::Local). Unify resource-aware execution placement #7998 introduced the placement-resolved marker + explicit --placement but left the local gap.
  • Consequence: nested Homeboy subprocesses spawned during a local exec (extension parity preflight extension show, extension materialization, and the WP Codebox ready_check) never saw that placement was already resolved. Carrying an explicit --placement, they re-entered route_after_parse and re-dispatched — recursively spawning component/extension inspection plus the ready_check.

Fix

  • Stamp the three placement markers in the local branch of prepare_runner_process, matching the already-correct daemon-local path (which documents the same "keep out of argv so nested Homeboy commands do not route themselves a second time" intent). Nested commands now detect the resolved placement via is_managed_runner_placement_context() and short-circuit routing instead of recursing.

Investigation notes

  • Confirmed the extension side is clean: check-wp-codebox-runtime-core.mjs is a pure import() and the only homeboy component show call in homeboy-extensions (validation-dependencies.sh) is cycle-guarded and only reached from lint/audit/test/bench — never the ready_check or component show.
  • Bounded local repro (forced-failing ready_check) showed the plain runner exec path already fails fast without looping; the loop requires the explicit---placement + missing-local-marker combination introduced by Unify resource-aware execution placement #7998.

Testing

  • cargo fmt --check clean.
  • Updated local_runner_prep_marks_placement_as_resolved (formerly local_runner_prep_does_not_mark_commands_as_runner_hosted, which encoded the buggy behavior) to assert the markers are now present. Heavier cargo build/cargo test deferred to CI per repo build policy.

Closes #8115

Local runner execs never stamped the dispatch-only placement markers
(HOMEBOY_RUNNER_HOSTED_EXEC / HOMEBOY_RUNNER_PLACEMENT_RESOLVED /
HOMEBOY_RUNNER_ID) because prepare_runner_process gated them behind
`runner.kind != RunnerKind::Local`. #7998 added the placement-resolved
marker and explicit `--placement` but kept the local gap.

As a result, nested Homeboy subprocesses spawned during a local exec
(extension parity preflight `extension show`, extension materialization,
and the WP Codebox extension ready_check) did not recognize that
placement was already resolved. Carrying an explicit `--placement`, they
re-entered routing and re-dispatched, recursively spawning
`homeboy component show` / `extension show` plus
`check-wp-codebox-runtime-core.mjs` and saturating the host.

Stamp the markers for local execs too, matching the daemon-local path,
so nested commands short-circuit routing instead of recursing.
@chubes4
chubes4 merged commit 870ea8d into main Jul 14, 2026
2 of 3 checks passed
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.

bug: WP Codebox component inspection recursively spawns runtime checks

1 participant