Repository navigation
Commit 42fb816
committed
fix(workspace): honour a config disable regardless of runtime connectivity
Codex round 16. One finding, verified, and it is the mirror of round 9's.
Round 9 handled the runtime saying "disabled" while the config said enabled —
a synthesized status that a teardown produces. This is the reverse: the config
says `enabled: false` while MCP still reports "connected" from live client state,
because an IDE or a direct edit can disable the entry without stopping the
running client.
The disable check was nested inside the not-connected branch, so that case was
skipped entirely — and for an unpinned entry the replacement path below would
then have persisted it enabled again, undoing the very edit the user had just
made.
The check is lifted above the connectivity branch. The config's `enabled` flag is
the only place a user expresses "off", so it is consulted before anything else;
runtime connectivity answers a different question and cannot stand in for intent.
The two sources disagree in both directions, and each direction cost a round to
find. That is the argument for reading intent from one authority rather than
inferring it from whatever signal is nearest.
Residual, named rather than hidden: a client that is already connected keeps
serving until MCP drops it. This flow stops attaching and stops re-enabling, but
it does not tear down a live client on the strength of someone else's config edit.
1 test: a config disable is honoured while the runtime still reports connected —
no attach, no persist, no reconnect. It fails with the check re-nested.1 parent fd5f2f8 commit 42fb816
2 files changed
Lines changed: 48 additions & 29 deletions
File tree
- packages/opencode
- src/altimate/workspace
- test/altimate/workspace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 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 | + | |
609 | 638 | | |
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 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1428 | 1428 | | |
1429 | 1429 | | |
1430 | 1430 | | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
0 commit comments