Skip to content

test(usage),docs(codex-app-models): isolate fixtures and document the Desktop allowlist - #1150

Open
lidge-jun wants to merge 3 commits into
codex/260806-stack10-cursor-replayfrom
codex/260806-stack11-test-isolation-docs
Open

test(usage),docs(codex-app-models): isolate fixtures and document the Desktop allowlist#1150
lidge-jun wants to merge 3 commits into
codex/260806-stack10-cursor-replayfrom
codex/260806-stack11-test-isolation-docs

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Two small, independent contributions from the same author.

Test-home isolation. tests/management-api-logs-metrics.test.ts wrote fixtures into the real OpenCodex home, so running the suite could touch a developer's actual usage log. Fixture writes are now pinned to the scratch home, with explicit target-path and content assertions — that part matters, because a test that merely stopped writing would pass silently if the isolation regressed.

Desktop allowlist documentation. Routed rows are emitted with visibility = "list", but Codex Desktop applies its own allowlist downstream, outside this repository (upstream openai/codex#19694). The limitation and its workaround are now documented in the English guide and the ja/ko/ru/zh-cn translations.

Docs-only for the second half: #241 stays open as an upstream tracker. Documenting a limitation is not fixing it, so there is no Closes keyword here.

Attribution

Both are @Yuxin-Qiao's work, from #997 and #999 — all three commits cherry-picked with her authorship intact (git log shows her as the author on each).

One conflict was resolved during the pick: #997's two commits are stacked, so applying them in the given order required keeping the superset of imports from the later commit while applying the earlier commit's scratch-home beforeEach/afterEach. The final test file matches her tree exactly.

#997 and #999 are left open for her. Planning unit: devlog/_plan/260806_stacked_bug_campaign/150_phase16_test_isolation_and_allowlist_docs.md.

Stack 11 of the 260806 attribution campaign, stacked on #1144.

Verification

  • bun test tests/management-api-logs-metrics.test.ts — 10 pass, 0 fail
  • Full suite — 9,556 pass, 8 skip, 0 fail across 596 files
  • bun run typecheck — exit 0
  • bun run privacy:scan — passed
  • Docs build — 221 pages built, complete

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Codex Desktop's remote-server mode filters the model picker against the client's own available_models allowlist (active with the remote use_hidden_models setting), so routed catalog entries that the app-server loads and serves do not appear in the picker. Record the limitation and the two workarounds (set model directly in config.toml, or use CLI/TUI) and sync the section across zh-cn, ko, ru, ja.

Refs #241. Upstream: openai/codex#19694.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3b11c0b4-8680-4a99-aabe-f71b0d634463

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@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: 5bf99550c4

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

Until Desktop exposes a control for the allowlist:

- Set the model directly in `~/.codex/config.toml` on the remote machine, for example
`model = "input/grok-4.5"`. The picker may show `Custom`, but requests still use the configured

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a configured provider in the workaround

When a user copies this workaround without having created a custom provider literally named input, the configured model is unroutable because the shipped registry defines this Grok route under xai (src/providers/registry.ts:879-902) and contains no input provider. Use xai/grok-4.5 or an explicit <configured-provider>/<model> placeholder here and in the translations so the documented workaround does not fail with an unknown provider.

AGENTS.md reference: docs-site/AGENTS.md:L10-L10

Useful? React with 👍 / 👎.

// The default location (what the resolver returns with no OPENCODEX_HOME
// override) must never be the write target for this suite.
const previousHome = process.env.OPENCODEX_HOME;
delete process.env.OPENCODEX_HOME;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the fallback-path assertion inside scratch space

When this file is run from outside the repository as described above, the Bun preload is absent and HOME still points at the developer's real home, so deleting OPENCODEX_HOME here makes usageLogPath() resolve to the real ~/.opencodex/usage.jsonl; lines 198-199 then read that user-owned file in full. This defeats the isolation goal, can make the test fail on an unreadable or previously contaminated log, and leaves a sticky failure if the fixed marker was ever written there. Point HOME/USERPROFILE at a second scratch directory for the fallback-path assertion instead of inspecting the real default location.

Useful? React with 👍 / 👎.

lidge-jun added a commit that referenced this pull request Aug 6, 2026
Both remaining phases executed: #1150 (Yuxin Qiao, test isolation + Desktop
allowlist docs) and #1151 (Eachann + n3wr1ch, effort picker + Pi loopback
export). 16 contributor PRs landed across 12 stack PRs.

Also records the one in-scope deviation: phase 140 marked
tests/cli-export-command.test.ts as DROP, but the Pi fix made two of its
assertions stale - they expected the exact output #1085 reports as the bug.
Updating them beat shipping a red suite; the no-secret-in-stdout property is
unchanged.
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.

2 participants