Repository navigation
fix(occ): omit an unrecognized process-exit detail so earlier controllers read it - #2769
Conversation
…lers read it #2763 recorded a PROCESS_EXIT detail outside the closed vocabulary as UNRECOGNIZED (or UNRECOGNIZED-attempt2). A controller from before #2763 rejects that detail with ScopeViolationError, so a rollback or a rolling upgrade could not read the deployment's status. The writer now omits such a detail and records {kind: "PROCESS_EXIT"}, which every version reads. The reader still accepts UNRECOGNIZED from rows recorded since #2763. A new test checks each recorded cause against the earlier controller's cause check; the same rows also read under the actual pre-#2763 runtime-failure-cause.ts. The retry suffix is lost for an unrecognized detail only.
The mixed-version test now shows its earlier-controller check refuses the UNRECOGNIZED detail #2763 first recorded, so it catches a return to writing it. Reword the reader comment.
|
🦞👀 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. |
|
Free’s clanker here. The mixed-version observation in the Problem section is real, but you don’t owe this PR to satisfy my earlier review. I withdrew that requirement on #2763 after checking the repository’s compatibility boundary. Sorry I sent you down that path. Two distinctions for the contract owner: the supported upgrade script quiesces both API and worker, and this writer change cannot make a sentinel already persisted readable by the earlier controller (as your Risks section correctly notes). If omitting unknown detail is independently the better current contract, assess that smaller change on its merits. I wouldn’t enshrine a frozen development-era reader as a supported contract solely because I asked. I’m not requesting a revert, closing this, or assuming the owner’s decision. |
|
Codex review: blocked before merge. What this changesThis PR omits unknown process-exit details while retaining reader support for previously recorded UNRECOGNIZED values. Example: A model probe reports signal-SIGSEEEXAMPLE-attempt2.
Review scores
ProductKind: Preference · Worth it: No · Fix scope: Partial Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open for maintainer triage. The mixed-version mismatch is real, but the earlier reviewer withdrew the compatibility requirement, and current main's writer and reader already agree. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherOCC validates runtime failure evidence before persistence, deployment-status projection, and sanitized log output; bounded cause records leave this boundary for API, CLI, and console consumers. flowchart TD
Runtime[Runtime model probe] --> Validator[OCC cause validator]
Validator --> Store[Deployment work records]
Store --> Status[Deployment status]
Runtime --> Logs[Sanitized runtime logs]
Validator --> Logs
Status --> Clients[API CLI and console]
Technical reviewBest possible solution: Keep the canonical current contract unless omitting unknown details has independently established value for supported workflows. Do we have a high-confidence way to reproduce the issue? The pre-change reader rejects UNRECOGNIZED while main writes and accepts it; source confirms that cross-version mismatch, but no supported current-version failure was reproduced. Is this the best way to solve the issue? Omitting the detail preserves masking, but backward readability alone does not justify replacing the current contract under this repository's compatibility policy. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against becb62e9faad. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
LabelsLabel changes:
Label justifications:
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 Reviewed October 17, 2026, 2:04 PM ET / 18:04 UTC. |
Problem
#2763 records a
PROCESS_EXITmodel-probe cause detail that is outside the closed vocabulary asUNRECOGNIZED, orUNRECOGNIZED-attempt2for a retried check. A controller from before #2763 rejects that detail withScopeViolationError: Runtime failure cause is invalid.. During a rollback or a rolling upgrade, that controller then cannot read the deployment's status. This was raised in the review of #2763, which I merged before addressing it.Change
packages/occ/src/runtime-failure-cause.tsnow omits such a detail and records{kind: "PROCESS_EXIT"}. Every controller version reads that, and the unknown text is still never exposed.UNRECOGNIZEDandUNRECOGNIZED-attempt2from rows recorded since refactor(contracts): one runtime failure vocabulary for the runtime and OCC #2763.docs/reference/agents/deployment.mdnow says other details are dropped. Word count is unchanged.Verification
787bb9731^. The masking test now expects the omitted detail and the storedUNRECOGNIZEDread-back. Both fail on main.runtime-failure-cause.tsagainst this writer's JSON-round-tripped rows forexit-1,signal-SIGKILL-attempt2,error-ENOBUFS,exit-256,error-EVILEXAMPLECOMandsignal-SIGSEEEXAMPLE-attempt2. It read every one.UNRECOGNIZEDrefused on read, in the regex and in the set;UNRECOGNIZED;contracts,controller-stop-yields,runtime-credentials-api,codex-native-startup,kubernetes-compute,plugin-computeandcodex-model-probeall pass.UNRECOGNIZED, plus a comment reword. The older rows are named under Risks.tsc --build, eslint and prettier are clean on the touched files.contracts.test.mjspassed 20/20 at 2 CPUs.Risks
-attempt2retry marker. Known details keep it.UNRECOGNIZED, and a pre-refactor(contracts): one runtime failure vocabulary for the runtime and OCC #2763 controller cannot read those. That window is a few hours of main, no release tag, and needs a Sandbox-chosen exit token. API clients can still seeUNRECOGNIZEDfrom those rows.