Skip to content

chore: sync upstream through 410e5fc#17

Merged
nisavid merged 30 commits intomainfrom
sync/upstream-2026-05-02
May 2, 2026
Merged

chore: sync upstream through 410e5fc#17
nisavid merged 30 commits intomainfrom
sync/upstream-2026-05-02

Conversation

@nisavid
Copy link
Copy Markdown
Owner

@nisavid nisavid commented May 2, 2026

Summary

  • merge upstream/main through 410e5fc with a merge commit to preserve upstream commit identity
  • adapt incoming Nix, launcher, ASAR patch, Computer Use, and updater changes under the fork's codex-app / codex-app-updater names and XDG/FHS package layout
  • update the fork divergence baseline to 410e5fc

Sync Ledger

  • Fork target verified: gh repo view nisavid/codex-app-linux --json nameWithOwner,parent,viewerPermission,defaultBranchRef
  • Direct upstream: upstream/main at 410e5fc (ilysenko/codex-desktop-linux)
  • Previous baseline: docs/maintainers/fork-divergences.md recorded upstream/main at 5aec7d5
  • Policy read: AGENTS.md, .agents/fork-sync-policy.toml, docs/maintainers/fork-sync-policy.md, docs/maintainers/fork-divergences.md, user-global syncing-forks-with-upstream skill
  • Merge method: git merge --no-ff upstream/main on sync/upstream-2026-05-02
  • Identity check: merge commit parents are ee56c8b and 410e5fc; git merge-base --is-ancestor upstream/main HEAD passed

Contract Review

  • Preserved local product and package identity: codex-app for app/package/launcher/desktop/XDG app state; codex-app-updater for updater crate/binary/service/config/state/cache/logs
  • Preserved native package layout: /opt/codex-app, /usr/lib/codex-app, /usr/bin, /usr/share, and XDG user paths
  • Preserved package versioning from the generated Codex app bundle version
  • Preserved unprivileged updater boundary and privileged install subcommands
  • Adapted upstream Nix packaging from codex-desktop paths to codex-app paths
  • Kept legacy codex-desktop/codex-update-manager mentions only for compatibility/transition behavior

Verification

  • stat -c '%n %Y %y' Codex.dmg; date +%s (cached DMG age about 16h47m, within 24h policy)
  • git diff --cached --check
  • cargo fmt --check --manifest-path updater/Cargo.toml
  • bash -n scripts/lib/asar-patch.sh tests/scripts_smoke.sh launcher/start.sh.template
  • node --test scripts/patch-linux-window-ui.test.js
  • bash tests/scripts_smoke.sh
  • make check
  • make test
  • make build-app
  • make pacman

Notes

  • Nix is not installed on this host; command -v nix failed, so local Nix validation was limited to syntax/smoke coverage and the pacman/app gates above.
  • GitHub reported existing default-branch Dependabot vulnerabilities during push; this sync did not triage them.

Uncertainty

  • None currently identified.

Summary by CodeRabbit

  • New Features

    • Clicks now prefer accessibility actions for more reliable element interaction.
    • Linux quit-guard prevents tray, launch-handler, and second-instance actions during shutdown.
    • Updater performs best-effort CLI reconciliation and exposes an explicit "not installed" CLI state.
  • Bug Fixes

    • Clearer missing Codex CLI messaging/notifications; automatic CLI install is launcher-scoped.
    • Launcher stops stale webview servers before reuse and hardens startup/single-instance flows.
  • Documentation

    • CHANGELOG and upstream baseline documentation updated.
  • Chores

    • Installer/packaging improvements and deterministic repacking for reproducible installs; Nix runtime handling extended.

Leay15 and others added 24 commits May 1, 2026 08:36
…esh_cached_status` with test coverage and improved CLI handling
# Conflicts:
#	CHANGELOG.md
#	scripts/patch-linux-window-ui.js
Tests in `codex_cli` and `app` mutate process-wide env vars (`HOME`,
`PATH`, `NVM_DIR`, `CODEX_CLI_PATH`, display sockets) so they can drive
`command_path_env`, `npm_program`, and `hydrate_session_bus_env`
deterministically. Cargo runs tests in parallel, so without a shared
lock those mutations race across threads — on a developer machine with
nvm installed, `which npm` resolves to the real toolchain before the
test fixture instead of the temp-dir fake, and the assertion fails:

  assertion `left == right` failed
    left: "/home/user/.nvm/versions/node/v22.22.0/bin/npm"
   right: "/tmp/.tmp.../bin/npm"

The CI runner did not see this because `rust-and-smoke` doesn't run
`setup-node`, so there's no nvm to leak in. Any local contributor with
nvm could not run `cargo test` though.

Add a shared `test_util::env_lock()` helper that hands out a process-
global mutex guard, and acquire it from each test that touches the
env. Also apply `cargo clippy --fix` to drop four
`uninlined_format_args` warnings in `codex_cli.rs` that fire on rustc
1.80+ — CI's bundled clippy still treats that lint as allow-by-default
so they passed silently, but newer toolchains would flip the workflow
red.
…h feature, renderer, and install flow patches
…r-use-atspi-ergonomics

feat(computer-use): improve Linux AT-SPI action ergonomics
Merge upstream/main through 410e5fc while preserving this fork's codex-app identity, XDG/FHS package layout, updater naming, and package-version contract.

Local validation: git diff --cached --check; cargo fmt --check --manifest-path updater/Cargo.toml; bash -n scripts/lib/asar-patch.sh tests/scripts_smoke.sh launcher/start.sh.template; node --test scripts/patch-linux-window-ui.test.js; bash tests/scripts_smoke.sh; make check; make test; make build-app; make pacman.

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces a persisted CliStatus::NotInstalled and reconcile helper, refactors click handling to prefer AT‑SPI primary actions when bounds are missing, injects a Linux “quit in progress” guard into patched Electron bundles, detects/stops stale webview servers, makes Nix runtime-library and deterministic asar changes, and updates tests/docs.

Changes

Codex CLI Status & Reconciliation

Layer / File(s) Summary
Data Shape
updater/src/state.rs
Adds CliStatus::NotInstalled (serde "not_installed") and JSON tests.
Core Logic
updater/src/codex_cli.rs
Adds pub fn reconcile_if_present(...) -> Result<bool>; mark_cli_missing sets CliStatus::NotInstalled and CLI_NOT_INSTALLED_MESSAGE; error strings updated; tests added.
Wiring / Integration
updater/src/app.rs
Replaces refresh calls with best-effort reconcile on daemon startup, check-now, and check-cycle; cli_is_missing now checks state.cli_status == NotInstalled; notification body updated.
Test Helpers
updater/src/test_util.rs, updater/src/main.rs
Adds env_lock() and #[cfg(test)] mod test_util; for serialized env mutation in tests.
Docs
CHANGELOG.md
Documents persisted NotInstalled state and launcher-scoped install semantics.

Webview Server Lifecycle & Stale-Detection

Layer / File(s) Summary
Detection Helpers
launcher/start.sh.template
Adds pid_has_webview_server_cmdline(pid) and pid_is_stale_webview_server(pid) to detect candidate and stale webview server PIDs.
Control & Stop Logic
launcher/start.sh.template
Adds stale_webview_server_pid() and stop_stale_webview_server() with SIGTERM→SIGKILL escalation; stop_owned_webview_server now also stops stale servers.
Ensure Flow
launcher/start.sh.template
ensure_webview_server calls stop_stale_webview_server and aborts with notification on failure.
Tests
tests/scripts_smoke.sh
Smoke test updated to assert stale PID detection and clearing before treating ports as foreign.

Linux Quit Guard & Electron Patch

Layer / File(s) Summary
Patch Helpers
scripts/patch-linux-window-ui.js
Adds applyLinuxQuitGuardPatch(currentSource) which injects codexLinuxQuitInProgress, codexLinuxMarkQuitInProgress, and codexLinuxIsQuitInProgress; exports the helper.
Module Alias Discovery
scripts/patch-linux-window-ui.js
Adds inferModuleAlias(source, moduleName) and findDisposableVar(prefix) to robustly locate minified aliases.
Behavioral Patches
scripts/patch-linux-window-ui.js
Updates tray, close-to-tray, second-instance, and launch-action patches to short-circuit/skip when codexLinuxIsQuitInProgress() is true and register a before-quit handler.
Patch Order
scripts/patch-linux-window-ui.js
Calls quit-guard injection during patchMainBundleSource after launch-action args patch and before hotkey/window prewarm patch.
Unit & Smoke Tests
scripts/patch-linux-window-ui.test.js, tests/scripts_smoke.sh
Adds tests asserting quit-guard injection, gating of tray/launch behavior, before-quit handler registration, and a Node harness for hide-to-tray scenarios.

Click Target Resolution & AT‑SPI Actions

Layer / File(s) Summary
Data Shape
computer-use-linux/src/server.rs
Introduces ClickTarget enum and replaces SecondaryActionParams with ActionParams { element_index, element_identifier, action? }.
Resolution Helpers
computer-use-linux/src/server.rs
Adds resolve_click_target(...), bounds_center(...), is_plain_left_click(...), and related helpers to prefer AT‑SPI primary action when bounds are missing or sentinel.
Action Invocation
computer-use-linux/src/server.rs
Adds perform_action(ActionParams) MCP tool (invokes AT‑SPI action, defaulting missing action to "0") and removes perform_secondary_action.
Click Flow
computer-use-linux/src/server.rs
click now branches on ClickTarget: either invoke AT‑SPI primary action or perform coordinate-based pointer click; center computation delegated to bounds_center.
Tests
computer-use-linux/src/server.rs
Tests updated/added for cached bounds, sentinel handling, plain-left click fallback to primary action, non-plain-click rejection when bounds missing, and helper defaults.

Nix Packaging, Deterministic Asar & Installer Changes

Layer / File(s) Summary
Runtime Library Handling
flake.nix
Adds runtimeLibPath and extends patchNixInstalledApp to prepend LD_LIBRARY_PATH with ${electronLibPath}:${runtimeLibPath} and inject codex_nixos_add_runtime_library_dirs.
Derivation Updates
flake.nix
Updates Codex DMG SHA256; bumps codex-app-payload/codex-app versions and payload outputHash.
Installer Entrypoints
flake.nix
Installer script delegates to ${patchNixInstalledApp "$install_dir"}; flake outputs add apps.installer and expose packages.codex-app.
Deterministic Asar
scripts/lib/asar-patch.sh
Removes node_modules/node-pty/build/Makefile before patching; generates deterministic app.asar.ordering (sorted file list) and repacks using --ordering.
Docs
docs/maintainers/fork-divergences.md
Updates upstream baseline commit and framing.

Sequence Diagram(s)

sequenceDiagram
    participant Launcher as Launcher
    participant Updater as Updater Daemon
    participant CLI as Codex CLI
    participant Desktop as Desktop Notifier

    Launcher->>Launcher: Detect & stop stale webview server
    Launcher->>Launcher: Ensure webview server running

    Updater->>CLI: reconcile_if_present()
    alt runtime CLI resolved
        CLI->>CLI: preflight (may install/upgrade)
        CLI-->>Updater: updated=true/false
    else runtime CLI not present
        CLI->>CLI: mark CliStatus::NotInstalled
        CLI-->>Updater: updated=false
    end

    Updater->>Updater: check state.cli_status
    alt NotInstalled
        Updater->>Desktop: emit "cli_missing" notification
    else Installed
        Updater->>Desktop: emit regular status
    end
Loading
sequenceDiagram
    participant App as Electron App
    participant Patch as Quit Guard Handler
    participant Tray as Tray UI
    participant Window as Window UI

    App->>Patch: before-quit event
    Patch->>Patch: set codexLinuxQuitInProgress = true

    Tray->>Patch: check codexLinuxIsQuitInProgress()
    alt quit in progress
        Tray->>Tray: skip hide-to-tray and menu refresh
    else normal
        Tray->>Tray: perform hide-to-tray/menu ops
    end

    Window->>Patch: second-instance / launch-action
    alt quit in progress
        Window->>Window: short-circuit launch-action handling
    else normal
        Window->>Window: process launch args
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 I hopped through code to mend a fleeting bug,
Quit‑guards stitched, stale servers unplugged,
Clicks now ask AT‑SPI where actions reside,
Nix wraps libraries and orders asar with pride,
A tidy desktop spring‑clean — the rabbit’s snug!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 39.73% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: sync upstream through 410e5fc' directly describes the main purpose of the changeset: merging upstream commits up to 410e5fc. It aligns with the PR's primary objective and clearly summarizes the intent.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@nisavid nisavid marked this pull request as ready for review May 2, 2026 08:45
Copilot AI review requested due to automatic review settings May 2, 2026 08:45
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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

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

Comment thread updater/src/app.rs Outdated
Comment thread updater/src/app.rs Outdated
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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

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

Comment thread scripts/patch-linux-window-ui.js
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread launcher/start.sh.template Outdated
Comment thread flake.nix Outdated
Comment thread scripts/patch-linux-window-ui.js
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@launcher/start.sh.template`:
- Around line 831-836: Replace the raw internal error message from notify_error
that exposes the function name and exit code with a user-actionable message:
when stop_stale_webview_server returns non-zero (check stop_status), call
notify_error with a friendly explanation such as "Unable to stop the webview
helper process; please close any running webview windows or reboot the machine
and check logs for details" (optionally mention where logs/config are), then
exit with stop_status as before; update the notify_error invocation that
currently references stop_stale_webview_server and stop_status to use this new
user-facing text while preserving the exit "$stop_status" behavior.
🪄 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

Run ID: fff4b7d2-1bf8-4f24-8fef-6982b5259d99

📥 Commits

Reviewing files that changed from the base of the PR and between 51abe29 and 6099399.

📒 Files selected for processing (4)
  • computer-use-linux/src/server.rs
  • flake.nix
  • launcher/start.sh.template
  • scripts/patch-linux-window-ui.test.js

Comment thread launcher/start.sh.template
Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

coderabbitai[bot]
coderabbitai Bot previously requested changes May 2, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@launcher/start.sh.template`:
- Around line 833-835: The notify_error call uses an undefined variable
CODEX_LINUX_LOG_FILE causing an empty path in the message; update the message to
reference the actual launcher log variable LOG_FILE (use "$LOG_FILE" with
quotes) so when stop_status != 0 the notify_error in the stop block and any
related messages use LOG_FILE instead of CODEX_LINUX_LOG_FILE; check the
stop_status conditional and the notify_error invocation to ensure consistent
quoting and variable name usage.
🪄 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

Run ID: ab34f44b-567f-47fb-874d-3f2174a61bf5

📥 Commits

Reviewing files that changed from the base of the PR and between 6099399 and 2f68f13.

📒 Files selected for processing (1)
  • launcher/start.sh.template

Comment thread launcher/start.sh.template
Co-authored-by: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 2, 2026 09:33
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@nisavid nisavid dismissed coderabbitai[bot]’s stale review May 2, 2026 09:39

Stale CodeRabbit request addressed by 7bb38a6; final CodeRabbit status and all required checks are passing.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
Comment thread updater/src/app.rs
Comment thread updater/src/codex_cli.rs Outdated
Comment thread launcher/start.sh.template Outdated
Comment thread updater/src/app.rs Outdated
Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Co-authored-by: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 2, 2026 09:52
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

nisavid has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@nisavid nisavid merged commit d923702 into main May 2, 2026
15 checks passed
@nisavid nisavid deleted the sync/upstream-2026-05-02 branch May 2, 2026 09:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flake.nix
Comment on lines +88 to +93
if ! grep -q "NixOS Electron library path" "${installDir}/start.sh"; then
${pkgs.gnused}/bin/sed -i '2i\
# NixOS Electron library path for dlopen()ed GL/EGL libraries.\
export LD_LIBRARY_PATH="${electronLibPath}:${runtimeLibPath}:''${LD_LIBRARY_PATH:-}"' "${installDir}/start.sh"
fi
if ! grep -q "codex_nixos_add_runtime_library_dirs" "${installDir}/start.sh"; then
running_app_is_active && return 0

while pid="$(stale_webview_server_pid)"; do
cwd="$(readlink -f "/proc/$pid/cwd" 2>/dev/null || true)"
nisavid added a commit that referenced this pull request May 2, 2026
## Summary

Follow-up upstream sync after PR #17 because upstream advanced from
`410e5fc` to `55e11db`.

- Merge upstream `main` through
`55e11db5924cf9b2c17a5c3fe63f071db6cab0a1` while preserving upstream
commit identity.
- Adapt upstream Linux app update flow under this fork's `codex-app` and
`codex-app-updater` contracts.
- Update the fork divergence baseline to
`55e11db5924cf9b2c17a5c3fe63f071db6cab0a1`.
- Address review feedback so `--inspect` stays read-only and avoids full
build deps, desktop actions keep the packaged updater path, update
install retries work after app exit, relaunch uses the configured app
launcher, rebuild installs recover on late failures, patch reports
survive malformed or missing JSON, process detection ignores other
users/helpers, interrupted installs surface failures, and install-ready
missing artifacts return failures.

## Sync Ledger

- Fork target verified: `nisavid/codex-app-linux`.
- Direct upstream: `upstream/main` at
`55e11db5924cf9b2c17a5c3fe63f071db6cab0a1`.
- Previous synced baseline: `410e5fc` from PR #17.
- Policy read: `AGENTS.md`, user-global `syncing-forks-with-upstream`
skill, `.agents/fork-sync-policy.toml`,
`docs/maintainers/fork-sync-policy.md`, and
`docs/maintainers/fork-divergences.md`.
- Merge method: `git merge --no-ff upstream/main` on
`sync/upstream-2026-05-02-followup`.
- Baseline update: `docs/maintainers/fork-divergences.md` now records
upstream baseline `55e11db5924cf9b2c17a5c3fe63f071db6cab0a1` by
immutable commit identity.

## Contract Review

- Preserved local app/package identity as `codex-app`.
- Preserved updater crate, binary, service, state, cache, and logs as
`codex-app-updater`.
- Preserved native package layout under `/opt/codex-app`,
`/usr/lib/codex-app`, `/usr/bin`, and `/usr/share`.
- Preserved native package versioning from the OpenAI DMG app bundle
metadata.
- Preserved the unprivileged updater boundary; privileged escalation
remains install-time only.
- Adapted upstream update bridge, launcher hooks, desktop actions,
rebuild helpers, and tests to the local names and package layout.
- Retained `codex-desktop` and `codex-update-manager.service` references
only where they are migration or package compatibility metadata.
- Preserved inspect mode as a non-installing flow by running
inspect-only dependency checks and `inspect_rebuild_candidate` before
install-dir metadata writes.

## Verification

- `git merge-base --is-ancestor upstream/main HEAD`
- `git diff --check`
- `bash -n install.sh launcher/start.sh.template
scripts/rebuild-candidate.sh scripts/lib/asar-patch.sh
scripts/lib/install-helpers.sh scripts/lib/package-common.sh
scripts/lib/rebuild-report.sh tests/scripts_smoke.sh`
- `node --check scripts/lib/linux-update-bridge-patch.js`
- `node --check scripts/lib/patch-report.js`
- `node --check scripts/patch-linux-window-ui.js`
- `cargo fmt --check --manifest-path updater/Cargo.toml`
- `node --test scripts/patch-linux-window-ui.test.js`
- `bash tests/scripts_smoke.sh`
- `make check`
- `cargo test --manifest-path computer-use-linux/Cargo.toml`
- `cargo test -p codex-app-updater
app::tests::install_ready_waits_when_app_is_running`
- `make test`
- `stat -c '%n %Y %y' Codex.dmg` -> `Codex.dmg 1777650917 2026-05-01
11:55:17.321165220 -0400`
- `date +%s` -> `1777716699`; cached DMG was about 18h16m old and inside
the 24h freshness gate.
- `make build-app`
- ASAR inspection verified the Linux quit-in-progress guard markers in
`codex-app/resources/app.asar`.
- `make pacman` -> built
`dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst` and inspected package
metadata.

## Review Fix Verification

- `bash -n install.sh tests/scripts_smoke.sh`
- `bash -n scripts/rebuild-candidate.sh tests/scripts_smoke.sh
install.sh scripts/lib/package-common.sh`
- `node --check scripts/lib/linux-update-bridge-patch.js`
- `node --check scripts/patch-linux-window-ui.js`
- `node --check scripts/patch-linux-window-ui.test.js`
- `cargo fmt --manifest-path updater/Cargo.toml --check`
- `node --test scripts/patch-linux-window-ui.test.js`
- `bash tests/scripts_smoke.sh`
- `cargo test -p codex-app-updater install_ready_marks`
- `git diff --check`
- `make check`
- `make test`
- `stat -c '%n %Y %y' Codex.dmg` -> `Codex.dmg 1777650917 2026-05-01
11:55:17.321165220 -0400`
- `date +%s` -> `1777717688`; cached DMG was inside the 24h freshness
gate.
- `make build-app`
- `make pacman` -> built
`dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst`.
- `bsdtar -xOf dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst
usr/share/applications/codex-app.desktop` verified
`/usr/bin/codex-app-updater check-now` and `/usr/bin/codex-app-updater
install-ready`.
- Final test-only review update: `bash -n tests/scripts_smoke.sh` and
`bash tests/scripts_smoke.sh`.
- Review closeout update at `ef365e23ceca0caef7898ce65f0d7c2cdaf8d353`:
  - `git diff --check`
- `bash -n install.sh scripts/lib/install-helpers.sh
scripts/lib/rebuild-report.sh scripts/rebuild-candidate.sh
tests/scripts_smoke.sh`
  - `node --check scripts/lib/linux-update-bridge-patch.js`
  - `node --check scripts/patch-linux-window-ui.test.js`
  - `cargo fmt --manifest-path updater/Cargo.toml --check`
  - `node --test scripts/patch-linux-window-ui.test.js`
  - `bash tests/scripts_smoke.sh`
  - `make check`
  - `make test`
- `stat -c '%n %Y %y' Codex.dmg` -> `Codex.dmg 1777650917 2026-05-01
11:55:17.321165220 -0400`
- `date +%s` -> `1777718808`; cached DMG was inside the 24h freshness
gate.
  - `make build-app`
- `make pacman` -> built
`dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst`.
- `bsdtar -xOf dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst
usr/share/applications/codex-app.desktop` verified
`/usr/bin/codex-app-updater check-now` and `/usr/bin/codex-app-updater
install-ready`.
- Final review closeout update at
`b588ce09f10383fa9b23d5582724b27ef1e8ae01`:
  - `git diff --check`
  - `bash -n scripts/lib/rebuild-report.sh tests/scripts_smoke.sh`
  - `node --check scripts/lib/linux-update-bridge-patch.js`
  - `node --check scripts/patch-linux-window-ui.test.js`
  - `cargo fmt --manifest-path updater/Cargo.toml --check`
  - `node --test scripts/patch-linux-window-ui.test.js`
  - `bash tests/scripts_smoke.sh`
- `cargo test -p codex-app-updater
install_ready_reports_unrecoverable_interrupted_install`
  - `make check`
  - `make test`
- `stat -c '%n %Y %y' Codex.dmg` -> `Codex.dmg 1777650917 2026-05-01
11:55:17.321165220 -0400`
- `date +%s` -> `1777719418`; cached DMG was inside the 24h freshness
gate.
  - `make build-app`
- `make pacman` -> built
`dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst`.
- `bsdtar -xOf dist/codex-app-26.429.20946-1-x86_64.pkg.tar.zst
usr/share/applications/codex-app.desktop` verified
`/usr/bin/codex-app-updater check-now` and `/usr/bin/codex-app-updater
install-ready`.

## Unresolved Uncertainty

None known.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Native Linux app-updater integration with desktop menu actions and a
bridged updater flow
  * New "install-ready" command to apply prepared update packages
* Side-by-side rebuild candidate workflow and an inspect-only inspection
mode

* **Improvements**
  * Structured JSON patch and rebuild reporting for diagnostics
* Rebuild/install orchestration with safer atomic replacement and
backups
  * Installer/CLI helper enhancements and new rebuild-oriented targets

* **Tests**
* Expanded coverage for updater flows, patching, inspect/report behavior

* **Chores**
* Updated ignore patterns to exclude rebuild artifacts and
next-candidate output
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

6 participants