fix(agent-os): make supervisor hierarchy gap scan O(n) - #3796
Open
mehmet turac (mturac) wants to merge 1 commit into
Open
fix(agent-os): make supervisor hierarchy gap scan O(n)#3796mehmet turac (mturac) wants to merge 1 commit into
mehmet turac (mturac) wants to merge 1 commit into
Conversation
validate_hierarchy walked range(1, max_level+1), so a pathological level like 10**100 hung validation. Derive gaps from sorted registered levels and collapse huge gaps into one summary (microsoft#3788).
mehmet turac (mturac)
requested review from
MohammadHaroonAbuomar and
liamcrumm
as code owners
August 20, 2026 23:04
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
🟡 Contributor Check: MEDIUM
Automated check by AGT Contributor Check. |
PR Review Summary
Verdict: AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SupervisorHierarchy.validate_hierarchy()no longer walksrange(1, max_level + 1).Level N has no registered supervisormessages; huge gaps collapse to one summary so a pathological level like10**100cannot hang validation.Fixes #3788
Test plan
test_hierarchy_gap_scan_reports_missing_middle_levelstest_pathological_supervisor_level_does_not_hang_validation(level=10**100finishes immediately)supervisor.pyconfirmed small-gap messages and sub-millisecond pathological validation