Skip to content

test(proxies): pin cached_tokens for codex CLI transport and commandcode ACP (#3114) - #3127

Merged
dezren39 merged 1 commit into
mainfrom
queue/4536-3114-cached-tokens-tests
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4536-3114-cached-tokens-tests

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Closes #3114. Queue task 4536 (follow-up to triage task 4535, which verified the gap on main ada2d88a).

What

Test-only change pinning the two prompt_tokens_details.cached_tokens emission paths PR #2164 left unpinned:

  • codex-proxy CLI (exec) transport — new test asserts the stub's cached_input_tokens: 93 surfaces as usage.prompt_tokens_details.cached_tokens in both the non-streaming response and the streaming end chunk; the resumed turn (stub usage has no cached value) asserts prompt_tokens_details is omitted entirely.
  • commandcode-proxy ACP path — new ACP-speaking stub (the existing stub fails the handshake and exercises only the spawn path, which never threads cacheReadTokens) drives session/prompt usage with cacheReadTokens: 77 and asserts cached_tokens: 77 non-streaming and streaming, plus omission when the ACP result carries no cache value.

No proxy logic touched.

Verification (laptop)

  • bin/commandcode-proxy.test.mjs: 2/2 pass (existing + new).
  • bin/codex-proxy.test.mjs: the codex suite cannot run against the stub on this NixOS laptop — findCodexBinary prefers /run/current-system/sw/bin/codex over $HOME/.local/bin/codex, so the proxy runs the real CLI (401s). Verified instead in a mount namespace with /run/current-system masked (CI-like): new test + successful run is unchanged pass; full-file failure set is byte-identical to clean main (10 masked-env artifacts, pre-existing). CI should be authoritative for this file.

Observation (not fixed here, out of scope): that candidate order makes the codex-proxy suite un-runnable on NixOS dev machines — worth a follow-up issue if the fleet wants laptop-runnable proxy tests.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 15:44
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f8f1b62-5271-4199-8315-e809a48bc09e
Commits

Reviewing files that changed from the base of the PR and between 37df0a6 and 3aa150c.

Files selected for processing: 2
  • bin/codex-proxy.test.mjs
  • bin/commandcode-proxy.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T15:45:39.885137Z 3aa150c PR opened
ℹ️ 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.

@dezren39
dezren39 merged commit 9d8e191 into main Oct 31, 2026
1 check passed
@dezren39
dezren39 deleted the queue/4536-3114-cached-tokens-tests branch October 31, 2026 17:01
@dezren39
dezren39 restored the queue/4536-3114-cached-tokens-tests branch November 1, 2026 09:14
@dezren39
dezren39 deleted the queue/4536-3114-cached-tokens-tests branch November 1, 2026 16:47
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.

test(proxies): PR #2164 cached_tokens emission is unpinned for the codex CLI transport and commandcode-proxy

1 participant