fix: mark local runner execs as placement-resolved (#8115) - #8124
Merged
Conversation
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.
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
wp-codeboxcomponent (bug: WP Codebox component inspection recursively spawns runtime checks #8115), wherehomeboy component show/extension showandcheck-wp-codebox-runtime-core.mjsspawn each other unbounded and saturate the host.prepare_runner_processonly 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--placementbut left the local gap.extension show, extension materialization, and the WP Codebox ready_check) never saw that placement was already resolved. Carrying an explicit--placement, they re-enteredroute_after_parseand re-dispatched — recursively spawning component/extension inspection plus the ready_check.Fix
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 viais_managed_runner_placement_context()and short-circuit routing instead of recursing.Investigation notes
check-wp-codebox-runtime-core.mjsis a pureimport()and the onlyhomeboy component showcall in homeboy-extensions (validation-dependencies.sh) is cycle-guarded and only reached from lint/audit/test/bench — never the ready_check orcomponent show.runner execpath 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 --checkclean.local_runner_prep_marks_placement_as_resolved(formerlylocal_runner_prep_does_not_mark_commands_as_runner_hosted, which encoded the buggy behavior) to assert the markers are now present. Heaviercargo build/cargo testdeferred to CI per repo build policy.Closes #8115