test(desktop): the main channel hand-off expects no channel-record request
4b351c751a 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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user