Skip to content

feat: enhance workflow management with cycle detection and audit logging#4467

Open
nikunjkumar05 wants to merge 1 commit into
orchestration-agent:mainfrom
nikunjkumar05:main
Open

feat: enhance workflow management with cycle detection and audit logging#4467
nikunjkumar05 wants to merge 1 commit into
orchestration-agent:mainfrom
nikunjkumar05:main

Conversation

@nikunjkumar05
Copy link
Copy Markdown

Fix #4462

Summary

Fixes runtime workflow graph expansion validation before workflow execution begins.

Changes

  • Added workflow transition tracking and a WorkflowGraphExpander.
  • Rejects invalid runtime graph transitions before lifecycle state changes.
  • Detects duplicate transitions, unknown step transitions, self-cycles, and graph cycles.
  • Preserves workflow and step lifecycle state when invalid expansion is rejected.
  • Records redacted audit decisions and graph expansion metrics.
  • Added deterministic regression tests for cyclic runtime expansion rejection and valid execution.
  • Avoided eager package imports that pulled in platform-specific modules during test/import discovery.

Verification

  • python -m compileall src tests passed.
  • Import smoke check passed for workflow, scheduler, engine, agent, and orchestrator modules.
  • Manual regression smoke checks passed for:
    • cyclic graph rejection before execution
    • lifecycle state preservation
    • redacted audit/log decision
    • valid graph execution
    • scheduler priority behavior

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.

[ Bounty $4k ] [ Workflow ] Detect cycles in dynamic edges — runtime plan expansion

1 participant