Skip to content

fix(a2a): preserve serialized structured results - #2172

Merged
markstuart-oai merged 27 commits into
feat/codex-harnessfrom
codex/a2a-json-output-req744
Nov 5, 2026
Merged

markstuart-oai merged 27 commits into
feat/codex-harnessfrom
codex/a2a-json-output-req744

Conversation

@markstuart-oai

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

Copy link
Copy Markdown
Contributor

Builds on merged #2171. Current head: a560d1e0.

This fixes structured result handling for REQ744.

A prompted agent can use a Zod transform to return a class with a toJSON() method. The A2A executor checked the size of that JSON, then saved the original class instance. Cloning the task discarded the method. In a real HTTP exchange, the Python client received a local field even though the serializer produced answer.

The executor now builds the structured data part from the JSON that passed the byte limit. The task store and remote client receive the same value.

Verification

At a560d1e0, all 46 A2A tests pass with no skips. Five normal development-package archives match the current source; all 132 native inputs and six products match shared Core 691cbffb. Fresh installed ESM/CommonJS imports pass. Both SDKs served and called the other in six HTTP exchanges against the Python 41f8b308 wheel, covering text, custom JSON serialization and manual approval.

The repository-required pair of independent reviews passed on this complete seven-file task diff. After that acceptance, the required full SDK script passed 9,549 tests with 116 skips across 368 passing test files. Source, component, repository and native-product identities stayed unchanged. Changeset validation, current-head human approval and hosted code/security reviews are complete.

Earlier qualification:

  • At 64bc3800, the repository build, runtime type check and all 83 adapter and recovery tests passed. The official Linux release from the shared tracing fix matched all 132 native build inputs and all five binary hashes. Shared tracing fix · Release build
  • I installed the five TypeScript alpha packages from 64bc3800 and the Python wheel from 5e05bca9. Both SDKs served and called the other in six HTTP exchanges covering text, structured output and manual approval. The Python client received {"answer":"js structured result"} from a prompted TypeScript agent with a custom serializer. CommonJS and ESM loaded both public adapter exports.
  • The realtime pairing test now reads the request count from the child server. All four token-server tests passed. The release-contract test that compiles fixture packages passed with its 15-second timeout.
  • At ce6124ef, the full test profile passed 9,521 tests and skipped 116. The Node 22 and 24.3 CI jobs passed on that revision.

@markstuart-oai
markstuart-oai requested a review from a team as a code owner November 5, 2026 07:22
@changeset-bot

changeset-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a560d1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@openai/agents Patch
@openai/agents-codex Patch
@openai/agents-core Patch
@openai/agents-extensions Patch
@openai/agents-openai Patch
@openai/agents-realtime Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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-05T16:09:38.934278Z a560d1e Manual request
🔒 Security Review ✅ Completed 2026-11-05T16:10:00.397199Z a560d1e Manual request
ℹ️ 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 static review and independent review. Structured A2A results now retain the exact JSON representation that passed the byte limit through task storage and HTTP publication, including custom toJSON output. String text results and serialization failure handling remain intact. Hosted CI remains pending; no candidate code or tests executed.

@markstuart-oai
markstuart-oai force-pushed the codex/a2a-json-output-req744 branch from c3e30d2 to 02aba47 Compare November 5, 2026 07:41

@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.

Package-split integration preserves the reviewed A2A JSON serialization fix: relocated client, executor and tests are byte-identical. Documentation paths and changeset targets match the split. Static and independent review; hosted CI pending; no candidate code or tests executed.

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Hosted CI follow-up at 02aba47: Node 24 test job failed the realtime-react-native example test loopback token issuance requires pairing and an expected origin: upstream-request log count was 1, expected 2, after both requests returned HTTP 200. The test file is byte-identical to current base dc05b2d; this does not establish a regression in this A2A change. Node 22 was cancelled; native packaging is still running. No local tests or CI reruns performed.

@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 test-only change replaces racy stdout request counting with IPC acknowledgment. A2A behavior is unchanged. The prior hosted test failure has not yet been verified cleared on this head. Static and independent review; hosted CI pending; no candidate code or tests executed.

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Hosted CI at ce6124e: coverage job timed out after 5000 ms in scripts/released-api-contract.test.mjs:2659, release-specific package membership > loads historical and split source/dist roots and rejects deleted owner APIs. The file is byte-identical to base. Coverage reports 9520 passed, 116 skipped and this one timeout; Node 22 and 24 jobs passed. No evidence establishes an A2A regression. Native CI remains pending. No local tests or reruns performed.

@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.

Base integration preserves the A2A implementation. The sole additional change gives the previously timing-out API-contract test 15 seconds without changing assertions. The prior hosted timeout has not yet been verified cleared on this head. Static and independent review; hosted CI pending. No candidate code or tests executed.

@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 61d83aa5b2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 61d83aa5b2

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai

jbeckwith-oai commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Hosted CI update at 64bc380: all eight checks completed successfully, including Linux/macOS/Windows package jobs, Node 22 and 24.3.x tests, Windows sandbox paths, and coverage. Native job evidence. Approval remains current; closing CI follow-up for this head. Earlier-head failures are historical, not current failures. No candidate code/tests or CI reruns were executed locally.

@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 the integration of the independently reviewed child-tracing fix in #2179. Shared tracing changes match that reviewed change, and existing feature code remains intact.

Reviewed commit 48aa8a1. Static and independent review only; no candidate code or tests ran locally. Hosted native qualification remains pending.

@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 static follow-up and independent review. The six-file increment integrates the reviewed child-tracing changes from #2179 at 44f6e78. Child creation context, including absent context, remains authoritative for later steps and direct/CodeMode approvals. Existing feature changes remain intact; no new actionable findings. Hosted native and Node CI remain pending. No candidate code or tests were executed locally.

@markstuart-oai
markstuart-oai changed the base branch from feat/codex-harness to codex/a2a-response-encoding-bound-req744 November 5, 2026 16:07

Copy link
Copy Markdown
Contributor Author

@codex review
@codex security review

Please review current head a560d1e070e2868a345586ee6152f8e39d6aa8b4 against its updated dependency branch. The body distinguishes source integration checks from native qualification and hosted CI.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: a560d1e070

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: a560d1e070

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@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 a560d1e. The response-encoding gate composes with checkBytes returning the serialized value, preserving structured result serialization and bounds. Shared tracing/child-admission changes match reviewed 1875314, and patch hashes match the manifests.

Current reported hosted checks: 5 SUCCESS. Coordinator and independent static review found no actionable integration regressions. No candidate code or local tests executed; no CI reruns requested.

Base automatically changed from codex/a2a-response-encoding-bound-req744 to feat/codex-harness November 5, 2026 17:02
@markstuart-oai
markstuart-oai merged commit b88ebbb into feat/codex-harness Nov 5, 2026
5 checks passed
@markstuart-oai
markstuart-oai deleted the codex/a2a-json-output-req744 branch November 5, 2026 17:28
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