feat(agentic-epic/graph): same-scope epic de-dup + child in-flight guard [po-formulas-software-dev-2eb]#41
Open
ryanholtschneider2 wants to merge 1 commit into
Open
Conversation
…ard [po-formulas-software-dev-2eb]
Two hardening items from the soloco-kol8q runaway incident:
1. Same-scope epic de-dup (agentic_epic.py):
- _scope_fingerprint(): sha1 of first 400 chars of normalized goal text
- _acquire_scope_guard(): writes a rig-level sentinel file; returns
conflicting epic_id if another in-progress epic holds the same scope
- _release_scope_guard(): removes the sentinel on flow exit (finally block)
- agentic_epic flow: checks the guard before decomposition; returns
skipped-same-scope when a duplicate fan-out would happen
- force_replan=True and dry_run bypass the guard (deliberate re-runs)
2. graph_run child-level in-flight guard (graph.py):
- _live_flow_run_count(): queries Prefect for Running flow runs tagged
with issue_id:<id>; returns 0 on error (graceful degradation)
- _child_is_in_flight(): two-stage check — bead status then Prefect query
- _dispatch_nodes(): skips any child that is in_progress + has a live
flow run; adds it to the skipped dict with an 'already in-flight' reason
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.
Two hardening items from the soloco-kol8q runaway incident:
Same-scope epic de-dup (agentic_epic.py):
conflicting epic_id if another in-progress epic holds the same scope
skipped-same-scope when a duplicate fan-out would happen
graph_run child-level in-flight guard (graph.py):
with issue_id:; returns 0 on error (graceful degradation)
flow run; adds it to the skipped dict with an 'already in-flight' reason