Skip to content

decide(dag): 'one live DAG per user goal' is documented as an Invariant but is an unenforced convention #348

Description

@LeXwDeX

Source: docs/audit-dag-deepdive-2026-08-19.md (INV-A, Medium) — needs a product/architecture decision, not immediate code.

Evidence

CONTEXT.md lists "one user goal → at most one live DAG" as an Invariant. Implementation:

  • dag.create (dag.ts:340-434) does not check for an existing live workflow on the session
  • workflow tool start (tool/workflow.ts:607-675) likewise
  • automation lease tolerates multiple DAGs (per-workflow register; owner() returns "any dag"; wake batches aggregate across workflows)
  • no cross-process constraint; crash recovery adopts all running/paused/stepping workflows indiscriminately
  • the only "enforcement" is model guidance (workflow-routing.md:18, orchestration-policy.md:273-277)

Consequence: bounded (wake model tolerates it; goal blocked by "any dag"), but when two live DAGs share one workspace, ADR-0002's three-way-disjoint discipline (delegated to plan discipline) fails completely across workflows.

Options (pick one, eliminate the divergence)

  • (a) engine enforcement: create / tool-start rejects (or warns on) a second live workflow for the session
  • (b) downgrade CONTEXT.md to convention and document the cross-workspace consequence

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions