← All stories

BRANCH · ef-085-smart-bar

Smart Bar

EF-085Persona: Attendee + bartenderRoots in: efx-station-shellMatrix: Absent - gap probe

Smart Bar is absent. This story defines the contract for ordering UI, bartender queue, age/prepaid eligibility, inventory limits, and scan-and-pickup fulfillment.

Contract

  1. Attendee orders from Smart Bar.

    Menu respects age, prepaid drink entitlements, and current inventory limits.

  2. Bartender sees live queue.

    Orders appear in a server-authoritative queue with preparation and ready states.

  3. Attendee scans to pick up.

    Pickup marks one order fulfilled, decrements inventory, and blocks duplicate fulfillment.

Failure modes

Socket reconnect resilience

Reconnect restores order and bartender queue state.

Out-of-order messages

Stale queue states cannot move an order backward.

Concurrent order load

Queue and inventory stay stable at bar rush.

Late join shows prior state

Bartender device joins and sees current queue.

Organizer pause/cancel

Pause blocks new orders and preserves in-flight orders.

Results visible only after close

Final bar report is hidden until close.

Idempotent order/pickup

Retries do not duplicate orders or fulfillments.

Cross-station isolation

Bar A queue does not receive Bar B orders.

Eligibility denied

Age or prepaid failure blocks order without inventory change.

Inventory limit

Last item can be ordered once under race.

Gap probe: smart bar absent

Visible gap panel remains until module ships.

Stable test attributes

Visibility teeth. Each attribute must be effectively visible when active and must match the agent probes.

data-testWherePurpose
smart-bar-stationstation shellsmart bar station
smart-bar-socket-statusstation shellsocket state
smart-bar-order-formattendee surfaceordering UI
smart-bar-queue-tablebartender surfacebartender queue
smart-bar-pickup-scan-ctapickup surfacescan pickup
smart-bar-inventory-tableorganizer surfaceinventory limits
smart-bar-gap-panelgap panelabsent module gap

Agent test plan

- smart-bar-gap-visible
- socket-reconnect
- out-of-order-order
- load-stable
- late-join
- organizer-pause
- report-after-close
- idempotent-order
- cross-station-isolation
- eligibility-denied
- inventory-race