Repository navigation
Conversation
|
/ug-review This comment was generated with GitHub MCP. |
| ensure_minimum_version( | ||
| "codex", | ||
| lambda: codex_agent.minimum_version_error(smart_routing_enabled=True), | ||
| ) | ||
| routing_unavailable = None |
There was a problem hiding this comment.
can we fall back to the old warning here? A managed config with an old Codex now blocks launch when the user declines, the update fails, or piped/EOF input takes the default, and the user can't change the admin's setting. Suggest catching RuntimeError and running without smart routing.
Suggestion:
| ensure_minimum_version( | |
| "codex", | |
| lambda: codex_agent.minimum_version_error(smart_routing_enabled=True), | |
| ) | |
| routing_unavailable = None | |
| try: | |
| ensure_minimum_version( | |
| "codex", | |
| lambda: codex_agent.minimum_version_error( | |
| smart_routing_enabled=True | |
| ), | |
| ) | |
| routing_unavailable = None | |
| except RuntimeError as exc: | |
| routing_unavailable = str(exc) |
| version_match = re.search(r"\b(\d+)\.(\d+)\.(\d+)\b", version_output) | ||
| assert version_match is not None, version_output | ||
| routing_supported = tuple(int(part) for part in version_match.groups()) >= (0, 164, 0) | ||
| routing_supported = tuple(int(part) for part in version_match.groups()) >= (0, 171, 0) |
There was a problem hiding this comment.
| gate.send("n\r", "decline the required upgrade") | ||
| gate.wait_for(lambda _: gate.ended, "blocked launch to exit") | ||
| gate.child.close() | ||
| assert gate.child.exitstatus != 0 |
UG review recommendationRECOMMENDATION: REJECT (request changes) Reasons:
Findings considered: 5 (severities: low: 4, medium: 1); see the inline review comments. Advisory only: this recommendation never approves or merges the pull request. The |
Polly AI ReviewBlocking issues
Security vulnerabilitiesNone found in the frozen diff. Workflow changes retain the existing triggers and credential boundaries. Non-blocking notes
ApproachReuse the existing shape-aware gate in SummaryDiff size (computed): 13 files; +134 / -74 lines (208 changed text lines); 0 binary files.
Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements. ChangesRaises the routed Codex floor, adds prerelease-aware checking, requires upgrades for managed launches, and updates CI pins and documentation. Ordinary launches retain their separate minimum. The size is proportional to the outcome. Removing the duplicate managed enforcement would simplify implementation and prevent the protocol regression. No dependency, lockfile, generated-asset, or unrelated footer changes appear. TestsTest-by-test assessmentStatic assessment only: the snapshot checksum matched, and both required policy files were read. Tests were not executed. Reported test totals, lint/type results, and live native validation remain unverified. No actual gateway usage-data evidence was inspected.
No test functions were removed or renamed, and no fixture definitions changed. Existing launcher tests cover updater failures and direct app-server fallback; they do not cover the managed CLI regression. A CLI component test is the smallest suitable addition. For manual verification, use Codex ScopeAll changes support the stated routing-version outcome; no unrelated work was found. The managed launch-shape regression is a correctness issue within that scope. Acceptance of newer prereleases remains an unresolved contract question, not evidence of unrelated scope. Automated review by Polly · workflow run |
|
/ug-review |
| "codex", | ||
| lambda: codex_agent.minimum_version_error(smart_routing_enabled=True), | ||
| ) | ||
| routing_unavailable = None |
| except RuntimeError as exc: | ||
| routing_unavailable = str(exc) |
| ) | ||
| assert version, "`codex --version` reported no semver" | ||
| if tuple(map(int, version.groups())) >= (0, 164, 0): | ||
| if tuple(map(int, version.groups())) >= (0, 171, 0): |
There was a problem hiding this comment.
Polly AI ReviewBlocking issues
Security vulnerabilitiesNone found in the reviewed changes. Non-blocking notes
ApproachReusing the native updater avoids another installation path. Apply the existing launch-shape eligibility check before invoking it: app-server must preserve protocol stdin, and non-routing commands should not request routing-only upgrades. SummaryDiff size (computed): 13 files; +178 / -88 lines (266 changed text lines); 0 binary files.
Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements. ChangesThe PR raises the Codex smart-routing floor to stable 0.171.0 while retaining 0.156.0 for ordinary launches. It adds minimum-version prerelease handling and managed-default upgrade recovery, then aligns CI pins and documentation. The implementation is proportional and reuses existing update and fallback mechanisms. Tests supply most of the changes; the concrete reduction opportunity is the repeated recovery matrix identified above. No dependency, lockfile, or generated-asset changes are included. TestsTest-by-test assessmentThe frozen snapshot’s checksum matches the supplied value, and both trusted policy files were read in full. No target pytest suite ran: local
The smallest missing regression is a CLI component case combining managed-default routing, an old Codex, and app-server arguments. Existing adapter-only coverage cannot detect the earlier prompt. The installed protocol journey can reuse its current setup to verify the complete boundary.
To confirm the fix manually with Codex 0.170.0, managed routing enabled, and
ScopeAll changed files support the stated version-floor and managed-recovery outcome; no clearly unrelated changes were found. The app-server failure is an implementation regression within that scope, not a separate feature request. Automated review by Polly · workflow run |
Smart-routed Codex terminal launches require stable 0.171.0 or newer. Known older clients are offered the existing native updater. When routing comes from the workspace's managed default, declining or failing the update, or remaining below the routing minimum, warns and continues the same launch without smart routing. No explicit disable flag is needed. Explicit routing requests retain the required-version gate;
UG_AUTO_UPGRADE_AGENT=1runs updates without confirmation. A known older app-server still warns and runs unrouted because its stdin carries the client protocol.The stable floor provides native delegation and status-line provider support. Routing CI pins 0.171.0; ordinary Codex launches keep the 0.156.0 minimum. Regression coverage checks the stable boundary, prereleases, slow version probes, successful upgrades, managed fallback, explicit disable, and launch-scoped routing environment restoration. The managed integration journey now requires a warning and completed native child work in the same launch after declining an update.
This is the bottom PR in the stack. The Smart Router indicator PR targets this branch and adds the footer separately. Merge this PR first.
Validation: 944 CLI tests and 733 agent/version/launcher/contract tests passed in separate processes; Ruff lint/format and type checks passed. Seven selected installation checks passed against the built wheel. Six live Linux/npm Arclet scenarios against the requested Databricks workspace completed hidden-file tasks: declined updates on Codex 0.164.0 and 0.170.0, manual update failure, automatic update failure, EOF input followed by update failure, and accepted upgrade to 0.171.0. The first five continued without routing and preserved the installed version; successful upgrade started the routing layer. Five cases used the real TUI; EOF used native exec with closed stdin. Admin policy input used the checked-in managed-config fixture; binaries, npm updates, and inference were real. Backend route selection is outside these upgrade checks.