Skip to content

fix(chatgpt): build the bundled app-server path with posix.join on every host - #6413

Merged
lidge-jun merged 2 commits into
devfrom
codex/fix-chatgpt-shim-posix-bundle-path
Oct 1, 2026
Merged

lidge-jun merged 2 commits into
devfrom
codex/fix-chatgpt-shim-posix-bundle-path

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

The full Cross-platform CI run on dev (36891940246) fails windows 3/9 on tests/clients/desktop-app-server-shim-launcher.test.ts:60, a test #6361 added: "the bundled binary is derived from the discovered bundle root". resolveChatgptCodexBinary builds the candidate with node:path join, which uses backslashes on Windows. The test then receives null where it expects the POSIX bundle path.

A ChatGPT.app bundle path is a macOS path, so this PR builds the candidate with posix.join on every host. On macOS nothing changes. On Windows, the resolver now returns the same path the test, and the rest of the shim, expect.

Verification

  • I did not run local suites, on the project owner's instruction. Hosted CI on this PR, including the Windows legs, is the evidence.
  • The failing assertion is visible in job 110469799162 of run 36891940246. The change touches one line and adds none, so the file-size ratchet is unaffected.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. No user-facing change.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. Path construction only; it adds no new filesystem access.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue that could prevent the app from locating its macOS executable when paths were resolved on a different operating system. macOS bundle paths are now handled consistently across host platforms, improving startup reliability in cross-platform environments. This change affects path resolution only; it does not alter the app’s behavior or features once launched.
  • Tests
    • Added coverage to verify that macOS executable paths use consistent separators and remain within the expected app bundle.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 1, 2026 16:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-01T16:38:39.219891Z e906c01 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 Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6e899652-80d5-47ea-9ba0-bdc25c9e2b46

📥 Commits

Reviewing files that changed from the base of the PR and between e906c01 and 5e73284.

📒 Files selected for processing (1)
  • tests/clients/desktop-app-server-shim-launcher.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The launcher now uses POSIX path construction for candidate macOS bundle paths. A test checks that the probed paths use / and remain under the expected bundle’s Contents/ directory.

Changes

Bundle path resolution

Layer / File(s) Summary
Use POSIX separators for bundle paths
src/chatgpt/app-server-shim/launcher.ts, tests/clients/desktop-app-server-shim-launcher.test.ts
The launcher imports posix and uses posix.join to construct candidate macOS bundle paths. The test checks that probed paths use / and begin with the expected bundle root’s Contents/ path.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 5e732

The change addresses host-dependent separators for macOS bundle candidates, and the supplied context reports hosted CI coverage. No actionable merge-blocking regression is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 5e732

The change affects 2 systems.

Changed systems: src, tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.
  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/chatgpt/app-server-shim/launcher.ts: The path import now includes posix for POSIX-specific path construction.
  • observed — Modified behavior in src/chatgpt/app-server-shim/launcher.ts: resolveChatgptCodexBinary now uses posix.join instead of host-dependent join when constructing candidate macOS bundle paths.
  • observed — Modified behavior in tests/clients/desktop-app-server-shim-launcher.test.ts: Added coverage asserting that all probed bundle paths use / rather than \ and begin with the expected bundle root’s Contents/ path.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using posix.join to construct the bundled app-server path on every host.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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: e906c019fa

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

): string | null {
for (const layout of BUNDLED_CODEX_LAYOUTS) {
const candidate = join(bundleRoot, ...layout);
const candidate = posix.join(bundleRoot, ...layout); // macOS bundle paths are POSIX on every host

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the owned ChatGPT architecture document

This changes the path-construction invariant in the owned src/chatgpt/ area, but the commit does not update its mapped document, structure/clients/chatgpt-desktop.md. Document that bundle candidates must retain POSIX semantics even on non-macOS test hosts so the Windows-safe behavior remains part of the subsystem contract; repository ownership rules require an owned source change and its document update to land together.

AGENTS.md reference: AGENTS.md:L42-L43

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added bug Something isn't working intake: hygiene-blocked Deterministic PR hygiene checks failed labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 1, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration record (MAINTAINERS.md, dev-only)

  • Actor: @lidge-jun (admin), stabilizing dev for the next release as authorized by the project owner.

  • Exact head: 5e732845748e5e76daef111f5f5113e66f213cbd. Cause: the full dev Cross-platform run 36891940246 failed windows 3/9 on tests/clients/desktop-app-server-shim-launcher.test.ts:60, from feat(chatgpt): experimental macOS app-server quota-gate shim (split from #5947) #6361. The fix builds the ChatGPT.app bundle candidate with posix.join, and a regression asserts that every probed candidate stays POSIX.

  • Hosted CI at this head: Cross-platform CI 36897666599 success (the PR lane skips the Windows shards; the next full dev run proves the Windows fix).

  • Local suites: not run, by explicit owner instruction.

  • Not a security-boundary change.

  • Enforce PR target branch is fail, stuck in the flooded Actions queue (it never executes head code). I checked its conditions by hand: base is dev, and the Summary, Verification and Checklist sections are present. PR hygiene passed at this head.

@lidge-jun
lidge-jun merged commit 5ea6375 into dev Oct 1, 2026
32 of 34 checks passed
@lidge-jun
lidge-jun deleted the codex/fix-chatgpt-shim-posix-bundle-path branch October 1, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant