Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): preserve native provider executable paths during updates #9850

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/9850/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Native provider updates discarded the resolved executable path and invoked a bare command name. A provider configured outside PATH could run normally but fail its one-click update with ENOENT.

Keep the resolved launcher path for native updates, including symlinked launchers. Installer detection, update arguments, and locking stay unchanged. This covers the native OpenCode and Claude paths; package-managed updates keep their existing commands.

Addresses the native OpenCode and Claude update-path failure in #6115. The report also mentions package-managed Codex and general shell discovery; those paths are not changed here, so the issue should remain open.

Validation against main ed2bdbb:

  • Before: all four new regressions fail. A disposable fake updater at an absolute path with spaces fails with spawnSync scoped-package-tool ENOENT under an empty PATH.
  • After: 33 maintenance/resolver tests pass, including the same executable fixture, Windows-style path preservation, and symlink-launcher selection. Server typecheck and targeted lint pass.
  • No real provider installation or update was run. Windows path selection is covered by a pure fixture; the executable test ran on Linux.

This is only path preservation. Broader installer ownership and mise routing remain in #9325 and #9225.

GPT 6 Astra via Codex in T3 Code.

Note

Preserve resolved native provider executable paths during updates

  • Fixes native provider maintenance so updates execute through the resolved command path rather than the bare command name from the provider definition.
  • makeNativeProviderMaintenanceCapabilities now accepts a command-path parameter and uses it as the update executable. resolvePackageManagedProviderMaintenance passes the resolved path when it or its real target matches the native command-path predicate.
  • The real target path remains used for native-install identification; only the executable path changes.
  • Adds tests covering executables outside PATH, paths with spaces, Unix/Windows absolute paths, and symlink resolution where the launcher differs from the installation target.
  • Risk: native updaters previously invoked by bare command name now require the resolved path to exist on disk; if the resolved path becomes stale after an external relocation, updates will fail to launch.
Macroscope summarized f608540.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.7 KiB13.7 KiB−6 B (−0.0%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.0 KiB+4 B (+0.1%)7.3 KiB✅
      CodexLive turn WebSocket wire6.7 KiB6.7 KiB−10 B (−0.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded58.5 KiB58.5 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages10100 (0.0%)21✅
      ClaudeTotal thread wire13.6 KiB13.6 KiB−5 B (−0.0%)15.1 KiB✅
      ClaudeThread snapshot wire7.0 KiB7.0 KiB−2 B (−0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.5 KiB6.5 KiB−3 B (−0.0%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.8 KiB57.8 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages990 (0.0%)21✅

      Baseline: 8faf031 · PR result: f608540 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 113.8 KiB
      • Claude decoded thread snapshot: 114.5 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. Approvability

      Verdict: Approved at f608540

      Macroscope's review found this PR approvable — This narrowly scoped server fix preserves the resolved native provider executable when running an existing update action, including configured paths outside PATH and paths containing spaces. The accompanying tests cover native, symlinked, and platform-specific path cases without changing defaults or broader update mechanisms.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged this2d5464a

    5. juliusmarminge closed this

Sign in to join this conversation.