Skip to content

Fallback when region_order is unsatisfiable for lvl2 assembly and add warning#79

Merged
Gonza10V merged 2 commits into
codex/implement-lvl2-assembly-stagefrom
codex/github-mention-issue-11]-implement-lvl2-assembly-stage-and
May 6, 2026
Merged

Fallback when region_order is unsatisfiable for lvl2 assembly and add warning#79
Gonza10V merged 2 commits into
codex/implement-lvl2-assembly-stagefrom
codex/github-mention-issue-11]-implement-lvl2-assembly-stage-and

Conversation

@Gonza10V
Copy link
Copy Markdown
Contributor

@Gonza10V Gonza10V commented May 6, 2026

Motivation

  • Make lvl2 assembly more robust when a provided region_order constraint cannot be satisfied by trying a relaxed search and continuing if a compatible route exists.

Description

  • If CompatibilitySelector returns no route due to region_order, attempt a second selection without the region_order constraint and proceed if that returns a route, collecting a warning in warning_logs when this fallback is used.
  • Include warning_logs in the returned StageResult logs for blocked, missing-input, and success outcomes so the user is informed of the relaxed ordering decision.
  • Stop treating region_order specially in _extract_region_identities so region identities are discovered from constraints or the module definition consistently.
  • Add unit test test_assembly_lvl2_incomplete_region_order_falls_back_with_warning to verify the fallback occurs and a warning is emitted.

Testing

  • Ran the lvl2 assembly unit tests in tests/unit/stages/test_assembly_lvl2.py including the new test_assembly_lvl2_incomplete_region_order_falls_back_with_warning test, and they all passed.
  • The new test asserts that the stage succeeds, a route is selected, and a warning containing "Unable to satisfy region_order constraint" appears in the logs.

Codex Task

…mention-issue-11]-implement-lvl2-assembly-stage-and
@Gonza10V Gonza10V merged commit cb661e7 into codex/implement-lvl2-assembly-stage May 6, 2026
0 of 4 checks passed
@Gonza10V Gonza10V deleted the codex/github-mention-issue-11]-implement-lvl2-assembly-stage-and branch May 6, 2026 06:22
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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