Repository navigation
fix(executor): nested aster joins the ancestor's execution directory - #237
Merged
Merged
Conversation
A nested aster in a sandbox with a different HOME recomputed the host execution directory and failed every target in 0 ms with 'nested execution cannot change ASTER_EXECUTION_DIR'. The inherited ASTER_EXECUTION_CONTEXT now decides the directory, and a nested job count no longer conflicts with the active capacity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Review on ArchCode
Problem and author intent
A test fixture that runs
asteron a temp workspace from inside a target (nested aster) failed//calc:lintand//calc:testin 0 ms in firstlanding CI on 0.29.0. Intent: nested runs work whatever HOME or job count the nested process has.Failure story:
//:nestedand exportsASTER_EXECUTION_CONTEXT(family dir under<host dir>/family-*).aster run ...with a differentHOME(the e2e contract sandbox sets one). NoASTER_EXECUTION_DIRis set in CI, so the default$HOME/.cache/aster/execution-v1is recomputed.Host::configured()finds the inherited family's parent differs from that directory and bails withnested execution cannot change ASTER_EXECUTION_DIR.runner.rsturns that into a failure for every target,duration_ms: 0,Execution admission: .... Reproduced with--jsonon the nested run.Same class: a nested
ASTER_JOBS/--jobsdiffering from the active capacity hit the "host execution capacity is N while another invocation is active" error, although a nested run never takes a slot.What changed
src/executor/admission.rs: parse the inherited context first. When present, the host directory isfamily.directory.parent()(authoritative), ignoring the nested process'sHOMEandASTER_EXECUTION_DIR. A requested job count only conflicts for non-nested invocations.tests/execution_capacity.rs::nested_workspace_with_its_own_home_and_jobs_runs_its_targets.Unchanged: nesting still borrows the ancestor's slot, resource ordering rules, cancellation.
Scope
Backend only (executor admission).
Risk
Low. Only the nested path changes (when
ASTER_EXECUTION_CONTEXTis set). Fresh invocations are unchanged. A forged/stale context still fails on the owner-lock check inacquire.User impact
Nested aster in sandboxed HOME works instead of failing in 0 ms. Other
ASTER_*vars (report dir, remote cache, run id) were checked as the original hypothesis but were not the cause; no change to them.Testing
tests/execution_capacity.rs::nested_workspace_with_its_own_home_and_jobs_runs_its_targets. Real CLI binary, outer aster runs a target that execs the same binary on a second workspace with another HOME andASTER_JOBS; asserts both nested targets pass. Fails on main with the 0 ms error, passes now.cargo fmt,cargo clippy --all-targets -- -D warnings,cargo testall pass locally. CI:.github/workflows/ci.ymlon PRs.Follow-ups
ASTER_*, trivial lint target) can be reverted after this is released.🤖 Generated with Claude Code