import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import test from 'node:test' const source = readFileSync(new URL('./phase4-overseas-pda.mjs', import.meta.url), 'utf8') test('cross-container lock is asserted once while both current-run containers are candidates', () => { assert.match(source, /if \(runAuthorizationProbes\) \{\s+const other = candidates\.data\.find/s) assert.match(source, /当前账号跨柜切换锁返回409/) assert.match(source, /runReceiving\(context, primary\.token, secondary\.token,[\s\S]*index === 0\)/) })