Skip to content

Add exact turn steering and API-key attention waits - #5499

Merged
markstuart-oai merged 3 commits into
feat/codex-harnessfrom
feat/supervisor-turns
Nov 4, 2026
Merged

markstuart-oai merged 3 commits into
feat/codex-harnessfrom
feat/supervisor-turns

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Review stack: #5504 (CI) > #5499 (turn controls) > #5500 (receipts) > #5501 (executor) > #5502 (recovery) > #5503 (example) > #5495 (docs). Combined reference: #5494.

Requirements · REQ733, REQ735.

Summary

A parent session now receives the rate-limit snapshot from a repair run. Child attention reports an interruption only when the native abort reason was an interruption.

Supervisors need to target a live native turn without sending a late correction to its successor. Add Turn.steer_exact(..., expected_turn_id=...) and SteeringReceipt: stale targets fail, and accepted input carries the native turn and input IDs. Acceptance does not prove the model sampled the input. Turn.steer(input) keeps its existing signature and logical-submission behavior.

Add Turn.wait_for_attention() over the existing request/result wait, returning known interruption, connection-loss, rate-limit and blocking-quota outcomes. Session.rate_limits() and ApiRateLimitsUpdated expose recognized HTTP/WebSocket headers and retry advice separately from token usage. Missing fields stay unknown. Model authentication remains API-key-only; managed login, plan credits and billing verification are excluded under REQ731.

Layer 1 of 5; base #5504 (chore/worker-native-ci-timeouts). This carries Core patch 0018; the CI budget changes are owned by #5504.

Acceptance dependencies enabled here: REQ781 needs exact steering and supervisory outcomes for its combined workflow. This layer supplies those controls; the example layer exercises them.

Test plan

The child-capability test fixture now lets the executor reserve its own port. It reads the listening address from the process before connecting. A competing listener reproduced the same startup assertion as the failed Python 3.12 job. The original job discarded the process diagnostic, so its underlying cause is unconfirmed. A regression that occupies the requested port immediately before startup failed on the old fixture. The regression and the previously failing typed-role test both passed with the updated fixture and the same hosted native binary.

The reviewed API snapshot now includes the interruption flag used by the native error type. All 30 API contract tests pass after the update. The previous snapshot failed the same four checks on Python 3.11 through 3.14.

The model-only child cancellation regression passed over both HTTP and WebSocket. Three focused native cases passed with the precise abort-reason check. The updated stack is running its broad checks.

Issue number

None linked. Owning requirements database IDs are listed above.

Checks

  • I've added new tests, if relevant
  • I've run the applicable checks in AGENTS.md, including .agents/skills/code-change-verification/scripts/run.sh when required
  • I've confirmed all required checks pass
  • I've completed the review required by AGENTS.md

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 4, 2026 04:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T21:11:10.878905Z e85c421 New commits
🔒 Security Review ✅ Completed 2026-11-04T21:11:05.843090Z e85c421 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at 95d38b9.

Reviewed exact steering ownership, stale-target races, per-input identities, mode mixing, passive attention waits, sparse rate-limit parsing, sensitive-header filtering, and HTTP/SSE/WebSocket/error propagation. Required native helpers exist in the pinned dependency; no dependency on later layers found. No actionable findings. Hosted lint/docs and non-Rust CodeQL passed; native Linux/macOS/Windows and Rust CodeQL remain pending.

Static review only; no candidate code or tests run. Leave unmerged as requested.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at 1863681.

Reviewed the exact tree changes with an independent reviewer. The new steer_exact method requires and validates the native turn ID before submission; legacy steer retains its original signature and behavior. Updated regression cases and the public API fixture agree. The macOS native CI timeout change is sound. No actionable findings.

Static review only; no candidate code or tests run. Fresh hosted CI remains pending. Leave unmerged as requested.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed the control layer, including interrupted-child attention and repair rate-limit propagation. No remaining actionable finding in this layer.

Static review only; no candidate code or tests executed. Hosted CI: pending: native-linux / Native package (ubuntu-24.04), native-macos / Native package (macos-latest); no failed checks observed.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed the exact updated commit. The API-contract snapshot now matches NativeError._interrupted. No new actionable findings in the exact change since the prior review.

Static review only; no candidate code or tests executed locally. Hosted CI: pending checks remain; no failures observed.

@markstuart-oai
markstuart-oai force-pushed the chore/worker-native-ci-timeouts branch from c50f179 to eb24907 Compare November 4, 2026 08:18

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed the exact change from the previously reviewed commit: the only change raises the macOS native test step from 10 to 20 minutes. This addresses the observed hosted timeout without changing test assertions or execution behavior. No new findings.

Reviewed commit: 5cde9cecfb990b363bd2e2937cee1d61b9417759. Static review only; no candidate code or tests executed locally. Hosted CI is still running: native-linux / Native package (ubuntu-24.04), native-macos / Native package (macos-latest). No current hosted failures observed.

@markstuart-oai
markstuart-oai force-pushed the chore/worker-native-ci-timeouts branch from eb24907 to c81aec7 Compare November 4, 2026 19:29

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at 607c06b. Reviewed the incremental Linux/Windows runner routing and matching change-detection assertions against the previously reviewed commit; no new correctness or security findings. Runtime code is unchanged. Hosted CI is still pending. Static review only; no candidate code or local tests executed.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The executor fixture now lets the child select port zero and reads its bound address, removing the parent-to-child port selection race. Startup failure diagnostics and the competing-bind regression cover the relevant boundary.

Coordinator and independent static reviews of actual old/new file contents found no actionable issue. Hosted CI on this new head remains pending; prior-head results do not qualify it. No candidate code or local tests executed.

Base automatically changed from chore/worker-native-ci-timeouts to feat/codex-harness November 4, 2026 21:29
@markstuart-oai
markstuart-oai merged commit e77cc36 into feat/codex-harness Nov 4, 2026
16 checks passed
@markstuart-oai
markstuart-oai deleted the feat/supervisor-turns branch November 4, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants