merge: sync test and stabilize full acceptance

This commit is contained in:
2026-09-09 21:14:25 +08:00
40 changed files with 595 additions and 134 deletions
@@ -44,6 +44,8 @@ test('four real command payloads mutate contract fields and preserve remarks and
const forbidden = index < 2 ? 'remark' : 'reason'
assert.equal(Object.hasOwn(body, forbidden), false, `${actionPath} must not send ${forbidden}`)
const key = headers['Idempotency-Key']
assert.match(key, /^[A-Za-z0-9:_-]+$/)
assert.ok(key.endsWith(`terminal-${actionPath}`))
const saved = commands.get(key)
if (saved) {
if (JSON.stringify(saved.body) === JSON.stringify(body)) { replays++; return response(saved.state) }
@@ -98,6 +100,8 @@ test('all four commands cover idempotent replay hash conflict and lifecycle sema
'SELECT_FLEET', 'SCHEDULE_PICKUP', 'RECORD_PICKUP', 'RECORD_EMPTY_RETURN', 'RESOLVED',
]) assert.ok(source.includes(token), `missing ${token}`)
assert.match(source, /JSON\.stringify\(replay\.data\) === JSON\.stringify\(first\.data\)/)
assert.match(source, /terminal-\$\{path\}.*replace\(\/\[\^A-Za-z0-9:_-\]\//)
assert.doesNotMatch(source, /terminal-\$\{action\}/)
})
test('target is strictly current-marker pickup and completed-PDA container', () => {