Skip to content

docs: redraw the demo with the approval answered in lox run (#77) - #79

Merged
DavidGodefroid merged 2 commits into
mainfrom
docs/77-demo-lox-run
Nov 18, 2026
Merged

DavidGodefroid merged 2 commits into
mainfrom
docs/77-demo-lox-run

Conversation

@DavidGodefroid

@DavidGodefroid DavidGodefroid commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #77

What changed

  • site/assets/demo.svg is redrawn: the agent (Claude Code in a lea container, left) sends a GET to a trusted host and a POST to an unknown host; the question is answered in lox run (right), and the gate's audit shows both decisions.
  • scripts/brand/demo.py no longer contains the terminals' output. It reads it from a capture committed in scripts/brand/demo-capture/ and converts the SGR colours of lox run's frames to SVG.
  • README.md: the caption "Drawn in the console's frame from before the hub…" is removed; the alt text lists each step. site/index.html uses the same file: alt text, figcaption and height (600 → 680) are updated.
  • Topic security added (gh repo edit --add-topic security); topics are now ai-agents, harness-security, mcp, security.

The scenario changed, because the product did

The old demo sent a token in the body and had the human answer n token in body. Neither is today's behaviour:

  • A GitHub token in the body is refused by the gate itself, with no question: LockHTTP refused this request (E_SECRET_EGRESS): a GitHub token sent to hooks.example.net, outside its own hosts (captured while preparing this). The new body carries an email only ({"build":"ok","author":"jean.dupont@example.org"}), which the gate asks about and masks as j***(23).
  • lox run takes y / n with no typed reason. The hub's signed decision has an empty reason, and the gate answers denied on the hub.

Where each screen comes from

Nothing was run against published images, and not one lea + lox run stack either: the capture is output of the code of both repositories (lockhttp 2f0d37f, lockhub 4d94ef1, both on lockkit v0.20.0), taken in two separate test runs joined by hand. scripts/brand/demo-capture/README.md gives the commits, how each file was made, the join, and what demo.py types. The gate's run is committed as a test skipped by default (TestDemoCapture, LOCKHTTP_DEMO_OUT); the lox run one belongs in lockhub and is kept there as text (loxrun_demo_test.go.txt). The committed capture was taken with exactly those two.

On screen Source
Left: output of the two commands (200; LockHTTP refused this request (E_DENIED): denied on the hub / Do not retry… / request id: …) Real curl (HTTPS_PROXY set as lea sets it) through the gate of internal/gate (the tests' newEnvHub, MITM on), with a sources.json naming container lea-ab12cd34ef and agent dev-3, policy trusted = ["pkg.go.dev"], hold = "60s". Captured in demo-capture/gate.txt.
Right: the four lox run frames (idle, question, question after d, after n) lockhub's internal/loxrun, run by its own e2e harness (newWorld: the real hub, a real lockkit hub client, lox run driven by key presses, 80×26). The ticket is the one the gate signed in the run above (same header, body lines, warning, flags, risk, built with ticket.NewTicket and render.MaskScreen as internal/gate/hub.go does). Captured with their colours in demo-capture/lox-run-*.ans.
The refusal's reason, denied on the hub n in lox run gives a hub decision with "reason": "" (read back from the hub in the lockhub run); the gate was then given that same decision (denied, empty reason, facade tty), and hubApprove turns it into denied on the hub.
Bottom: the two audit lines The gate's own records of that run (demo-capture/gate.txt), fields left out where the line shows ….
Typed in demo.py (not output) The prompt, the two curl commands, Claude Code's frame around a command (● Bash(…), └, Running…), the pane titles, the FREE / ASK / 403 badges, the two "you press…" hints (lox run does not echo keys) and the three captions.

Limits to know about:

  • The gate and lox run ran in two processes joined by hand, not under one lox run + lea stack: the hub in the gate's run is the test suite's fake hub, and the ticket was signed again by the lockhub harness's lock key for the second run. The request id is the same on both sides; the clocks are those of two runs, a few seconds apart.
  • why asked: this lock's ticket does not name its kind (version 1): asked and the feed's from container lea… summary are what lox run shows for a lockhttp ticket today. They are shown as they are.
  • The 200 is the gate's answer for a stand-in upstream, not pkg.go.dev itself.

Verified

  • python3 scripts/brand/demo.py > site/assets/demo.svg reproduces the committed file.
  • sh scripts/hygiene.sh: hygiene: clean.
  • Rendered in headless Chrome at four moments of the loop (below) and on site/index.html at 360 and 1280 px.
  • This repository has no site test.

Screenshots

Before (main): https://github.com/DavidGodefroid/lockhttp/blob/2f0d37f/site/assets/demo.svg

After, at 2.5 s, 5.5 s, 9 s and 12 s of the loop:

GET passes
the question in lox run
after d: the whole masked screen
denied

On the site (1280 px, first moment of the loop): https://raw.githubusercontent.com/DavidGodefroid/lockhttp/pr-assets/79/site77-1280.png · 360 px: https://raw.githubusercontent.com/DavidGodefroid/lockhttp/pr-assets/79/site77-360.png

🤖 Generated with Claude Code

The demo's terminals now show a capture of the scenario run through the
code (scripts/brand/demo-capture/): curl through the gate with lea's
sources.json, the frames lox run draws for the gate's ticket, and the
gate's audit records. The request carries an email only: a GitHub token
in the body is now refused by the gate itself (E_SECRET_EGRESS), without
a question. The README caption saying the demo predates the hub is gone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The capture is output of the code, but of two test runs joined by hand,
not of one lea + lox run stack: demo.py and docs/install.md now say so,
and scripts/brand/demo-capture/README.md gives the source commits, how
each file was produced, the join, and what demo.py types. The gate's run
is a test skipped by default (TestDemoCapture, LOCKHTTP_DEMO_OUT); the
lox run one belongs in lockhub and is kept as text. The capture is taken
again with those two. The audit box no longer says one line per decision:
the gate keeps two records for a denied request.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@DavidGodefroid
DavidGodefroid merged commit 69d686f into main Nov 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-record the demo with lox run and add the security topic

1 participant