Repository navigation
Conversation
…out logging it Finding 2017: a fresh Harness's first codex login or startup model check failed after an OpenShell gateway restart, and codex's stderr is never captured, so the sighting could not tell a transport failure from a provider 5xx or a credential rejection. A failed native login (runtime.startup_phase, phase codex-login) and a failed codex.model_probe attempt now add failureClass, one of a closed contract list: network, tls, http_401_403, http_5xx, http_other, timeout, empty, unknown. The wrapper reads at most the last 8 KiB of codex's stderr and matches it with indexOf and fixed-width digit reads only, so the work is linear in that window; the output itself is never logged. OCC's runtime log sanitizer keeps the field only on those two events and only for a value in the list. The held runtime failure status and its cause are unchanged.
…r to avoid an open-PR conflict
…out applies Internal security review nits: a URL's ?status=500 no longer names a status, the contract says timeout applies only when the output names no other class, and logStartupPhase notes its callers pass only the classifier's literals.
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR adds a bounded, closed-vocabulary failure class to failed Codex login and startup model-check logs. Example: Codex exits 1 before producing probe events and stderr reports an error sending a request.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses a diagnostic gap still present on main, follows the maintainer-authored direction, and has no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Compute runtime wrapper runs Codex login and model checks, emits structured diagnostics, and OCC sanitizes those records for authorized CLI and console log reads. flowchart LR
A[Codex stderr] --> B[Runtime wrapper]
B --> C[Bounded classifier]
C --> D[Structured runtime logs]
D --> E[OCC sanitizer]
E --> F[CLI and console logs]
Technical reviewBest possible solution: Keep classification in the existing runtime wrapper and sanitizer while preserving authentication, retry, readiness, and persisted failure semantics. Do we have a high-confidence way to reproduce the issue? Current-main source shows that a nonzero Codex exit without protocol events loses stderr classification; the reported outage was not independently reproduced. Is this the best way to solve the issue? The change uses existing diagnostic owners and a closed vocabulary to expose useful evidence without guessing retry policy or publishing provider text. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 141515257737. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 19, 2026, 3:17 PM ET / 19:17 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Problem
Finding 2017: after an OpenShell gateway outage, the redeployed Harness's first
codex login(access-token exchange) or its startupcodex.model_probefailed and was held at once (RUNTIME_LOGIN_FAILED, orRUNTIME_MODEL_PROBE_FAILEDwithPROCESS_EXIT exit-1and no events). The wrapper never captures codex's stderr, so a sighting can't tell a transport failure from a provider 5xx or a credential rejection. That is the evidence needed to choose between a one-time retry and an upstream report.Change
runtime.startup_phase, phasecodex-login) and each failedcodex.model_probeattempt now carryfailureClass. It is one of a closed contract list (CODEX_FAILURE_OUTPUT_CLASSES):network,tls,http_401_403,http_5xx,http_other,timeout,empty,unknown.ETIMEDOUT). The classifier reads at most the last 8 KiB and only usesindexOf/includesand fixed-width digit reads, with no regex over the output, so its cost is linear in that window. Astatus/httpword counts only at a word start, so a URL's?status=500does not.401/403, then5xx, then another4xxwin first.emptyorunknown.causeare unchanged, so there is no contract/API/DB change and no new transport.failureClassonly on those two events and only for a value in the list (occ agent logs, console Logs tab, and the QA probe-log line).harness-execution.mdandsecurity.mdname the field.How the next sighting will read: the QA failure line's probe log (or
occ agent logs) shows, for example,codex.model_probe … exitCode: 1, causeKind: PROCESS_EXIT, causeDetail: exit-1, failureClass: network. A failed login readsruntime.startup_phase … phase: codex-login, outcome: failed, failureClass: http_5xx.Out of scope: retry policy (option A), the QA redeploy step (option C), and finding 2040.
Verification
tests/conformance/codex-native-startup.test.mjsruns the real generated entrypoint:failureClass.READYprobe logs none.exit status 127,status 4011,?status=500,httpstatus, a URL path).tests/conformance/runtime-logs-content.test.mjs: the sanitizer keeps in-list values on the two events and drops token-shaped, URL, object and upper-case values. It also drops the field onopenclaw.model_probe.tsc --build, eslint and prettier pass on touched files.timeoutapplies, and a comment covers the startup-phase helper.Risks
failureClass(its attributes are unchanged), so it shows in pod logs and OCC reads only.merge-treeagainst main vs this head):runtime-entrypoints.ts(already conflicted)runtime-entrypoints.tsThe one new hunk in #2543/#2487 is the
codex-loginlogStartupPhasecall. Those PRs wrap it inif (!noInference)and this PR adds the class argument, so the resolution is to keep both. The helper include was moved to avoid a second hunk. #2599 head is not fetched locally (fork).