Skip to content

test(helpers): cover prompt-cache TTL output contracts - #3009

Merged
jbeckwith-oai merged 2 commits into
mainfrom
jbeckwith/node-breakpoint-ttl-20261021
Oct 26, 2026
Merged

jbeckwith-oai merged 2 commits into
mainfrom
jbeckwith/node-breakpoint-ttl-20261021

Conversation

@jbeckwith-oai

@jbeckwith-oai jbeckwith-oai commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Public #3029 already landed the generated 30m/12h prompt-cache TTL declarations and the handwritten Responses/browser validators. This PR now adds the remaining regression coverage on top of current main.

The tests cover inline text/image/file blocks passed through the public ResponsesRunnerTurn.supplyOutputs signature without payload casts; omitted TTLs; detached breakpoint snapshots after caller mutation; screenshot TTLs reaching a serialized Responses request; and rejection of invalid TTLs/accessors before pending calls are consumed. No generated declarations or runtime implementations differ from main.

Validation:

  • 1,088 focused tests pass on Node 22.22.3 and 24.22.1.
  • The inline compile regression produces the original three TS2353 errors against this PR's old generated declarations and passes against current declarations.
  • TypeScript checking (tsc --noEmit --module preserve), repository lint, and build pass.
  • Local canonical test startup is blocked by SWC rejecting this devbox's filesystem ownership while preparing unrelated example fixtures. Focused tests used a temporary local Vitest configuration omitting that global fixture setup; committed test/CI configuration is unchanged. Hosted CI remains required.

@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner October 21, 2026 19:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-10-26T16:04:56.553202Z 5efdd6d New commits
🔒 Security Review ✅ Completed 2026-10-26T16:05:35.445778Z 5efdd6d 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.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: ac0867f7ecfab8afbc249b14c75d9df6f9a1d943.

Trusted main policy: ac0867f7ecfab8afbc249b14c75d9df6f9a1d943.

✅ No new custom-code files detected.

0 mixed files remain; 0 existing customizations changed.

Compared ac0867f7ecfa → 5efdd6d65525. Generated baselines verified.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 40355579001 --repo openai/openai-node \
  --name castiron-custom-code-40355579001-1 --dir /tmp/castiron-custom-code-40355579001-1
git apply --stat /tmp/castiron-custom-code-40355579001-1/custom-code.patch
cat /tmp/castiron-custom-code-40355579001-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin ac0867f7ecfab8afbc249b14c75d9df6f9a1d943 5efdd6d65525524fc631a54e71f9ab8d73f348b0
python3 scripts/castiron/custom_code_report.py report \
  --base ac0867f7ecfab8afbc249b14c75d9df6f9a1d943 \
  --head 5efdd6d65525524fc631a54e71f9ab8d73f348b0 --target-branch main --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-5efdd6d65525
cat /tmp/castiron-custom-code-5efdd6d65525/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45348aba8b

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

Comment thread src/helpers/responses-tool-runner.ts Outdated

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

Reviewed the source at 45348ab. The handwritten browser and supplied-output helpers now retain valid 30m and 12h TTL values in detached breakpoint snapshots. Invalid metadata still fails before output registration, and the added regressions cover wire values and later caller mutation. I found no new issues in this runtime change.

The generated public breakpoint types still omit TTL; this approval does not claim that the separate generated-type gap is fixed. I did not run local tests or builds.

Current-head hosted checks include passing Node 22, 24, and 26 tests, lint, builds, the custom-code budget, and OkTest.

@jbeckwith-oai jbeckwith-oai changed the title fix(helpers): preserve Responses cache breakpoint TTLs test(helpers): cover prompt-cache TTL output contracts Oct 26, 2026
@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit f73fa02 Oct 26, 2026
66 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the jbeckwith/node-breakpoint-ttl-20261021 branch October 26, 2026 16:34
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