feat(runtime): bound active child executions per session - #617
Open
outlier27-cell wants to merge 3 commits into
Open
outlier27-cell wants to merge 3 commits into
outlier27-cell wants to merge 3 commits into
Conversation
8 tasks
This branch has not been deployed
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.
Problem
Relates to #159. A top-level Pi Session can currently combine each Workflow run's local concurrency with Direct Subagent and BTW pools, without one truthful limit on simultaneously active child model-session executions. This first implementation phase deliberately excludes Background Terminal and non-model resource accounting.
Value
An operator can explicitly bound active Workflow, Direct Subagent, and BTW child executions for one top-level Pi Session without weakening each entry point's existing lifecycle, permissions, local limits, or result delivery. The default remains unchanged when unconfigured.
Approach
childExecutions.maxActive(1-64) through/openpi-setup, status, documentation, validation, TUI, and the Web capability projection. The default is disabled; enabling during active work accounts for existing attempts and rejects a lower-than-held limit.Validation
bun.cmd test tests/extensions/shared/child-execution-admission.test.ts tests/extensions/subagents/manager.test.ts tests/extensions/workflows/controller.test.ts— 36 passed.bun.cmd test tests/extensions/setup/index.test.ts tests/extensions/suggestions/config.test.ts— 46 passed.bun.cmd x vitest run tests/web/subagent-panel.spec.ts— 17 passed.bun.cmd run check— passed (config/docs contracts, discipline ledger, Web build, format, lint, and typecheck).git diff --check— passed.bun.cmd run testwas started but did not complete locally: it reached pre-existing real-Pitests/extensions/post-edit/lifecycle.test.tstimeouts/failures and then stopped making progress. Those files are outside this diff; this PR does not report the full suite as green.Impact
/openpi-setupsetting and aggregate TUI/Web slot status; no queued task text is exposed.childExecutions.maxActive; omitted/invalid/old configurations retain unbounded historical behavior.