Skip to content

perf(engine): prioritize pre-review scheduling for critical-path specs (fixes #476)#494

Open
mickume wants to merge 1 commit intodevelopfrom
fix/issue-476-pre-review-scheduling-priority
Open

perf(engine): prioritize pre-review scheduling for critical-path specs (fixes #476)#494
mickume wants to merge 1 commit intodevelopfrom
fix/issue-476-pre-review-scheduling-priority

Conversation

@mickume
Copy link
Copy Markdown
Contributor

@mickume mickume commented Apr 20, 2026

Summary

  • Exempt reviewer:pre-review nodes from cross-spec dependency propagation so they run immediately at start rather than waiting for upstream specs to complete
  • Add two-tier priority scheduling: auto_pre nodes (group 0) run before coder nodes, sorted by spec fan-out descending so critical-path specs surface blockers first
  • Add _compute_spec_fan_out() to GraphSync for fan-out-weighted ordering

Closes #476

Changes

File Change
agent_fox/graph/builder.py Skip cross-spec dep propagation for reviewer:pre-review nodes
agent_fox/engine/graph_sync.py Two-tier scheduling with _is_auto_pre, _spec_round_robin, _compute_spec_fan_out
tests/unit/engine/test_spec_fair_scheduling.py 14 new tests for pre-review priority, fan-out, integration
tests/unit/graph/test_builder.py Updated cross-spec propagation tests
tests/property/engine/test_spec_fair_scheduling_props.py Updated property tests for tiered invariants

Tests

  • 14 new unit tests: pre-review priority ordering, fan-out ordering, _is_auto_pre detection, spec fan-out computation, ready_tasks integration
  • 3 updated builder tests: pre-review exemption, drift-review still propagated
  • 3 updated property tests: fairness, spec order, and duration ordering checked per-tier

Verification

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

Auto-generated by af-fix.

fixes #476)

Two changes to surface blocking issues earlier:

1. Exempt reviewer:pre-review nodes from cross-spec dependency propagation
   in the graph builder. Pre-reviews validate spec content, not upstream
   implementation, so they can run before upstream specs complete.

2. Add two-tier priority scheduling in _interleave_by_spec: auto_pre nodes
   (group 0) run before coder nodes, sorted by spec fan-out descending so
   high-impact specs surface blockers first.
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