Skip to content

feat: expose passive request metadata and response links - #5519

Merged
markstuart-oai merged 2 commits into
codex/native-response-historyfrom
codex/passive-request-metadata-on-history
Nov 5, 2026
Merged

markstuart-oai merged 2 commits into
codex/native-response-historyfrom
codex/passive-request-metadata-on-history

Conversation

@markstuart-oai

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

Copy link
Copy Markdown
Contributor

Summary

Requirement: REQ742 (observed reasoning settings) and REQ421 (links to retained received responses). Model-catalog accuracy, broader route coverage, and accounting acceptance remain separate.

This pull request adds passive request observations to managed root turns on top of #5512. Events report the model, reasoning settings, service tier, wire format, and transport passed to the selected native client. Response links use retained occurrence IDs, so repeated provider response IDs stay distinct.

Delivery is bounded and best effort. Manual restore binds a fresh observation route. These events are transient and grant no execution authority. Native children, warmup, reviewer requests, and compaction are outside this event's coverage.

Test plan

  • Current head 44e61bfe carries the upstream worker-example verification fix from its repaired history parent. API generation and native wheel qualification passed. Metadata code, production Python, native inputs and Core tree are unchanged from the authenticated 84874fbc Linux product.
  • That exact runtime passed 52 source checks and 68 installed metadata/history/workflow checks, including all 12 public metadata cases. After installing the example's pinned optional dependency from the local cache, all 39 AG-UI example tests passed, including retained-repair resynchronization.
  • Three public consecutive-submission checks passed: static and dynamic tool selection end with their original operation, and the next ordinary root restores its defaults. Dispatch and response links retain each root's own identity.
  • Source review confirmed that managed continuation already seeds a fresh observation submission identity before native admission. No corresponding runtime change was needed.
  • Ruff, MyPy, Pyright, API generation and the earlier 40 pure metadata/history checks passed. Independent final review, the full local wrapper and current-head hosted CI remain pending.

Issue number

REQ742 and REQ421. Stacked on #5512.

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 force-pushed the codex/native-response-history branch from efa3e9a to a776c72 Compare November 5, 2026 05:35
@markstuart-oai
markstuart-oai marked this pull request as ready for review November 5, 2026 05:35
@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 5, 2026 05:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-05T06:40:22.843924Z 44e61bf New commits
🔒 Security Review ✅ Completed 2026-11-05T06:41:44.754916Z 44e61bf 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 after coordinator and independent static review. Request metadata follows the selected client fields, uses a bounded nonblocking queue and stays attached to the original submission/thread. Response links use retained occurrence IDs; restored manual work binds a fresh route. Delivery remains passive and best effort, with no execution authority. Inherited response-history implementation matches the previously reviewed #5512 blobs.

Hosted CI remains pending. Static review only; no candidate code or local tests ran.

@markstuart-oai
markstuart-oai force-pushed the codex/passive-request-metadata-on-history branch from 31aad04 to 84874fb Compare November 5, 2026 05:49

@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 base integration using exact tree comparisons and the remaining overlapping source. Request metadata retains its bounded passive queue, exact submission routing, and dispatch after sampling-stop/admission checks. The metadata patch changes only rebase context and offsets. No new findings. Hosted native CI is pending. Static review with independent review; no local tests executed.

@markstuart-oai
markstuart-oai merged commit d16cd3f into codex/native-response-history Nov 5, 2026
37 checks passed
@markstuart-oai
markstuart-oai deleted the codex/passive-request-metadata-on-history branch November 5, 2026 07:13
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
* Preserve received response history on current v1

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

---------

Co-authored-by: markstuart-oai <[email protected]>
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
* Preserve received response history on current v1

* fix: preserve trace context on repaired history base

* Preserve defined trace flags and manual action budgets

* Sequence trace regression tool replies before final model output

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

* Validate native trace prefix widths and fresh-root controls

* Align manual continuation trace and observation arguments

* Fix worker deadline fixtures and Windows storage type checks

* Verify the winning reply when manual responses race

* Check complete trace handles and both MCP callback parents

* Observe child turns before testing unconfirmed cancellation

* Respect supported platforms in SQLite trace fixtures

* Distinguish caller exports from disabled child work

* Preserve native child callback tracing ownership

* Distinguish child trace exports and surface callback failures

* Keep remote trace ancestry separate from private SDK policy

* Preserve owned child tracing policy across native admission

* Avoid callback scheduling assumptions in trace policy test

* Separate session setup from concurrent trace policy admissions

* Account for split trace processor batches in loop-loss test

---------

Co-authored-by: markstuart-oai <[email protected]>
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
* Expose typed reasons for owned model output failures

* Handle the expected parser disconnect in the reason fixture

* Preserve received response history on current v1

* fix: preserve trace context on repaired history base

* Fix CI assumptions about child snapshots and temporary directories

* Preserve defined trace flags and manual action budgets

* Sequence trace regression tool replies before final model output

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

* Keep integrity reason tests within the native enum contract

* Validate native trace prefix widths and fresh-root controls

* Align manual continuation trace and observation arguments

* Fix worker deadline fixtures and Windows storage type checks

* Verify the winning reply when manual responses race

* Check complete trace handles and both MCP callback parents

* Observe child turns before testing unconfirmed cancellation

* Respect supported platforms in SQLite trace fixtures

* Distinguish caller exports from disabled child work

* Preserve native child callback tracing ownership

* Distinguish child trace exports and surface callback failures

* Keep remote trace ancestry separate from private SDK policy

* Preserve owned child tracing policy across native admission

* Avoid callback scheduling assumptions in trace policy test

* Separate session setup from concurrent trace policy admissions

* Account for split trace processor batches in loop-loss test

* Wait for a pending observation read before cancellation

* Wait for asynchronous release command before checking child retirement

---------

Co-authored-by: markstuart-oai <[email protected]>
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
…5517)

* fix: report captured context limits and model defaults

* Expose typed reasons for owned model output failures

* Handle the expected parser disconnect in the reason fixture

* Report the compactor's context window on terminal overflow

* Preserve received response history on current v1

* Fill overflow usage from the model that sampled the request

* Import the types and assertions used by context metadata tests

* fix: preserve trace context on repaired history base

* Fix CI assumptions about child snapshots and temporary directories

* Preserve defined trace flags and manual action budgets

* Sequence trace regression tool replies before final model output

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

* Keep integrity reason tests within the native enum contract

* Validate native trace prefix widths and fresh-root controls

* Align manual continuation trace and observation arguments

* Fix worker deadline fixtures and Windows storage type checks

* Verify the winning reply when manual responses race

* Check complete trace handles and both MCP callback parents

* Observe child turns before testing unconfirmed cancellation

* Respect supported platforms in SQLite trace fixtures

* Distinguish caller exports from disabled child work

* Preserve native child callback tracing ownership

* Distinguish child trace exports and surface callback failures

* Keep remote trace ancestry separate from private SDK policy

* Preserve owned child tracing policy across native admission

* Avoid callback scheduling assumptions in trace policy test

* Separate session setup from concurrent trace policy admissions

* Account for split trace processor batches in loop-loss test

---------

Co-authored-by: markstuart-oai <[email protected]>
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
* fix: report captured context limits and model defaults

* feat: edit detached native sampling requests

* Expose typed reasons for owned model output failures

* Report prepared-request mid-turn compaction failures

* Handle the expected parser disconnect in the reason fixture

* Report the compactor's context window on terminal overflow

* Borrow the sampling prompt when no request editor is active

* Preserve received response history on current v1

* Fill overflow usage from the model that sampled the request

* Import the types and assertions used by context metadata tests

* fix: preserve trace context on repaired history base

* Validate prepared requests against the selected tool roster

* Fix CI assumptions about child snapshots and temporary directories

* Preserve defined trace flags and manual action budgets

* Sequence trace regression tool replies before final model output

* Preserve explicit provider overrides in request editor preflight

* Keep request editor forwarding optional for run_sync overrides

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

* Keep integrity reason tests within the native enum contract

* Let the turn report fatal prepared-request compaction once

* Validate native trace prefix widths and fresh-root controls

* Validate sampled manual tools and retain request callback tracing

* Align manual continuation trace and observation arguments

* Fix worker deadline fixtures and Windows storage type checks

* Preserve existing submit overrides on ordinary agent runs

* Verify the winning reply when manual responses race

* Check complete trace handles and both MCP callback parents

* Observe child turns before testing unconfirmed cancellation

* Respect supported platforms in SQLite trace fixtures

* Distinguish caller exports from disabled child work

* Preserve native child callback tracing ownership

* Distinguish child trace exports and surface callback failures

* Keep remote trace ancestry separate from private SDK policy

* Preserve owned child tracing policy across native admission

* Avoid callback scheduling assumptions in trace policy test

* Separate session setup from concurrent trace policy admissions

* Account for split trace processor batches in loop-loss test

* fix: preserve completed answers when request editing skips compaction

---------

Co-authored-by: markstuart-oai <[email protected]>
markstuart-oai added a commit that referenced this pull request Nov 5, 2026
#5516)

* Stop sampling retries after terminal authentication failure

* fix: report captured context limits and model defaults

* feat: edit detached native sampling requests

* Expose typed reasons for owned model output failures

* Report prepared-request mid-turn compaction failures

* Initialize the receipt field in the protocol test fixture

* Handle the expected parser disconnect in the reason fixture

* Report the compactor's context window on terminal overflow

* Borrow the sampling prompt when no request editor is active

* Preserve received response history on current v1

* Fill overflow usage from the model that sampled the request

* Share bounded authentication recovery across fallback

* Import the types and assertions used by context metadata tests

* fix: preserve trace context on repaired history base

* Validate prepared requests against the selected tool roster

* Validate rotated credentials in native recovery tests

* Fix CI assumptions about child snapshots and temporary directories

* Preserve defined trace flags and manual action budgets

* Sequence trace regression tool replies before final model output

* Distinguish preconnect and sampling authentication recovery tests

* Preserve explicit provider overrides in request editor preflight

* Keep request editor forwarding optional for run_sync overrides

* feat: expose passive request metadata and response links (#5519)

Observe passive request metadata on repaired history

Co-authored-by: markstuart-oai <[email protected]>

* Keep integrity reason tests within the native enum contract

* Let the turn report fatal prepared-request compaction once

* Validate native trace prefix widths and fresh-root controls

* Validate sampled manual tools and retain request callback tracing

* Align manual continuation trace and observation arguments

* Fix worker deadline fixtures and Windows storage type checks

* Preserve existing submit overrides on ordinary agent runs

* Verify the winning reply when manual responses race

* Check complete trace handles and both MCP callback parents

* Observe child turns before testing unconfirmed cancellation

* Respect supported platforms in SQLite trace fixtures

* Distinguish caller exports from disabled child work

* Preserve native child callback tracing ownership

* Distinguish child trace exports and surface callback failures

* Keep remote trace ancestry separate from private SDK policy

* Preserve owned child tracing policy across native admission

* Avoid callback scheduling assumptions in trace policy test

* Separate session setup from concurrent trace policy admissions

* Account for split trace processor batches in loop-loss test

* fix: preserve completed answers when request editing skips compaction

---------

Co-authored-by: markstuart-oai <[email protected]>
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