Skip to content

Agent: add experimental remote update controls - #1256

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-remote-upd-maple
Oct 24, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-remote-upd-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Paired computers expose task control but not their running application version or update readiness. This adds per-computer version/status visibility and an experimental action to install the exact signed update already prepared on the execution computer.

The controller keeps running and updates/restarts only when its user chooses. Password-protected execution hosts refuse remote installation even while unlocked. Confirmation names the computer and target version, explains that work and remote access stop, and warns that direct access may be needed for recovery.

Implementation

  • Preserve wire-6 Hello/ACK/ALPN; discover optional protocol 6.1.0 management capabilities through a bounded probe. Older wire-6 peers keep ordinary task access.
  • Bind consent and requests to account, peer, pairing grant, operation UUID, store scope, desktop lease and exact signed platform candidate. The client must already run the same release or have it verified and available locally.
  • Persist admission before acknowledging full reply delivery and queueing installation. Restart never recreates permission or replays work. The new host durably records an observed matching target; later upgrades preserve that historical outcome.
  • Reuse the signed updater, installation lock and typed host startup/ownership fences. Known pre-stop refusals preserve the same verified preparation without misleading recovery advice; uncertain shutdown remains blocked and conservative.
  • Recognize fs2 native install-lock contention consistently across platforms. A portable regression requires Busy while the guard is held and successful reacquisition after it drops; no Windows exclusion or relaxed ownership assertion.
  • Retry lost completion reports for the same account/lease/operation through the desktop's existing status pump. Never retry installation; account/lease loss or committed retirement discards stale reports.
  • Preserve version visibility when update coordination is unavailable, while denying installation. Keep current/unchecked status, reachability and historical request outcomes distinct.

Validation

  • Pinned nix develop --no-update-lock-file -c just ci passed: formatting, 9 Git metadata tests, all four strict Clippy configurations, warning-denied workspace builds/tests, 896 desktop-app tests, 260 headless-app tests and 65 updater tests. Existing ignored tests remain unchanged.
  • Repeated native transport checks on the unchanged transport code at fab616fd passed: mismatched-response-ID fixture 40/40, valid install-response/FIN delivery 40/40, rejected-delivery/no-install-ack 10/10, and normal 10 MiB ranged transfer 10/10. These are transport checks, not actual application installations.
  • Independent source/security review found no remaining blocker in the repaired replay, ownership, status and recovery paths.
  • Hosted checks passed at 86be316c: Agent CI (Windows/macOS/Linux, providers and Linux release binary), Dev packaging (unsigned macOS, Linux bundle and downloaded Linux verification), and store performance.
  • Windows logs confirm both the portable lock/drop/reacquire test and retained-lock regression passed. The earlier failure and full log remain retained; no assertion relaxation, platform exclusion, same-head rerun or check waiver was used.

Regressions cover durable success across startup and later upgrades, mismatched running identities, interrupted requests without replay, idempotent completion, dropped completion writes/acknowledgements, account/lease changes, explicit refusal versus uncertain local IPC shutdown, safe readiness restoration, unavailable journals and stale UI outcomes. The deliberately wrong-response-ID fixture permits the transport's valid rejection race while retaining strict delivery, reset, FIN and identity checks.

Preview limits

Remote installation requires the execution desktop running (including background mode) and its prepared signed candidate. Daemon-only hosts remain manual; feed checks and downloads use that computer's existing schedule and preference. Client updates stay manual across multiple remotes.

The existing 512-receipt cap is unchanged. Safe retention is a follow-up; forgetting an old nonce while its target is still installable would permit replay.

A signed packaged cross-computer update rehearsal remains a rollout qualification step for macOS and Linux. This PR changes no app version, Research updater/release, signing keys, production resources or publication workflow.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@AnthonyRonning
AnthonyRonning merged commit 1c29b03 into master Oct 24, 2026
39 checks passed
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.

1 participant