[WRONG BRANCH] fix(cli): preserve absent OAuth plan fields - #488
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
plankey means the proxy predates tier reporting whileplan: nullmeans the proxy checked and found no tier.plan: nullfor accounts that simply omitted the field, which breaks downstream version-detection and automation.Description
planproperty verbatim by includingplanonly when the response object actually owns the property usingObject.hasOwn(a, "plan")insrc/cli/account-api.ts.tests/cli/cli-account.test.tsthat verifies three cases: absentplan(older proxy), explicitnull, and a known string value.Testing
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).node_modules/bun/bin/bun.exe test tests/cli/cli-account.test.tsand the tests in that file passed (no failures reported).bun x tsc --noEmitandbun run privacy:scanand both succeeded; note that the system Bun1.2.14lacksnode:zlib.zstdDecompressSync, so the repository-pinned Bun1.4.2was used for the successful runs.Codex Task