Skip to content

feat: add topological scheduler with Kahn's algorithm#320

Open
Blackgaurd wants to merge 1 commit into04-17-feat_add_dependency_graph_collector_with_range_expansionfrom
04-17-feat_add_topological_scheduler_with_kahn_s_algorithm
Open

feat: add topological scheduler with Kahn's algorithm#320
Blackgaurd wants to merge 1 commit into04-17-feat_add_dependency_graph_collector_with_range_expansionfrom
04-17-feat_add_topological_scheduler_with_kahn_s_algorithm

Conversation

@Blackgaurd
Copy link
Copy Markdown
Collaborator

@Blackgaurd Blackgaurd commented Apr 17, 2026

Summary

  • Add schedule_build() to service/scheduler.py -- Kahn's algorithm that consumes collect_graph() output and produces a BuildPlan
  • Jobs grouped by topological level: level 0 = roots, level N+1 = datasets whose deps all live in levels 0..N
  • Thorough docstrings explaining Kahn's algorithm, why it's chosen over Tarjan's (natural level-order output), and barrier semantics

Test plan

  • 5 new tests: single root, linear chain ordering, diamond levels, lookback ranges in JobDescriptors, independence within levels
  • All 15 scheduler tests pass
  • `just fix` passes
  • `just test` passes

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator Author

Blackgaurd commented Apr 17, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Blackgaurd Blackgaurd force-pushed the 04-17-feat_add_topological_scheduler_with_kahn_s_algorithm branch from 79b2475 to 78ab5ba Compare April 25, 2026 04:24
@Blackgaurd Blackgaurd marked this pull request as ready for review April 25, 2026 04:25
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