Skip to content

[WRONG BRANCH] fix(cli): preserve absent OAuth plan fields - #488

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-cli-handling-of-oauth-plan-field
Draft

[WRONG BRANCH] fix(cli): preserve absent OAuth plan fields#488
luvs01 wants to merge 1 commit into
mainfrom
codex/fix-cli-handling-of-oauth-plan-field

Conversation

@luvs01

@luvs01 luvs01 commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Restore the documented compatibility contract where an absent plan key means the proxy predates tier reporting while plan: null means the proxy checked and found no tier.
  • Prevent the current CLI from synthesizing plan: null for accounts that simply omitted the field, which breaks downstream version-detection and automation.

Description

  • Forward the server-provided plan property verbatim by including plan only when the response object actually owns the property using Object.hasOwn(a, "plan") in src/cli/account-api.ts.
  • Add a focused regression test tests/cli/cli-account.test.ts that verifies three cases: absent plan (older proxy), explicit null, and a known string value.

Testing

  • Ran the focused CLI test: node_modules/bun/bin/bun.exe test tests/cli/cli-account.test.ts --test-name-pattern 'OAuth JSON preserves the plan presence signal' and it passed with the repository Bun (1.4.2).
  • Ran the full CLI account test file: node_modules/bun/bin/bun.exe test tests/cli/cli-account.test.ts and the tests in that file passed (no failures reported).
  • Typecheck and privacy checks were run via bun x tsc --noEmit and bun run privacy:scan and both succeeded; note that the system Bun 1.2.14 lacks node:zlib.zstdDecompressSync, so the repository-pinned Bun 1.4.2 was used for the successful runs.

Codex Task

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-09-12T01:33:53.285504Z 2e6d63d 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.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 503db8fd-f0b0-4270-a2d8-dedd80c4ffd0


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

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 12, 2026
@github-actions

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request is being kept as a draft automatically. Once every issue above is resolved, it will be marked ready for review again.

@github-actions github-actions Bot changed the title fix(cli): preserve absent OAuth plan fields [WRONG BRANCH] fix(cli): preserve absent OAuth plan fields Sep 12, 2026
@github-actions
github-actions Bot marked this pull request as draft September 12, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant