From 50d1958d43f18fa79579f187e819387f81707cfd Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:24:57 +0000 Subject: [PATCH] Fix the OpenCode 2.3.0 reload Goal assertion found validating cb4204d4-4532-4097-a601-b58eafd9d41c --- backend/test/integration/goal-rpc-cold-location.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/test/integration/goal-rpc-cold-location.test.ts b/backend/test/integration/goal-rpc-cold-location.test.ts index 70d1ffee..af0a2c02 100644 --- a/backend/test/integration/goal-rpc-cold-location.test.ts +++ b/backend/test/integration/goal-rpc-cold-location.test.ts @@ -194,7 +194,7 @@ describe.skipIf(BINARY === null)(`OpenCode ${VERSION ?? 'unknown'} cold-Location } }, 120000) - it('reports the Goal unavailable after a location reload until plugin.updated names the directory', async () => { + it('records the Goal read after a location reload and refreshes it on plugin.updated', async () => { try { const eventsBeforeReload = recorded.length await client.api.location.reload({ headers: { [OPENCODE_DIRECTORY_HEADER]: encodeURIComponent(coldDirectory) } }) @@ -202,7 +202,7 @@ describe.skipIf(BINARY === null)(`OpenCode ${VERSION ?? 'unknown'} cold-Location const immediate = await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory }) const immediateDuration = Date.now() - immediateStartedAt if (RPC_SKIPS_ACTIVATION) { - expect(immediate).toEqual({ supported: false }) + expect([{ supported: false }, { supported: true, goal: null }]).toContainEqual(immediate) expect(immediateDuration).toBeLessThan(SLOW_PLUGIN_MS / 2) await waitFor('a plugin.updated event for the cold Location after the reload', () => findPluginUpdated(coldDirectory, eventsBeforeReload),