Repository navigation
test(usage): add long-context token fields to the Codex fixture - #23478
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fixture now satisfies the required
CodexLongContextTokensfields — setslongContextInputTokens,longContextCachedInputTokens, andlongContextOutputTokensto0on bothcodexLocationandcodex, unblockingmain'spnpm run typecheck.
This is a mechanical test-only repair and it is correct. The three fields are required via the CodexLongContextTokens intersection on both CodexUsageLocationBreakdown (src/main/codex-usage/types.ts:52) and CodexUsageSession (:101), while codexOpenCodeTokenSessions / claudeTokenSessions (src/main/usage/agent-token-usage.ts) never read them, so the existing assertions remain meaningful. 0 is a valid subset value for a session with no long-context requests and matches every other Codex fixture in the tree. The opencode fixture inherits the fields through ...codex.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
7 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ELI5
Main's typecheck is failing, so every open PR shows a red typecheck. Two changes merged independently, and each passed on its own, but together they broke one test file. This adds the missing fields to that test's sample data.
What Changed
src/main/usage/agent-token-usage.test.tsbuilds a sample Codex usage session and location breakdown. #22360 made three long-context token fields required on both types (CodexLongContextTokens). #18759 added this fixture without those fields, sopnpm run typecheckfails onmain. The fixture now sets them to0. The test's assertions don't depend on long-context counts.Why
This is a test-only fixture fix. The product types are correct. Zero keeps the fixture's existing totals meaningful.
Linked Issue
N/A (maintainer fix for red
maintypecheck)Visual Proof
N/A: test fixture only.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Before (
main):pnpm run typecheckfails with 3 TS2322 errors inagent-token-usage.test.ts.After:
pnpm run typecheckexits 0 with no errors, andagent-token-usage.test.tspasses 4 of 4.Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Test-only change. No effect on security, platform behavior, SSH, mobile, compatibility, or performance.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)