Fallback when region_order is unsatisfiable for lvl2 assembly and add warning#79
Conversation
…mention-issue-11]-implement-lvl2-assembly-stage-and
cb661e7
into
codex/implement-lvl2-assembly-stage
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06e8290bfc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| constraints=constraints, | ||
| ) | ||
| warning_logs: list[str] = [] | ||
| if route_selection.selected is None and constraints.get("region_order"): |
There was a problem hiding this comment.
Handle empty region_order in fallback check
The new fallback only runs when constraints.get("region_order") is truthy, so a provided but empty region_order ([]) skips the relaxed retry and still returns BLOCKED even when a compatible route exists without ordering constraints. Since this commit’s behavior change is to recover from unsatisfiable region_order values, the empty-list case is an unsatisfied constraint that should also trigger the fallback path and warning.
Useful? React with 👍 / 👎.
Motivation
region_orderconstraint cannot be satisfied by trying a relaxed search and continuing if a compatible route exists.Description
CompatibilitySelectorreturns no route due toregion_order, attempt a second selection without theregion_orderconstraint and proceed if that returns a route, collecting a warning inwarning_logswhen this fallback is used.warning_logsin the returnedStageResultlogs for blocked, missing-input, and success outcomes so the user is informed of the relaxed ordering decision.region_orderspecially in_extract_region_identitiesso region identities are discovered from constraints or the module definition consistently.test_assembly_lvl2_incomplete_region_order_falls_back_with_warningto verify the fallback occurs and a warning is emitted.Testing
tests/unit/stages/test_assembly_lvl2.pyincluding the newtest_assembly_lvl2_incomplete_region_order_falls_back_with_warningtest, and they all passed.Codex Task