Skip to content

feat(engine): deferred review injection — lazy promotion when slots idle (fixes #491)#495

Open
mickume wants to merge 1 commit intodevelopfrom
feat/issue-491-deferred-review-injection
Open

feat(engine): deferred review injection — lazy promotion when slots idle (fixes #491)#495
mickume wants to merge 1 commit intodevelopfrom
feat/issue-491-deferred-review-injection

Conversation

@mickume
Copy link
Copy Markdown
Contributor

@mickume mickume commented Apr 20, 2026

Summary

Introduces a deferred node status to eliminate the review flood at sync barriers. Review nodes whose coder dependencies are already completed are injected as deferred instead of pending, and only promoted to pending when no coder candidates are available — ensuring implementation work is always prioritized over review work.

Closes #491

Changes

File Change
agent_fox/graph/types.py Added DEFERRED = "deferred" to NodeStatus enum
agent_fox/engine/graph_sync.py Added promote_deferred(limit) method; updated is_stalled() to account for promotable deferred nodes
agent_fox/engine/engine.py Added _defer_ready_reviews() helper called at init and hot-load; promotion logic in main dispatch loop and parallel refill path
tests/unit/engine/test_sync.py Tests for promote_deferred() and deferred-aware stall detection
tests/unit/engine/test_deferred_reviews.py Tests for _defer_ready_reviews(), auto_pre exemption, full lifecycle integration

Tests

  • test_sync.py: promote limit/skip/lifecycle, deferred stall detection (8 new tests)
  • test_deferred_reviews.py: deferred injection for verifier/reviewer/audit-review, auto_pre exemption, coder exemption, promotion integration (7 new tests)

Verification

  • All existing tests pass: ✅ (5076 passed)
  • New tests pass: ✅ (15 new)
  • Linter / formatter: ✅
  • No regressions: ✅

Auto-generated by af-fix.

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