Lab L11 verification
  python 3.12.12 | mcp 2.3.0 | fastapi 0.165.0 | uvicorn 0.54.0 | httpx 0.28.1

[1-4] Modern client (mode='auto')
  negotiated protocol version: 2026-07-28
  PASS  negotiated protocol 2026-07-28
  server_info: demo-inventory 1.0.0
  tools: ['get_item', 'reserve_stock', 'search_items']
  PASS  exactly the 3 curated tools are exposed
  PASS  admin delete endpoint is NOT a tool
  PASS  get_item input schema carries the SKU regex
  PASS  search_items annotated read-only
  PASS  reserve_stock declares an output schema
  search_items -> {'items': [{'sku': 'ELC-0001', 'name': 'Demo USB-C cable 1 m', 'category': 'electronics', 'quantity': 120, 'unit_price_usd': 4.99}, {'sku': 'ELC-0002', 'name': 'Demo 9V battery', 'category': 'electronics', 'quantity': 8, 'unit_price_usd': 2.1}], 'count': 2}
  PASS  search_items returns 2 electronics in stock
  get_item -> {'sku': 'ELC-0002', 'name': 'Demo 9V battery', 'category': 'electronics', 'quantity': 8, 'unit_price_usd': 2.1}
  PASS  get_item ELC-0002 has quantity 8
  reserve_stock -> {'sku': 'ELC-0002', 'reserved': 3, 'remaining': 5}
  PASS  reserve_stock reserves 3, leaves 5
  PASS  state change visible through get_item
  -- negative cases --
  get_item {'sku': '../admin'} -> is_error=True: 'Error executing tool get_item: 1 validation error for get_itemArguments\nsku\n  String shoul'
  PASS  path-traversal-like SKU rejected by schema
  get_item {'sku': 'elc-0001'} -> is_error=True: 'Error executing tool get_item: 1 validation error for get_itemArguments\nsku\n  String shoul'
  PASS  lowercase SKU rejected by schema
  reserve_stock qty=500 -> is_error=True: 'Error executing tool reserve_stock: 1 validation error for reserve_stockArguments\nquantity'
  PASS  quantity above 10 rejected by schema
  reserve_stock out-of-stock -> is_error=True: 'Error executing tool reserve_stock: Cannot reserve: only 0 in stock.'
  PASS  upstream 409 mapped to a safe tool error
  get_item unknown -> is_error=True: 'Error executing tool get_item: No item with that SKU.'
  PASS  upstream 404 mapped to a safe tool error

[5] Legacy client (mode='legacy', initialize handshake)
  negotiated protocol version: 2025-11-25
  PASS  legacy handshake negotiates 2025-11-25
  PASS  legacy client can call get_item

[6-7] Transport security (raw HTTP)
  control: allowed Origin -> HTTP 200, supportedVersions=['2026-07-28']
  PASS  control: well-formed request with allowed Origin accepted (200)
  foreign Origin -> HTTP 403
  PASS  foreign Origin rejected with 403
  foreign Host -> HTTP 421
  PASS  foreign Host rejected with 421
  PASS  port 8000 not reachable on LAN address (bound to loopback only)
  PASS  port 8001 not reachable on LAN address (bound to loopback only)

ALL CHECKS PASSED (22)

--- port preflight, 2026-11-26: with 127.0.0.1:8000 held by another process, ./run.sh verify exited 3 with:
STOP: 127.0.0.1:8000 (MCP server) is already in use by another program.
Nothing was started and nothing was stopped. Close that program (or wait for the other lab run to finish) and run this again.
