fix(hal/ebds): poll MEI at 100ms, not 10s — bills were getting torn
EBDS is a host-polled protocol: the MEI validator only speaks when polled, and its internal escrow grace expires after ~5 seconds. With POLLING_INTERVAL=10_000 the host learned about an escrowed bill *after* the MEI had already autonomously begun returning it, which on BATM3 hardware can shear the bill between the transport rollers and the mouth (see torn $20 reported by operator). Drop the interval to 100ms to match id003's cadence — so we see escrow and issue stack/reject inside the validator's grace window. This is the production-critical fix; observability + escrow watchdog follow in subsequent commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b147c7e5d7
commit
d4115a31e8
1 changed files with 7 additions and 1 deletions
|
|
@ -17,7 +17,13 @@ import { EbdsFsm } from './ebds-fsm.js'
|
||||||
import { denominations as denominationsTable } from './denominations.js'
|
import { denominations as denominationsTable } from './denominations.js'
|
||||||
import type { BillValidator, ValidatorConfig, BillData } from '../../types.js'
|
import type { BillValidator, ValidatorConfig, BillData } from '../../types.js'
|
||||||
|
|
||||||
const POLLING_INTERVAL = 10_000
|
// EBDS is host-polled: the validator only speaks when polled, and its
|
||||||
|
// internal escrow grace expires after ~5s. Polling slower than that means
|
||||||
|
// the host learns about an escrowed bill after the validator has already
|
||||||
|
// auto-returned it, which on MEI hardware (BATM3) tears bills at the
|
||||||
|
// transport rollers. Match id003's 100ms cadence so we see escrow inside
|
||||||
|
// the validator's grace window.
|
||||||
|
const POLLING_INTERVAL = 100
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BigNumber-like interface for bill comparisons
|
* BigNumber-like interface for bill comparisons
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue