fix(epic): default --discover to parent-child (stop blocks-edge sibling-epic leak)#23
Open
ryanholtschneider2 wants to merge 1 commit into
Open
fix(epic): default --discover to parent-child (stop blocks-edge sibling-epic leak)#23ryanholtschneider2 wants to merge 1 commit into
ryanholtschneider2 wants to merge 1 commit into
Conversation
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
marked this pull request as ready for review
June 14, 2026 19:00
ryanholtschneider2
force-pushed
the
agentic-po-formulas-software-dev-e9s
branch
from
June 14, 2026 19:00
277acbb to
05e6a95
Compare
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.
What
Changes the default
--discovermode forpo run epicandpo run epic-wts(and theepic_wtswrapper) frombothtoparent-child.Fixes po-formulas-software-dev-e9s.
Why
both/depswalkblocksedges up to collect children, so they widen the discovered set across epics. When EpicBblocks-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.blocksis the right edge for the dispatcher to order by, but the wrong edge to widen by.parent-childdiscovery collects children via parent-child edges only;blocksedges are still honoured for topo-ordering within the discovered set (list_subgraphalways builds the blocks sub-DAG regardless oftraverse). Operators who want the old union opt in with--discover both.Changes
parent/po_formulas/epic.py+wts/po_formulas_wts/epic.py: defaultdiscover="parent-child"; new_discover_childrenhelper routingparent-child→list_subgraph(traverse=("parent-child",)); acceptparent-childas a valid discover value alongside coreids/deps/both.wts/po_formulas_wts/epic_wts.py: defaultdiscover="parent-child"(forwarded toepic_run).parent/tests/test_epic_discover_flags.py: default-is-parent-child test, explicitparent-childtest, andboth-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.--discover both.Verification
test_epic_discover_flags.py(incl. 3 new/updated tests) +test_epic_legacy_dot_suffix.py+test_epic_wts.py: green.list_subgraph—discover=bothreturns[A1,A2,B1,B2,EpicB](the leak);discover=parent-childreturns[A1,A2]only. Repro + output saved under the run'sreview-artifacts/.Pre-existing failures (NOT from this change)
Two failures exist on a clean
origin/mainfull-suite run in this degraded dev env (the editableprefect-orchestrationresolves 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 cleanmaintoo.wts/tests/test_pack_skeleton.py(2 tests) — assert cross-pack entry-point coexistence; the isolated single-pack venv has no parent-packpo.formulasentry points.git diff origin/mainconfirmssoftware_dev.pyand the affected test files are byte-identical tomain, so neither failure is attributable to this change.