Repository navigation
Verify runtime features live through a gateway #123
Description
Goal
Unit and WireMock tests pin down request shapes, but only a real endpoint can show whether the betas, block_binding, display: "updates", cache breakpoints, and compaction fork behave as designed. Run a scripted live session through a gateway with a real key, and record the result of each feature.
Acceptance criteria
- A repeatable checklist, or a test disabled by default and gated on an environment variable, covers:
- streaming text and tool use
- thinking interleaved across three turns and preserved
- a cache read on the second request
/compactand auto-compaction- a
/modelswap - cancellation mid-stream
- a resumed session
- the billing header's
cchhash, rechecked against the current Claude Code release (xxHash64 seed included)
- Record each result and create a separate bug issue for each failure.
- Logs, issues, and PRs contain no token, internal hostname, or header value.
Results
The latest run was the alpha.3 gate on 2026-10-17. It used ox at 01b4823, with a delta rerun at 5b42851 (#266). The thinking test and the /model swap ran on Opus 5.5, and everything else ran on Haiku 5.5. The Anthropic API runs used an OAuth token. The gateway runs went to an Anthropic-compatible gateway through a localhost proxy (#152, #254). The live tests and the TUI checklist come from #258.
| Check | Anthropic API | Gateway | Checked by |
|---|---|---|---|
| Streaming text | Pass | Pass | live test |
| Tool use, with a cache read on the second request | Pass | Pass | live test |
| Thinking interleaved across three turns and replayed | Pass | Pass | live test |
| Auto-compaction, including a tool-heavy session (#255) | Pass | Pass | live test, TUI |
/compact |
Not run | Pass | TUI |
/model swap Haiku → Opus → Haiku, with tool use and thinking |
Not run | Pass, every request returned 200 | TUI |
| Esc before output and mid-stream (#256) | Not run | Pass | TUI |
| Resumed session, including a 01b4823 session continued on 5b42851 | Pass | Pass | live test, REPL |
/init with no instruction file |
Not run | Pass | TUI |
Billing header with a live cch |
Pass, requests succeed | Not applicable, since custom base URLs get no cch |
live test |
| No credential in output, logs, or sessions | Pass | Pass | live test, grep |
- Cache: In every inspected session, each request read exactly what the previous one wrote to and read from the cache. Replayed thinking blocks, including blocks written by another model after a
/modelswap, kept the cached prefix intact. - Cancellation: After a cancel before output and a cancel mid-stream, the next prompt got only its own answer. The session recorded
[Request interrupted by user]after the cancelled prompt. - Compaction: With a 50K threshold, a transcript dominated by two 60 KB tool results compacted on the next prompt, and the summary request read all prior tokens from the cache.
/compactbelow 1000 tokens reports the minimum size. cchrecheck against Claude Code 2.1.301: The version fingerprint in its bundled JavaScript still uses the salt59cf53e54c78and characters 4, 7, and 20 of the first non-meta user message, which matchesoxafter Fingerprint the billing header from the first user prompt #257. The body hash itself is computed in the runtime's native request layer, where the xxHash64 seed0x6E52736AC806831Ecan't be read out of the binary, so the seed is confirmed only by the API accepting every request hashed with it. Checking it further would require capturing Claude Code's own TLS traffic, which this issue does not cover.
Bugs found by earlier runs: #254, #255, #256, and #257, all fixed. Not covered yet: the TUI checks against the Anthropic API, and a failed auto-compaction holding the prompt (#265).
Activity
feat(config): authenticate with gateway tokens, OAuth tokens, and cus…
test: add opt-in live tests against the Anthropic API and gateways (#258
chore(release): v0.1.0-alpha.3 (#269)
hakula139 commentedon Oct 17, 2026
Closing as completed. Every runtime check passed on both the Anthropic API and the gateway (results in the description), and the
cchrecheck against Claude Code 2.1.301 confirmed the salt, indices, and message selection. The xxHash64 seed can't be read out of the native binary, so it's confirmed only by the API accepting requests hashed with it.docs(research): record what a relay gateway checks, from 2026-10-17 p…