The inspector

A privileged view of live tables:

  • the full board with every hidden card
  • exactly what each seat is sent
  • pending decisions and timers
  • the journal timeline, and the board at any step (replayed into a scratch session)
  • how a failed table failed, stack and all

Running it:

  • -inspector-addr 127.0.0.1:8081 -inspector-password-env INSPECTOR_PASSWORD.
  • host.Config.Inspector does the same in Go.
  • It needs its own password, never the app password (E402).
  • Identity.InspectorAuthorize admits admins by identity instead.

Write actions (-inspector-writes) are journaled with the operator’s name:

  • reset
  • act as a seat
  • fire a timer now
  • cancel a decision

From an agent

cig inspect -addr 127.0.0.1:8081 tables
cig inspect -addr 127.0.0.1:8081 board default
cig inspect -addr 127.0.0.1:8081 as default p2      # what p2 is sent
cig inspect -addr 127.0.0.1:8081 timeline default
cig inspect -addr 127.0.0.1:8081 step default 7     # the board after record 7

All of these print JSON. The password comes from $CIG2_INSPECTOR_PASSWORD.

Debugging a rejection:

  1. Run timeline to find the step.
  2. Run step to see the board just before it.
  3. Run as to see what the seat was shown.

In tests, without a server: tbl.Session().Inspect() returns the same cig2.Inspection, and tbl.Journal() the records.