Skip to content

feat(engine): three-tier priority scheduling — coders before reviews (fixes #490)#496

Open
mickume wants to merge 1 commit intodevelopfrom
fix/issue-490-priority-scheduling-coder-before-reviews
Open

feat(engine): three-tier priority scheduling — coders before reviews (fixes #490)#496
mickume wants to merge 1 commit intodevelopfrom
fix/issue-490-priority-scheduling-coder-before-reviews

Conversation

@mickume
Copy link
Copy Markdown
Contributor

@mickume mickume commented Apr 20, 2026

Summary

Adds three-tier archetype-aware scheduling to _interleave_by_spec() so ready tasks are ordered: (1) auto_pre reviews, (2) coder nodes, (3) non-auto_pre review nodes. This ensures implementation work is preferred when filling pool slots, complementing the review concurrency cap from #489.

Closes #490

Changes

File Change
agent_fox/engine/graph_sync.py Added optional node_archetypes parameter to GraphSync and _interleave_by_spec(). Splits the regular tier into coder and review sub-tiers.
agent_fox/engine/engine.py Passes node_archetypes from graph.nodes at both GraphSync construction sites.
tests/unit/engine/test_spec_fair_scheduling.py 10 new tests in TestThreeTierPriority (8) and TestThreeTierGraphSyncIntegration (2).

Tests

  • Coders-before-reviews ordering
  • Full three-tier ordering (pre-review → coders → reviews)
  • Verifier placement in review tier
  • Multiple review archetypes in tier 3
  • Backward compatibility without archetypes
  • Duration hints within tiers
  • Cross-spec round-robin within coder tier
  • Unknown archetype defaults to coder tier
  • GraphSync integration with/without archetypes

Verification

  • All existing tests pass: ✅ (2 pre-existing failures unrelated)
  • New tests pass: ✅ (10/10)
  • Linter / formatter: ✅
  • No regressions: ✅

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