From 0aa764feddf00aed631019763ef777d38faf4335 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 11 Oct 2026 00:20:36 -0700 Subject: [PATCH] test(desktop): the main channel hand-off expects no channel-record request 4b351c751a3 made `main` resolve straight to the git branch without reading releases/channels/main.json (a WAF 403 on that never-published record stopped updates, #128295). The Desktop source hand-off test still served that record and asserted apply() fetched it twice, so JS & TS checks went red on every main push and PR since. The fixture no longer serves main.json and the test asserts re-resolving main makes zero requests -- a regression back to reading the record now 404s and fails the same assertion. --- .../electron/updater/checkout-source.test.ts | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/apps/desktop/electron/updater/checkout-source.test.ts b/apps/desktop/electron/updater/checkout-source.test.ts index 618a2fa1dd..1c06f6b11a 100644 --- a/apps/desktop/electron/updater/checkout-source.test.ts +++ b/apps/desktop/electron/updater/checkout-source.test.ts @@ -272,22 +272,6 @@ it('carries each install channel from Python publication checks into the source draft: false, prerelease: false }) - // The 'main' subscription is a source-branch channel record under the R2 protocol. - responses.set( - '/releases/channels/main.json', - JSON.stringify({ - schema: 1, - name: 'main', - repository: 'NousResearch/hermes-agent', - policy: 'source-branch', - state: 'active', - revision: 1, - nextSequence: 1, - identity: null, - head: null, - delivery: { kind: 'source-branch', branch: 'main' } - }) - ) git(['tag', 'v99.0.0']) git(['worktree', 'add', '-b', 'feature/gui', root]) git(['remote', 'add', 'origin', origin]) @@ -490,9 +474,9 @@ if not getattr(urllib.request, '_hermes_loopback', False): fs.rmSync(markerPath(home), { force: true }) fs.rmSync(scriptDirectory, { recursive: true, force: true }) expect(await strategy.apply()).toMatchObject({ manual: true, command: 'hermes update --branch feature/gui' }) - // apply() forces a fresh check; under the R2 protocol that re-resolution - // touches exactly the channel record — no GitHub or artifact chatter. - expect(requests.slice(count)).toEqual(['/releases/channels/main.json', '/releases/channels/main.json']) + // main IS the git branch: re-resolving it reads no channel record and makes no + // GitHub or artifact request, so a WAF that 403s the record can't stop the update. + expect(requests.slice(count)).toEqual([]) } finally { vi.restoreAllMocks() vi.unstubAllEnvs()