Files
orca/config/scripts/pr-code-change-scope-daemon-protocol.test.mjs
T
OrcaWinandm4air 2a83c9536f ci(daemon): gate PRs on daemon protocol crossing from the newest release (#24089)
Lands daemon-protocol-facts.mjs from the Windows update diagnostic branch with a
stricter parser, and adds check-daemon-protocol-crossing.mjs (rule R1): the working
tree must attach the newest release tag's daemon. Rollback crossing is reported only.
Runs in the cross-version-wire job, which already has full tags; tag selection moves
to config/scripts/stable-release-tags.mjs so both use one rule.

Co-authored-by: m4air <m4air@m4airs-Air.localdomain>
2026-09-30 23:23:28 -07:00

22 lines
772 B
JavaScript

import { describe, expect, it } from 'vitest'
import { classifyPrJobs } from './pr-code-change-scope.mjs'
describe('daemon protocol crossing gate routing', () => {
it('runs the gate when the protocol constants change', () => {
expect(classifyPrJobs(['src/main/daemon/daemon-protocol-version.ts'])).toMatchObject({
should_run: true,
'cross-version-wire': true,
package: true,
package_windows: true
})
})
it.each([
'config/scripts/daemon-protocol-facts.mjs',
'config/scripts/check-daemon-protocol-crossing.mjs',
'config/scripts/stable-release-tags.mjs'
])('runs the gate when its checker %s changes', (file) => {
expect(classifyPrJobs([file])).toMatchObject({ should_run: true, 'cross-version-wire': true })
})
})