Extend CLI batch execution - #4769
Merged
Merged
Conversation
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
{"command":"...","args":[...]}) alongside the existing string-array form.Root cause
The batch runner only accepted string arrays, used fixed workload budgets, and executed every item serially. Its original Console capture model was process-global, so it could not safely support concurrent child commands. The first parallel implementation also filled an entire worker window before starting work, which could deadlock request/response stdin producers.
Impact
Existing serial behavior remains the default. Parallel execution is limited to the read-only batch allowlist, requires
--json-summary, uses bounded concurrency (maximum 16), and emits completed records in input order without waiting for a full window or EOF. Malformed records and command failures remain isolated and contribute to the final summary/exit status.Validation
make lintdotnet build CodeIndex.sln -c Release --no-restore(0 warnings, 0 errors)dotnet run --project tools/CodeIndex.Changelog -- checkorigin/main: 332/332 passed on net8.0 and 332/332 passed on net9.0cdidx status --check --jsonreported a fresh matching index with no failed checksA full solution test attempt earlier in the task did not complete in the shared host: the dual-TFM run ended with substrate exit 143 after 26 minutes without a reported failure, and the standard net8.0 run hit the unrelated existing Issue4592 watch-readiness timeout under heavy load. That test passed 1/1 when rerun in isolation; the final affected scope above is green on both TFMs.
Documentation and changelog
USER_GUIDE.md, plus the matching developer/testing guidance.changelog.d/unreleased/4723.added.md.CHANGELOG.md,AGENTS.md,CLAUDE.md, orAGENT_GUIDE.md.Fixes #4723