chore(sync): merge linux-port upstream#95
Conversation
Fix Upstream Patch Drifts
- Resolve Cargo release output after rebuilding codex-update-manager - Cover deleted updater source paths in packaging smoke tests
…ource Fix packaging after deleted updater binary
…ifiers Fix AppShots bare modifier repeat detection
Refreshed Codex.dmg SRI hash to sha256-xGhTgxNq/IhSbFhBu4Sie2BxkOzqEeaPSeSTQce/34o= and synced codexVersion / electronVersion / native-module pins to the current upstream DMG. Verified all Codex Desktop Nix package outputs against the refreshed DMG. [skip ci]
fix(nix): refresh upstream Nix pins for 26.527.60818
Keep the opt-in remote-mobile-control outbound tab reachable on Linux and document the supported experimental flow.
Add GitHub commit links to Linux build provenance metadata and expose them from Build Information.
Skip Linux remote-ssh remote-control status reads in the opt-in remote-mobile-control feature while preserving local host status reads.
…-install-action fix(remote-mobile-control): harden SSH host handling
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Linux platform updates: refined AppShots double-tap handling, extensive remote-mobile-control patches (UI, feature-sync, status guard, SSH install), build-info commit URL plumbing and UI, webview monospace/footer patches, updater bridge and updater-build selection changes, tests and packaging smoke, plus metadata/flake updates. ChangesLinux Integration Updates and Enhancements
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d7ecdfb1a5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@flake.nix`:
- Line 87: Update the codexVersion value to the new generated version string:
replace codexVersion = "26.527.60818" with codexVersion = "26.601.21317" (keep
it as a quoted string), and verify any other occurrences of the codexVersion
symbol used in packaging or updater/version comparison logic are updated or
consistent with this new pinned build output.
In `@port-integrations/appshots/README.md`:
- Around line 41-44: Update the README phrasing to use the repository's
preferred "port integration" terminology: change the description of
`bare-modifier-monitor` to call it a "port integration helper" (or "port
integration module") instead of the current wording; keep references to
`resources/native/`, the need for left/right modifier keycodes, and the note
about X11 (`xinput`/`xmodmap`) while replacing instances of the old phrasing so
the sentence reads something like "The `bare-modifier-monitor` port integration
helper staged into `resources/native/`..." to maintain consistency with other
docs.
In `@port-integrations/remote-mobile-control/README.md`:
- Around line 150-152: Remove the duplicated known-risk bullet that repeats
"OpenAI may still reject Linux host enrollment or outbound authorization
server-side. This integration only removes local macOS-only blockers in the
repackaged app." by consolidating it with the identical caveat listed
immediately above into a single bullet; edit the README entry (the repeated
bullet text) to keep only one occurrence and ensure the combined bullet is clear
and singular.
In `@scripts/patches/webview-assets.js`:
- Around line 685-714: The detector currently bails out early because it
hard-codes the minified sentinel "function Sm(e){" (lines with Sm/Rm) causing
patches to stop applying when upstream renames those symbols; update
detectCurrentPermissionsRateLimitFooterSymbols to derive the insertion needle
from the actual matched footer shape instead of using the literal "function
Sm(e){" (or at minimum emit a warning when
jsxAlias/rateLimitAliasMatch/activeModeHook are found but the hard-coded needle
is missing). Concretely: remove the pre-check that looks for "function Sm(e){"
and "function Rm(e){", use the existing structural regex matches
(rateLimitAliasMatch and the activeModeHook match plus the jsxAlias) to locate
the footer insertion point (e.g., extract the matched substring or compute its
start index from the regex match) and set insertionNeedle dynamically, and add a
processLogger.warn/error when the structure is present but the old fixed needle
was not found so the patch fails soft; keep references to jsxAlias,
rateLimitAliasMatch (queryHook/queryKey/entriesFn/activeLimitFn/summaryFn),
activeModeHook, and insertionNeedle when making the change.
- Around line 768-770: The new codexLinuxRateLimitFooter function exits early
when summaryFn(..., {activeLimitName:i, selectedModel:t}) returns null; change
it to, upon a null result, call summaryFn again with selectedModel:null (i.e.,
retry with a model-agnostic fallback) before returning null so the footer can
use a generic limit summary; update the logic around
currentPermissionsFooterSymbols.summaryFn in codexLinuxRateLimitFooter
(referencing currentPermissionsFooterSymbols.activeModeHook, .queryHook,
.queryKey, .entriesFn, .activeLimitFn, and .jsxAlias) to attempt selectedModel:t
first and selectedModel:null second.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bba16f0e-0fbe-4ab4-8337-472af3226c2a
📒 Files selected for processing (17)
CHANGELOG.mddocs/maintainers/fork-divergences.mdflake.nixport-integrations/appshots/README.mdport-integrations/appshots/bin/bare-modifier-monitorport-integrations/appshots/test.jsport-integrations/remote-mobile-control/README.mdport-integrations/remote-mobile-control/patch.jsport-integrations/remote-mobile-control/test.jsscripts/lib/build-info.jsscripts/lib/linux-update-bridge-patch.jsscripts/lib/package-common.shscripts/patch-linux-window-ui.test.jsscripts/patches/core/all-linux/webview/font-settings/patch.jsscripts/patches/main-process.jsscripts/patches/webview-assets.jstests/scripts_smoke.sh
|
| Filename | Overview |
|---|---|
| port-integrations/remote-mobile-control/patch.js | Large expansion adding SSH install-release pass-through, status-read guard for SSH hosts, host-scoped feature sync, and updated selected-tab resolution. All new code paths are idempotency-guarded and tested. |
| scripts/patches/core/all-linux/webview/fast-mode-guard/patch.js | Switches from a fixed-filename webview-asset pattern to an extracted-app scan of all webview assets, correctly handling already-guarded, vulnerable, unreadable, and no-match cases. |
| scripts/patches/webview-assets.js | Adds applyLinuxSafeMonospaceFontStackPatch and a new detectCurrentPermissionsRateLimitFooterSymbols path for applyPersistentRateLimitFooterPatch; both include idempotency checks and warn on unrecognised shapes. |
| scripts/lib/build-info.js | Adds githubCommitUrl() to derive validated GitHub commit URLs from the remote + SHA; correctly validates SHA format, hostname, and owner/repo shape before returning a URL. |
| scripts/lib/package-common.sh | Adds updater_build_output_binary() helper and updates ensure_updater_binary to recover UPDATER_BINARY_SOURCE when cargo rebuilds to the standard target path. |
| scripts/lib/linux-update-bridge-patch.js | Removes the 1500-char hard-coded slice limit when searching for the message-dispatcher variable, fixing missed matches when the dispatcher appears further in the bundle. |
| port-integrations/appshots/bin/bare-modifier-monitor | Adds last_tap_code tracking so that Alt+Alt / Shift+Shift require distinct left/right modifier keycodes; logic is straightforward and well-tested. |
| scripts/patches/main-process.js | Extends codexLinuxBuildInfoDetail to include a commit URL line and adds an Open Commit button that calls shell.openExternal when a valid GitHub URL is available. |
| updater/trusted-dmg-manifest.json | Updated to version 26.601.21317 with refreshed SHA-256 matching the flake.nix pin, consistent with PR description and verified by cargo test. |
| flake.nix | Refreshes codexDmg SRI hash and codexVersion to 26.601.21317; consistent with trusted-dmg-manifest and validated by scripts/ci/validate-nix-pins.sh. |
Reviews (5): Last reviewed commit: "fix(patcher): fail missing fast mode gua..." | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@flake.nix`:
- Line 84: The flake pin SHA was updated but the trusted DMG manifest entry
still contains the old digest; update the corresponding entry in
trusted-dmg-manifest.json so the URL+sha256 pair matches the new hash value (the
one set at hash = "sha256-A/jmdYvGe3GvNSlcQokKaxEvvW1XienX1j5LMo4aBew="). Ensure
the manifest entry uses that exact SHA256 string so the updater trust check
(used by trust.rs and wrapper_apply.rs) will find an exact URL+SHA match.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bdcaacc35
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/patches/core/all-linux/webview/fast-mode-guard/patch.js`:
- Line 14: The early return returns { changed: false, matched: 0 } which is
type-inconsistent with the normal return where "changed" is a number; update the
early return to return a numeric changed (0) instead of false so callers always
receive a number for "changed" (i.e., change the early return object to {
changed: 0, matched: 0 }), locating the statement that returns { changed: false,
matched: 0 } in the fast-mode-guard patch and keeping "matched" as-is.
- Around line 24-36: Wrap the per-file I/O inside the candidates loop in a
try-catch so a single inaccessible file won’t abort the whole patch run:
surround the fs.readFileSync(filePath, "utf8") and subsequent
applyLinuxFastModeModelGuardPatch(...) plus fs.writeFileSync(filePath, patched,
"utf8") with a try block and catch errors, incrementing matched/changed as
appropriate only on success and logging or counting failures inside the catch;
reference the loop variables (candidate, filePath, matched, changed) and
functions (applyLinuxFastModeModelGuardPatch, fs.readFileSync, fs.writeFileSync)
so failures are reported and processing continues to the next candidate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a3395af0-1c27-4fc6-8a4f-ba669eb74c88
📒 Files selected for processing (2)
scripts/patch-linux-window-ui.test.jsscripts/patches/core/all-linux/webview/fast-mode-guard/patch.js
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8f7f9e76b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 172a293e7c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| case "$target_dir" in | ||
| /*) ;; | ||
| *) target_dir="$REPO_DIR/$target_dir" ;; | ||
| esac |
There was a problem hiding this comment.
Respect relative CARGO_TARGET_DIR paths
When a package build is launched from a repo subdirectory with a relative CARGO_TARGET_DIR, Cargo writes artifacts relative to the caller's current directory (I verified CARGO_TARGET_DIR=rel from /tmp produces /tmp/rel). This branch instead rewrites every relative value under REPO_DIR, so ensure_updater_binary can fail with Failed to build updater binary after cargo build succeeds because it looks in the wrong release directory. Resolve the path the same way Cargo will, or pass an absolute target dir into Cargo before building.
Useful? React with 👍 / 👎.
Summary
Syncs this fork with Linux-port upstream
upstream/mainthrough60c62e38bbd12a5d5ddd4e2bf1d513ff4892fe94(2026-06-02).Imported upstream changes under this fork's local contracts:
Codex App,Official OpenAI DMG, andport integrationswording.Sync Ledger
origin/main:708e2b4b771d3d89d8a002d559a443a09a1aa25a4e6702a(2026-05-31)60c62e38bbd12a5d5ddd4e2bf1d513ff4892fe94(2026-06-02)AGENTS.md.agents/fork-sync-policy.tomldocs/maintainers/fork-sync-policy.mddocs/maintainers/fork-divergences.mdsyncing-forks-with-upstreamskillorigin/maingit merge --no-ff --no-commit upstream/mainlinux-features/appshots/*changes were ported toport-integrations/appshots/*.linux-features/remote-mobile-control/*changes were ported toport-integrations/remote-mobile-control/*.integration:.port integrations.codex-appandcodex-app-updater./opt/codex-app,/usr/lib/codex-app, XDG config/state/cache paths.codex-app-updaterbinary name.README.md,docs/usage/build-and-run.md, ordocs/usage/troubleshooting.mdin this sync window.docs/maintainers/fork-divergences.mdupdated to60c62e38bbd12a5d5ddd4e2bf1d513ff4892fe94.Follow-Up CI Fix
Nix Package BuildsatValidate Nix pins against official DMG.scripts/ci/validate-nix-pins.sh /tmp/Codex.dmgreportedCodex app version pin mismatch: expected '26.601.21317', got '26.527.60818'.flake.nixcodexVersionto26.601.21317.flake.nixcodexDmgSRI tosha256-A/jmdYvGe3GvNSlcQokKaxEvvW1XienX1j5LMo4aBew=.scripts/ci/validate-nix-pins.sh /tmp/Codex.dmgpassed.nixis not installed on this host.Review Response Fix
flake.nixalready pinscodexVersion = "26.601.21317"in follow-up commit6aa6cd2.5e5d1b4:port integration helperterminology forbare-modifier-monitor.Sm/Rmminified names.selectedModel:nullsummary before returningnull.node --check scripts/patches/webview-assets.jspassed.node --test scripts/patch-linux-window-ui.test.jspassed (168 tests).git diff --checkpassed.make build-apppassed using cachedCodex.dmgfrom2026-06-02 20:09:09 -0400.updater/trusted-dmg-manifest.jsonmust track the refreshed flake DMG pin.Codex.dmgSHA-256 locally as03f8e6758bc67b71af35295c42890a6b112fbd6d5789e9d7d63e4b328e1a05ec.26.601.21317and the matching SHA-256 in commitfa61b9a.cargo test -p codex-app-updater trustpassed (11 tests).scripts/ci/validate-nix-pins.sh Codex.dmgpassed after rerunning outside the sandbox for npm cache access.Verification
node --test port-integrations/appshots/test.jspassed.node --test port-integrations/remote-mobile-control/test.jspassed.node --test scripts/patch-linux-window-ui.test.jspassed.bash -n tests/scripts_smoke.sh scripts/lib/package-common.shpassed.bash tests/scripts_smoke.shpassed.make build-app-fresh:Codex.dmgbut failed when npm tried to write~/.npmunder sandbox restrictions;make build-app-fresh2026-06-02 20:09:09 -040026.601.21317Summary by CodeRabbit
Bug Fixes
New Features
Documentation
Tests
Follow-Up App Build Fix
linux-fast-mode-model-guardto scan webview assets for the vulnerableserviceTiers.length/additionalSpeedTiersexpression directly, so the required patch passes when the current official bundle is already guarded and still fails on recognizable unpatchable drift.node --test scripts/patch-linux-window-ui.test.jsnode --check scripts/patches/core/all-linux/webview/fast-mode-guard/patch.jsenv CODEX_PATCH_REPORT_JSON=/tmp/codex-pr95-patch-report.json make build-appusing cachedCodex.dmgfrom2026-06-02 20:09:09 -0400, app version26.601.21317node scripts/ci/validate-patch-report.js /tmp/codex-pr95-patch-report.json --profile official-dmg-buildgit diff --checkFollow-Up Review Hardening
linux-fast-mode-model-guard: missing webview assets now return numericchanged: 0, and per-asset read/write failures are warned while the patcher continues scanning other candidates.node --test scripts/patch-linux-window-ui.test.jspassed (174 tests).node --check scripts/patches/core/all-linux/webview/fast-mode-guard/patch.jspassed.git diff --checkpassed.env CODEX_PATCH_REPORT_JSON=/tmp/codex-pr95-patch-report-review-fix.json make build-apppassed using cachedCodex.dmgfrom2026-06-02 20:09:09 -0400, app version26.601.21317.node scripts/ci/validate-patch-report.js /tmp/codex-pr95-patch-report-review-fix.json --profile official-dmg-buildpassed.Follow-Up Missing-Candidate Guard
linux-fast-mode-model-guarddescriptor must fail when no relevant webview asset is found.serviceTiers/additionalSpeedTiersshape and the current official service-tier helper shape withoutadditionalSpeedTiers; no relevant candidate emits a warning and records a required failure.node --test --test-name-pattern "fast-mode" scripts/patch-linux-window-ui.test.jspassed (7 tests).node --test scripts/patch-linux-window-ui.test.jspassed (175 tests).node --check scripts/patches/core/all-linux/webview/fast-mode-guard/patch.jspassed.git diff --checkpassed.env CODEX_PATCH_REPORT_JSON=/tmp/codex-pr95-patch-report-current-shape-fix.json make build-apppassed using cachedCodex.dmgfrom2026-06-02 20:09:09 -0400, app version26.601.21317.node scripts/ci/validate-patch-report.js /tmp/codex-pr95-patch-report-current-shape-fix.json --profile official-dmg-buildpassed;linux-fast-mode-model-guardreportedalready-applied.