Repository navigation
Commit 40abd23
committed
fix(codex): report a destroyed shim instead of bailing silently
A version manager (mise/asdf/volta) rewrites its install tree in place on
upgrade, destroying both the opencodex shim and the sibling .opencodex-real
backup that auto-restore needs. Auto-restore returned a bare ineligible with no
message, and the CLI warns only when a message exists, so ocx start, ocx ensure,
and ocx service repair all reported success while routing quietly stayed native.
That is the cause behind the misleading green status in #2411.
Auto-restore now explains itself. The message names the wrapper state, the
missing backup, and both paths, and for a version-manager tree it says why no
repair is coming and what to do instead.
Restoring by adopting the newly installed binary as a replacement original would
be wrong twice: it records a provenance that never happened, and the next upgrade
overwrites it again, so the repair would silently un-repair on the version
manager's schedule. allowFreshInstall stays false. The replacement path is also
refused on a version-manager tree even when a stale backup survives, since that
is the same adoption arriving through the back door.
Per the plan audit, every reachable silent bail now carries a message, not only
the one in the report: the preserveOnly sibling case and the unhealthy-probe case
were equally invisible.
Healthy shims are untouched, including version-manager-owned ones that are
currently intact. Detection gates repair, not operation.
Docs record that a version-manager install tree is not a supported shim target
and point those users at openai_base_url routing plus the service.
Closes #24121 parent 240ac38 commit 40abd23
3 files changed
Lines changed: 102 additions & 4 deletions
File tree
- docs-site/src/content/docs/reference/cli
- src/codex
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
363 | 376 | | |
364 | 377 | | |
365 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
606 | 647 | | |
607 | 648 | | |
608 | 649 | | |
| |||
2039 | 2080 | | |
2040 | 2081 | | |
2041 | 2082 | | |
2042 | | - | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
2043 | 2086 | | |
2044 | 2087 | | |
2045 | | - | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
2046 | 2091 | | |
2047 | 2092 | | |
2048 | 2093 | | |
2049 | | - | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
2050 | 2097 | | |
2051 | 2098 | | |
2052 | 2099 | | |
2053 | 2100 | | |
2054 | 2101 | | |
2055 | 2102 | | |
2056 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
2057 | 2110 | | |
2058 | 2111 | | |
2059 | 2112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
1999 | 1999 | | |
2000 | 2000 | | |
2001 | 2001 | | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
0 commit comments