fix: route unload events to domestic bridge

This commit is contained in:
2026-08-24 23:43:08 +08:00
parent 058bf9f4e6
commit a22a284e7d
6 changed files with 25 additions and 4 deletions
@@ -53,6 +53,11 @@ test('canonical states, ten ordered nodes, exception codes and complete payload
'locationCode', 'locationName', 'reason'])
})
test('actual node timestamps advance from the frozen outbound-confirm fact instead of the runner timezone', () => {
assert.match(source, /Date\.parse\(`\$\{frozenLatestActual\}Z`\)/)
assert.match(source, /frozenLatestActualMs\) \? Date\.now\(\) : frozenLatestActualMs/)
})
test('module exposes no scheduler, attempt, internal or arbitrary stop endpoint', () => {
assert.match(source, /\/manual-nodes/)
assert.match(source, /'Idempotency-Key'/)
@@ -184,7 +184,10 @@ export async function run(context) {
`version=${detail?.query?.query?.version ?? 'missing'}, nodes=${detail?.nodes?.length ?? 'missing'}`, OPTIONS)
let version = Number(detail.query.query.version)
const baseActual = Date.now() + 60 * 60_000
const frozenLatestActual = detail?.query?.query?.latestActualAt
const frozenLatestActualMs = frozenLatestActual == null ? Number.NaN
: Date.parse(`${frozenLatestActual}Z`)
const baseActual = (Number.isNaN(frozenLatestActualMs) ? Date.now() : frozenLatestActualMs) + 60 * 60_000
for (let index = 0; index < STANDARD_NODES.length; index += 1) {
const standardNode = STANDARD_NODES[index]
const actualAt = localIso(new Date(baseActual + index * 60_000))