Skip to content

feat(factory): add explicit cell-driven DAG workflows - #270

Draft
wangtsiao wants to merge 2 commits into
7df-lab:mainfrom
wangtsiao:feat/factory-dag-workflows-20261108
Draft

wangtsiao wants to merge 2 commits into
7df-lab:mainfrom
wangtsiao:feat/factory-dag-workflows-20261108

Conversation

@wangtsiao

@wangtsiao wangtsiao commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the first bounded Factory workflow slice over ordinary RLM children: strict versioned DAG validation, bounded fan-out, all-predecessor joins, output forwarding, fail-fast/continue policies, local status, and retryable stop/cleanup.

Admission is serialized per run. Interrupted or uncertain spawn outcomes retain a unique cleanup target and are never silently retried. Failed cleanup stays visible as stopping. Children waiting for input retain capacity; waiting_for_resume surfaces immediately without replay or an unbounded wait. There are no detached tasks and no new host permissions.

Dependency and deliberate limits

Depends on #272 (subagent collection and lifecycle controls). This PR stays independently reviewable; integrate #272 first, then rerun the combined host workflow tests.

The default adapter requires the subagent-controls rlm.collect implementation and host route. On the current base without its Python API, starting a run fails before spawning a child. The backend interface and tests are independent so this can be reviewed alongside that dependency.

This is an experimental DAG slice, not complete Prime Factory parity. Runs advance only through advance / wait inside an active cell, with explicit enabled=True. No background continuation, restart recovery, persistent harness factory kind, UI, retries, guards, loops, foreach, resident agents, or machine library are claimed. The design and Prime comparison are in docs/factory-workflows.md.

Verification

  • Factory validation, scheduler, and adapter tests: 22 passed.
  • Entire Python runtime suite with dill 0.4.1: 99 tests run: 96 passed, 3 platform-specific skips.
  • CI scope tests: 9 passed.
  • git diff --check: passed.
  • Combined real CPython → production host → three child sessions diamond smoke: passed (1/1), using Factory d2a2ca8 plus feat(rlm): complete subagent controls and independent root sessions #272 at 05495fc. Verified both predecessor outputs in the review child prompt, joined output, idempotent stop, and graceful parent end-turn with no extra model call. Provider responses were scripted/offline; no paid-model test is claimed.
  • Exact-head CI and Runtime bundles: all successful.

No merge or deployment is requested by this draft.

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