Skip to content

fix(epic): default --discover to parent-child (stop blocks-edge sibling-epic leak)#23

Open
ryanholtschneider2 wants to merge 1 commit into
mainfrom
agentic-po-formulas-software-dev-e9s
Open

fix(epic): default --discover to parent-child (stop blocks-edge sibling-epic leak)#23
ryanholtschneider2 wants to merge 1 commit into
mainfrom
agentic-po-formulas-software-dev-e9s

Conversation

@ryanholtschneider2

Copy link
Copy Markdown
Owner

What

Changes the default --discover mode for po run epic and po run epic-wts (and the epic_wts wrapper) from both to parent-child.

Fixes po-formulas-software-dev-e9s.

Why

both/deps walk blocks edges up to collect children, so they widen the discovered set across epics. When EpicB blocks-depends on EpicA, dispatching EpicA discovered EpicB + all of EpicB's children and ran them in parallel — inverting the dependency. The CDR-A/CDR-B incident in the issue discovered 15 nodes for a 7-child epic.

blocks is the right edge for the dispatcher to order by, but the wrong edge to widen by. parent-child discovery collects children via parent-child edges only; blocks edges are still honoured for topo-ordering within the discovered set (list_subgraph always builds the blocks sub-DAG regardless of traverse). Operators who want the old union opt in with --discover both.

Changes

  • parent/po_formulas/epic.py + wts/po_formulas_wts/epic.py: default discover="parent-child"; new _discover_children helper routing parent-childlist_subgraph(traverse=("parent-child",)); accept parent-child as a valid discover value alongside core ids/deps/both.
  • wts/po_formulas_wts/epic_wts.py: default discover="parent-child" (forwarded to epic_run).
  • parent/tests/test_epic_discover_flags.py: default-is-parent-child test, explicit parent-child test, and both-opts-into-union test (replaces the old default-is-both test).
  • parent/README.md + wts/README.md: discovery-modes table + default updated, with a callout explaining the leak.

Acceptance (issue)

  • po run epic --epic-id <X> discovers only parent-child children by default.
  • Operators wanting the blocks-aware union opt in via --discover both.
  • Docs updated.

Verification

  • test_epic_discover_flags.py (incl. 3 new/updated tests) + test_epic_legacy_dot_suffix.py + test_epic_wts.py: green.
  • Close-the-loop: reproduced the CDR-A/CDR-B incident against the real core list_subgraphdiscover=both returns [A1,A2,B1,B2,EpicB] (the leak); discover=parent-child returns [A1,A2] only. Repro + output saved under the run's review-artifacts/.

Pre-existing failures (NOT from this change)

Two failures exist on a clean origin/main full-suite run in this degraded dev env (the editable prefect-orchestration resolves to a stale stub; the formula packs aren't EP-installed in the shared venv):

  • parent/tests/test_software_dev_pack_path_metadata.py::test_bd_metadata_overrides_rig_path_default — test-ordering pollution; passes standalone, fails in full suite on clean main too.
  • wts/tests/test_pack_skeleton.py (2 tests) — assert cross-pack entry-point coexistence; the isolated single-pack venv has no parent-pack po.formulas entry points.

git diff origin/main confirms software_dev.py and the affected test files are byte-identical to main, so neither failure is attributable to this change.

po run epic / epic-wts defaulted to --discover=both, which walks both
parent-child AND blocks edges UP to collect children. When EpicB
blocks-depends on EpicA, dispatching EpicA discovered EpicB + all of
EpicB's children and ran them in parallel — inverting the intended
dependency (the CDR-A/CDR-B incident: 15 nodes discovered for a 7-child
epic).

Default discover for epic_run (parent + wts) and epic_wts is now
'parent-child': collect children via parent-child edges only. blocks
edges are still honoured for topo-ordering WITHIN the discovered set
(list_subgraph always builds the blocks sub-DAG regardless of traverse),
they just no longer WIDEN it. Operators wanting the union opt in with
--discover both. parent-child is added as a valid discover value
alongside the core ids/deps/both modes.

Adds a _discover_children helper (routes parent-child -> list_subgraph
with traverse=('parent-child',)), updates discover tests (default is now
parent-child; both still opts into the union), and refreshes both READMEs.

Refs po-formulas-software-dev-e9s
@ryanholtschneider2
ryanholtschneider2 marked this pull request as ready for review June 14, 2026 19:00
@ryanholtschneider2
ryanholtschneider2 force-pushed the agentic-po-formulas-software-dev-e9s branch from 277acbb to 05e6a95 Compare June 14, 2026 19:00
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