Skip to content

test(agent): live smoke through real gateway to real Anthropic#11

Merged
jaredLunde merged 1 commit into
mainfrom
agent-smoke
Jun 30, 2026
Merged

test(agent): live smoke through real gateway to real Anthropic#11
jaredLunde merged 1 commit into
mainfrom
agent-smoke

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

What

Mirrors the gateway's test:smoke pattern for the agent binaries: an #[ignore]d test (crates/agent/tests/smoke.rs) that boots the real beyond-ai gateway with the caller's ANTHROPIC_API_KEY as the managed pool key (+ the dev signing key), then drives the real beyond-ai-agent binary — holding only a bai_v1 virtual key — through it to real Anthropic, performing a live tool round-trip (read a file, echo its token).

Why

This is the one thing the mock-fixture e2e couldn't prove: the dialect decoder against a real provider's SSE (real tool_use streaming deltas), through real gateway auth + key-swap. Nothing else in the suite talks to a real model.

Skips cleanly when ANTHROPIC_API_KEY is unset, so CI stays hermetic (this test never runs in CI).

Verified live

[tool: read]
PINEAPPLE-7493
[done in 2 step(s); 3948 in / 65 out tokens]

Real claude-haiku-4-5 called the read tool through the gateway, the loop ran it on a real file, fed the content back, and the model echoed the exact token.

Also

  • Hoisted gateway_bin() + the dev-key constants into tests/common so the mock gateway_e2e and the live smoke share them.
  • New mise task test:smoke:agent (auto-loads .env, like test:smoke).
  • No secrets committed (key read from env / gitignored .env; only placeholder sk-ant-… in docs).

🤖 Generated with Claude Code

Mirrors the gateway's `test:smoke` pattern for the agent binaries: an
#[ignore]'d test (tests/smoke.rs) that boots the real beyond-ai gateway with
the caller's ANTHROPIC_API_KEY as the managed pool key + the dev signing key,
then drives the real beyond-ai-agent binary — holding only a bai_v1 virtual
key — through it to REAL Anthropic, performing a live tool round-trip (read a
file, echo its token).

This validates the dialect decoder against a real provider's SSE (real
tool_use streaming deltas), through real gateway auth + key-swap — closing the
gap that the mock-fixture e2e couldn't: nothing else here talks to a real
model. Skips cleanly when ANTHROPIC_API_KEY is unset (so CI stays hermetic).

Also: hoist gateway_bin() + the dev key constants into tests/common so the
mock gateway_e2e and the live smoke share them. New mise task:
test:smoke:agent (auto-loads .env, like test:smoke).

Verified live: 2 steps, real `[tool: read]` round-trip, model returned the
exact token. No secrets committed (key read from env / gitignored .env).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jaredLunde jaredLunde merged commit a5e25be into main Jun 30, 2026
1 check passed
@jaredLunde jaredLunde deleted the agent-smoke branch June 30, 2026 16:25
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.

1 participant