fix(setup): drop ZCode's enable: false from retained entries

Main's ZCode registration treats a native enable: false as stale and expects setup to repair it. Entry retention kept that switch, so setup reported unchanged while doctor still reported stale.
This commit is contained in:
xeropresence
2026-10-12 21:49:21 -04:00
parent 55246a6425
commit 303008f35d
2 changed files with 10 additions and 7 deletions
@@ -1545,10 +1545,11 @@ const keepsCopilotTools = (dialect: ClientRegistrationDialect): boolean =>
/**
* Whether setup replaces or removes an existing entry key. Setup registers an
* active server, so entry-level switches that turn it off are removed too.
* A registration-status field that does not parse is removed as well, using
* the same schemas doctor uses, so setup cannot report success for a value
* doctor will reject. Grok Build's boolean entry `disabled` is kept.
* active server, so entry-level switches that turn it off are removed too,
* including ZCode's native `enable: false`. A registration-status field that
* does not parse is removed as well, using the same schemas doctor uses, so
* setup cannot report success for a value doctor will reject. Grok Build's
* boolean entry `disabled` is kept.
*/
const registrationManagedKey = (
dialect: ClientRegistrationDialect,
@@ -1560,6 +1561,7 @@ const registrationManagedKey = (
!registrationFieldAccepted(key, value) ||
(key === "tools" && !keepsCopilotTools(dialect)) ||
(key === "enabled" && value === false) ||
(key === "enable" && value === false && dialect === "zcode") ||
(key === "disabled" && value === true && !keepsGrokDisabledFlag(dialect));
/**