Skip to content

Auto-refine loop for structure planner to reach coverage/dependency requirements#357

Open
zhongkaifu wants to merge 5 commits intomainfrom
codex/investigate-finalize_workflow-warning
Open

Auto-refine loop for structure planner to reach coverage/dependency requirements#357
zhongkaifu wants to merge 5 commits intomainfrom
codex/investigate-finalize_workflow-warning

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • The structure planner returned a skeleton even when finalize_workflow indicated more work was needed, causing misleading WARN messages and stopping further refinement.
  • The goal is to automatically continue planning rounds until coverage passes, there are no nodes without upstream, and ready=True, within configured retry limits.

Description

  • Track finalize feedback and nodes missing upstream by adding latest_finalize_feedback and latest_nodes_without_upstream and expose them from finalize_workflow.
  • Introduce _run_agent helper and an auto-refine while loop that reruns the Agent with feedback, bounded by max_coverage_refine_rounds and max_dependency_refine_rounds.
  • Update the planner to append system feedback to run_input, increment refinement counters, and log auto-refine rounds via log_info.
  • Clarify warning messages when finalize_workflow was never called versus when coverage/dependency checks failed and prepare the skeleton only after refinement stops.

Testing

  • No automated tests were executed for this change.
  • Static searches (rg/sed) were used during development to locate related logic and verify edits, but these are not automated tests.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant