Skip to content

feat(runtime): manage member-authored child runs - #244

Merged
KaiEureka merged 17 commits into
mainfrom
codex/compose-authored-isolation
Oct 24, 2026
Merged

KaiEureka merged 17 commits into
mainfrom
codex/compose-authored-isolation

Conversation

@KaiEureka

@KaiEureka KaiEureka commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Adds manage_workflow for Team members that write their own Workflow source and execute it in their current environment. The tool provides launch, status, wait, stop and result operations, owns child lifetime and reconciles usage with the parent's available budget. Registered run_workflow calls retain their existing interface.

A private owned bridge connects the member's Python process to the configured host model and environment providers. This allows a member in a network-isolated container to run a new Workflow with independently isolated workers, while the host retains Docker control. Model configuration travels through stdin. Native child session records and results are saved before temporary control files and environments are reclaimed.

The implementation reuses the existing Environment, Workflow runtime, model client, request admission, cancellation and environment-pool operations. Independent review repaired internal structured-output permissions, shared budget reservations, native model metadata forwarding, concurrent file-edit ownership and cancellation accounting. Child process cancellation is separate from result and artifact persistence. Pending requests use a small index and separate payload files so several ordinary prompts do not exhaust the environment's per-file read limit.

Functional validation uses real Docker containers and loopback model servers, including completion, cancellation, late usage, model identity and retained artifacts. The final production tree passed all 13 native Docker and bridge checks, and the 69 applicable compatibility and authored-run checks passed. The default invocation skips one explicitly opt-in Docker case, which was exercised with the Docker environment enabled. The offline example also ran from a built wheel outside the checkout. Ruff, import-linter, deptry, translation checks and the proposed-commit secret scan pass. The final merge review also exercised native completion and cancellation while an unrelated container was removed. Cleanup assertions follow this run's owned container IDs, preserving leak detection alongside other Docker consumers. All final-head GitHub checks pass across Python 3.10–3.14. The Python 3.12 suite completed 9,960 passing tests with 53 skips.

An executable offline example is included at examples/member-authored-workflow/. This is the fourth part of the runtime feature series, building on #243.

@KaiEureka
KaiEureka force-pushed the codex/compose-authored-isolation branch from 936f419 to 683968c Compare October 24, 2026 05:40
Base automatically changed from codex/shared-model-routing to main October 24, 2026 06:33
@KaiEureka
KaiEureka merged commit db82b2b into main Oct 24, 2026
14 checks passed
@KaiEureka
KaiEureka deleted the codex/compose-authored-isolation branch October 24, 2026 06:34
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.

1 participant