Repository navigation
refactor(codex): keep lifecycle and provider files within size limits - #157980
Conversation
Move existing protocol, error, HTTP and provider helpers to their owning modules and relocate the literal OpenAI policy test matrix. Preserve the existing lifecycle, retry, authority and cleanup behavior while unblocking strict local PR preparation. Related: #157347
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 25, 2026, 3:27 AM ET / 07:27 UTC. ClawSweeper reviewWhat this changesMoves private Codex provider, relay, protocol, and lifecycle helpers into smaller local modules and relocates an OpenAI policy test table to test support. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: current main still has the oversized Codex files this PR addresses. The introduced moves are coherent, and the reviewed hunks show no concrete behavioral or security defect. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw's Codex plugin sends agent turns through Codex App Server and routes native inference through a local relay. Provider settings and thread responses feed these paths, which produce model turns and lifecycle results. flowchart LR
A[OpenClaw agent turn] --> B[Codex plugin lifecycle]
B --> C[Codex App Server]
C --> D[Native provider settings]
D --> E[Provider routing]
E --> F[Local inference relay]
F --> G[Provider endpoint]
G --> C
C --> H[Turn result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +27, Tests +2. Total +29 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep provider projection, relay HTTP behavior, and lifecycle validation in their private plugin owners while meeting the enforced source-line budget. Do we have a high-confidence way to reproduce the issue? Not applicable: no runtime bug is alleged. The source-line rule and oversized current-main files establish the maintenance need. Is this the best way to solve the issue? Yes: moving unchanged private helpers to owner-local modules meets the existing limit without adding a public plugin API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fc3b2dca233a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Reviewed the data-model compatibility checklist in the ClawSweeper review. The two flagged relay files only relocate the existing HTTP overload response and header-filtering helpers. Their constants and function bodies match the parent exactly after removing the new export modifiers; no stored schema, persistence format, migration, or upgrade path changes. Compatibility proof is not applicable to this extraction. The reviewed head |
|
Merged via squash.
|
…ts (openclaw#157980) Move existing protocol, error, HTTP and provider helpers to their owning modules and relocate the literal OpenAI policy test matrix. Preserve the existing lifecycle, retry, authority and cleanup behavior while unblocking strict local PR preparation. Related: openclaw#157347 Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Native PR preparation fails when Codex and OpenAI files exceed the repository's strict size limits. This is a prerequisite for #157347.
User Impact
No intended user-visible change. Maintainer preparation can run with the existing limits enforced.
Why This Change Was Made
Move existing protocol validators, lifecycle error classification, HTTP helpers, provider configuration projections, and literal test data into their owning modules. Function and test bodies remain intact; consumers and the explicit test mock follow the moved helpers.
Evidence
Full extension lint, production and test types, normal build, and independent Codex review passed. The build's report-only UI size check measured startup JavaScript at 371,503 bytes gzip against a 371,332-byte limit; this is an advisory overage, not a budget pass. OpenAI policy coverage and Codex inference/lifecycle coverage passed, followed by 77 checks for the additional startup, supervision, and recovery moves.
Measured changed-test costs: OpenAI policy file 4.56 seconds for 74 tests; turn-recovery file 3.54 seconds for 3 tests, each with one worker.
One local native cold-recovery run hit its existing 60-second deadline. A bounded instrumented replay passed in about 30 seconds, but did not establish the original cause or a fix. The diagnostic was removed, the failure is retained, and deadlines and scheduling are unchanged. The native inference fixture also passed; live provider proof was not selected for this refactor.