Skip to content

feat(graph): implement round-based topological sort#201

Merged
skevetter merged 1 commit into
mainfrom
devsy-031-round-sort
May 4, 2026
Merged

feat(graph): implement round-based topological sort#201
skevetter merged 1 commit into
mainfrom
devsy-031-round-sort

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Replaces the sortNodeIDs() single-queue Kahn's algorithm with a round-based topological sort. Each round collects all nodes with in-degree 0, sorts them alphabetically within the round, appends them to the result, then decrements neighbors' in-degrees. This groups nodes at the same dependency depth together rather than interleaving them via global alphabetical ordering.

Adds two new test cases verifying round-based behavior: a simple 3-node case (A→B + standalone C produces [A, C, B]) and a multi-level case with a shared sink node.

Replace sortNodeIDs() single-queue Kahn's algorithm with round-based
collection. Each round gathers all zero-in-degree nodes, sorts them
alphabetically within the round, then advances. This ensures nodes at
the same dependency depth are grouped together rather than being
interleaved with deeper nodes via global alphabetical ordering.
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 486f49f
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/69f86842185dc300088d8500

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@skevetter has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 51 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 555023b6-88a5-4cf4-9ffd-0f619817622e

📥 Commits

Reviewing files that changed from the base of the PR and between 7af1be2 and 486f49f.

📒 Files selected for processing (2)
  • pkg/devcontainer/graph/graph.go
  • pkg/devcontainer/graph/graph_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 21 minutes and 51 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/m label May 4, 2026
@skevetter
skevetter marked this pull request as ready for review May 4, 2026 09:41
@skevetter
skevetter enabled auto-merge (squash) May 4, 2026 09:41
@skevetter
skevetter merged commit 7ddcfca into main May 4, 2026
53 of 54 checks passed
@skevetter
skevetter deleted the devsy-031-round-sort branch May 4, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant