Fix: OrchProgramManager stores programs in reversed order - #121
Open
MohamedRady-99 wants to merge 2 commits into
Open
Fix: OrchProgramManager stores programs in reversed order#121MohamedRady-99 wants to merge 2 commits into
MohamedRady-99 wants to merge 2 commits into
Conversation
MohamedRady-99
requested review from
PandaeDo,
qor-lb and
vinodreddy-g
as code owners
July 30, 2026 10:35
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 10:35 — with
GitHub Actions
Waiting
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 10:35 — with
GitHub Actions
Waiting
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
MohamedRady-99
force-pushed
the
fix/program-order-reversed
branch
from
July 30, 2026 10:42
6137b6d to
a6897de
Compare
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 10:42 — with
GitHub Actions
Waiting
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 10:42 — with
GitHub Actions
Waiting
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 11:17 — with
GitHub Actions
Waiting
MohamedRady-99
requested a deployment
to
workflow-approval
July 30, 2026 11:17 — with
GitHub Actions
Waiting
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.
Notes for Reviewer
This PR resolves the issue with
OrchProgramManagerstoring programs in reversed order by fixing how designs and programs are drained from their internal storage #60.Since
Design::into_programs()andOrchestrationApi::into_program_manager()both consumed their internalGrowableVecwithpop(), which removes from the end (LIFO), programs and designs ended up in the reverse of the order they were added, silently breaking any code that relies onadd_program/add_designinsertion order.Proposal:
Currently,
into_programs()andinto_program_manager()pop elements off the end of theirGrowableVec, reversing the original insertion order. This PR updates the drain logic as follows:Fix Program Order: Change
Design::into_programs()to drain viaremove(0)instead ofpop(), so programs come out in the order they were added.Fix Design Order: Apply the same fix to
OrchestrationApi::into_program_manager()for the designs vector.Add Regression Test: Add
into_programs_preserves_insertion_order, which registers three programs and asserts they are returned in the same order they were added.Pre-Review Checklist for the PR Author
Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #60