The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): contract-skew tests read REQUIRED_BACKEND_CONTRACT instead of a frozen 6
teknium11782bf79c8bc
diff --git a/apps/desktop/src/store/updates.test.ts b/apps/desktop/src/store/updates.test.tsindex 1fbd284d93e..92d17236776 100644--- a/apps/desktop/src/store/updates.test.ts+++ b/apps/desktop/src/store/updates.test.ts@@ -85,6 +85,7 @@ const {$backendUpdateStatus,applyBackendUpdate,$backendUpdateApply,+ REQUIRED_BACKEND_CONTRACT,reportBackendContract,applyUpdates,applyEverythingUpdate,@@ -194,7 +195,7 @@ describe('reportBackendContract', () => {})it('dismisses the toast when the backend meets the contract', () => {- reportBackendContract(6)+ reportBackendContract(REQUIRED_BACKEND_CONTRACT)expect(dismissSpy).toHaveBeenCalledWith('backend-contract-skew')expect(notifySpy).not.toHaveBeenCalled()})@@ -234,7 +235,7 @@ describe('reportBackendContract', () => {lastToast().onDismiss()notifySpy.mockClear()- reportBackendContract(6) // backend updated → satisfied, snooze cleared+ reportBackendContract(REQUIRED_BACKEND_CONTRACT) // backend updated → satisfied, snooze clearedreportBackendContract(5) // a later regression must warn immediatelyexpect(notifySpy).toHaveBeenCalledTimes(1)})diff --git a/apps/desktop/src/store/updates.ts b/apps/desktop/src/store/updates.tsindex e2ff292f723..06fedccfe7d 100644--- a/apps/desktop/src/store/updates.ts+++ b/apps/desktop/src/store/updates.ts@@ -105,7 +105,7 @@ function isUpdateToastSnoozed(): boolean {// v7: requires JSON-RPC server->client requests for every blocking prompt// (approval/clarify/sudo/secret/vault/MCP setup); a v6 backend's// `<kind>.request` notifications would never render a card.-const REQUIRED_BACKEND_CONTRACT = 7+export const REQUIRED_BACKEND_CONTRACT = 7const SKEW_TOAST_ID = 'backend-contract-skew'// The contract check runs on every session.resume (applyRuntimeInfo), so// without a snooze the warning re-popped on every thread the user opened, even