Repository navigation
Commit d6f5b5b
committed
fix(workspace): honour a live disconnect, and say when an engine is unrunnable
Codex round 9, the final review round. Two findings, both verified; each fix
confirmed to fail only its own test when reverted.
**A live disconnect is honoured even when the config cache is stale.** The
runtime status is authoritative for "not running"; the config is authoritative
for "the user turned it off" — and the two can disagree. MCP.disconnect writes
enabled:false straight to disk without invalidating Config, so immediately after
a user disconnects, the cached entry still reports enabled:true. Reading the
cache made the disabled status look synthesized, so the entry was reconnected and
persisted enabled again, undoing the disconnect — globally, when the owning entry
is global. The owning config is now re-read before that decision.
This is the third distinct route by which a raw config write without cache
invalidation has produced a wrong answer in this module, and the second time it
has defeated a fix from an earlier round.
**The integrations listing no longer reports an empty catalog when entries were
hidden.** A catalog of nothing but extension-type integrations filters down to
empty, and the explanatory footer sits after the early return, so the tool said
no integrations were available at all. The count and the VS Code requirement are
now included in that branch too.
Also, authorised separately rather than found by review: an engine that cannot
be run is now described as such instead of as out of date. versionOf reads stdout
only and returns null when the process fails, so a null means the binary
produced no version — broken, not old. Both states were previously reported as
"too old", which sent more than one debugging session hunting a version mismatch
that did not exist.
3 tests: a stale-cache disconnect stays disconnected and is never reconnected or
persisted, and the two refusal messages differ for an unreadable version versus a
genuinely old one.1 parent 791a286 commit d6f5b5b
3 files changed
Lines changed: 97 additions & 9 deletions
File tree
- packages/opencode
- src/altimate
- tools
- workspace
- test/altimate/workspace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
150 | 158 | | |
151 | | - | |
| 159 | + | |
152 | 160 | | |
153 | | - | |
| 161 | + | |
154 | 162 | | |
155 | 163 | | |
156 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
292 | 305 | | |
293 | 306 | | |
294 | 307 | | |
| |||
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
383 | 417 | | |
384 | 418 | | |
385 | 419 | | |
| |||
483 | 517 | | |
484 | 518 | | |
485 | 519 | | |
486 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
487 | 530 | | |
488 | 531 | | |
489 | 532 | | |
| |||
601 | 644 | | |
602 | 645 | | |
603 | 646 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
| 647 | + | |
| 648 | + | |
608 | 649 | | |
609 | 650 | | |
610 | 651 | | |
| |||
641 | 682 | | |
642 | 683 | | |
643 | 684 | | |
644 | | - | |
645 | | - | |
| 685 | + | |
| 686 | + | |
646 | 687 | | |
647 | 688 | | |
648 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
0 commit comments