From aa39fcea317e9c1e8348797fdf0123fa855379da Mon Sep 17 00:00:00 2001 From: teamchong <25894545+teamchong@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:52:29 -0400 Subject: [PATCH] docs(demo): pin demo URLs to 127.0.0.1 to match the IPv4 loopback bind --- demo/cost-ab/README.md | 4 ++-- demo/cost-ab/a.sh | 2 +- demo/cost-ab/b.sh | 2 +- demo/cost-ab/setup.mjs | 4 ++-- demo/effective-context/README.md | 2 +- demo/effective-context/a.sh | 2 +- demo/effective-context/b.sh | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/demo/cost-ab/README.md b/demo/cost-ab/README.md index 4ebc6e8..90cbf97 100644 --- a/demo/cost-ab/README.md +++ b/demo/cost-ab/README.md @@ -46,8 +46,8 @@ Each proxy serves a **live dashboard** in your browser — no commands, no extra | open in browser | shows | |---|---| -| **http://localhost:47824/** (pxpipe → `b.sh`) | **`THIS SESSION — N% fewer tokens (… total)`** | -| http://localhost:47823/ (plain → `a.sh`) | ~0% — the passthrough **control** | +| **http://127.0.0.1:47824/** (pxpipe → `b.sh`) | **`THIS SESSION — N% fewer tokens (… total)`** | +| http://127.0.0.1:47823/ (plain → `a.sh`) | ~0% — the passthrough **control** | It updates as the run goes. The headline is the **honest, rate-free number**: real server tokens (`input+cache_create+cache_read+output`) vs the same body as text diff --git a/demo/cost-ab/a.sh b/demo/cost-ab/a.sh index ed84cef..dbeb1d8 100755 --- a/demo/cost-ab/a.sh +++ b/demo/cost-ab/a.sh @@ -30,5 +30,5 @@ esac echo "LEFT = normal (passthrough :47823), model=$MODEL. Launching interactive Claude with the task..." # Run in $DIR via a subshell so your terminal stays in the original dir afterward. -( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47823 \ +( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47823 \ "$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --no-chrome --dangerously-skip-permissions ) diff --git a/demo/cost-ab/b.sh b/demo/cost-ab/b.sh index a753710..5b051a8 100755 --- a/demo/cost-ab/b.sh +++ b/demo/cost-ab/b.sh @@ -33,5 +33,5 @@ esac echo "RIGHT = pxpipe (:47824), model=$MODEL. Launching interactive Claude with the task..." # Run in $DIR via a subshell so your terminal stays in the original dir afterward. -( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47824 \ +( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47824 \ "$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --no-chrome --dangerously-skip-permissions ) diff --git a/demo/cost-ab/setup.mjs b/demo/cost-ab/setup.mjs index 3f8a52e..26b4bb1 100644 --- a/demo/cost-ab/setup.mjs +++ b/demo/cost-ab/setup.mjs @@ -43,8 +43,8 @@ const PROMPT = // Both arms run through a proxy so BOTH are logged. LEFT = passthrough (normal), // RIGHT = pxpipe. See demo/cost-ab/README.md for the 4-terminal layout that starts them. -const ON_PROXY = process.env.DEMO_ON_PROXY ?? 'http://localhost:47824'; // pxpipe -const OFF_PROXY = process.env.DEMO_OFF_PROXY ?? 'http://localhost:47823'; // passthrough +const ON_PROXY = process.env.DEMO_ON_PROXY ?? 'http://127.0.0.1:47824'; // pxpipe +const OFF_PROXY = process.env.DEMO_OFF_PROXY ?? 'http://127.0.0.1:47823'; // passthrough // --setting-sources project -> use ONLY the seeded project settings (model [1m], // no MCP); ignore the user global ~/.claude/settings.json. diff --git a/demo/effective-context/README.md b/demo/effective-context/README.md index 9677b6d..326fa1c 100644 --- a/demo/effective-context/README.md +++ b/demo/effective-context/README.md @@ -51,7 +51,7 @@ on the dashboard "compress models" chips. | LEFT — plain (`a.sh`) | **may be wrong** at this size (drowns in filler) | **pxpipe correct + plain wrong = the effective-context win.** Each proxy also serves -a live dashboard ([:47824](http://localhost:47824/) pxpipe, [:47823](http://localhost:47823/) +a live dashboard ([:47824](http://127.0.0.1:47824/) pxpipe, [:47823](http://127.0.0.1:47823/) plain) showing the context/token reduction — the same number `/context` reports. --- diff --git a/demo/effective-context/a.sh b/demo/effective-context/a.sh index 8d4a1b6..28633c8 100755 --- a/demo/effective-context/a.sh +++ b/demo/effective-context/a.sh @@ -30,5 +30,5 @@ esac echo "LEFT = normal (passthrough :47823), model=$MODEL. Launching interactive Claude with the needle task..." # Run in $DIR via a subshell so your terminal stays in the original dir afterward. -( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47823 \ +( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47823 \ "$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --dangerously-skip-permissions ) diff --git a/demo/effective-context/b.sh b/demo/effective-context/b.sh index c86f252..0b11710 100755 --- a/demo/effective-context/b.sh +++ b/demo/effective-context/b.sh @@ -34,5 +34,5 @@ esac echo "RIGHT = pxpipe (:47824), model=$MODEL. Launching interactive Claude with the needle task..." # Run in $DIR via a subshell so your terminal stays in the original dir afterward. -( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47824 \ +( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47824 \ "$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --dangerously-skip-permissions )