gstack/browse/test/fixtures
Garry Tan 5765bef8fe
test(security): mock claude binary for deterministic E2E stream-json events
Adds browse/test/fixtures/mock-claude/claude — an executable bun script
that parses the --prompt flag, extracts the session canary via regex,
and emits stream-json NDJSON events that exercise specific sidebar-agent
code paths.

Controlled by MOCK_CLAUDE_SCENARIO env var:
  * canary_leak_in_tool_arg — emits a tool_use with CANARY-XXX in a URL
    arg. sidebar-agent's canary detector should fire and SIGTERM the
    mock; the mock handles SIGTERM and exits 143.
  * clean — emits benign tool_use + text response.

Used by security-e2e-fullstack.test.ts. PATH-prepended during the test so
the real sidebar-agent's spawn('claude', ...) picks up the mock without
any source change to sidebar-agent.ts.

Zero LLM cost, fully deterministic, <1s per scenario. Enables gate-tier
full-stack E2E testing of the security pipeline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 05:40:54 +08:00
..
mock-claude test(security): mock claude binary for deterministic E2E stream-json events 2026-04-20 05:40:54 +08:00
basic.html Initial release — gstack v0.0.1 2026-03-12 01:32:16 -07:00
cursor-interactive.html feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00
dialog.html feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00
dropdown.html fix: snapshot -i auto-detects dropdown/popover interactive elements (#845) 2026-04-05 22:57:45 -07:00
empty.html feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00
forms.html Initial release — gstack v0.0.1 2026-03-12 01:32:16 -07:00
iframe.html feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
injection-combined.html feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00
injection-hidden.html feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00
injection-social.html feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00
injection-visible.html feat: content security — 4-layer prompt injection defense for pair-agent (#815) 2026-04-06 14:41:06 -07:00
media-page.html feat: browser data platform for AI agents (v0.16.0.0) (#907) 2026-04-08 00:41:55 -07:00
network-idle.html feat: headed mode + sidebar agent + Chrome extension (v0.12.0) (#517) 2026-03-26 11:15:24 -06:00
qa-eval-checkout.html feat: 3-tier eval suite with planted-bug outcome testing (EVALS=1) 2026-03-14 01:17:36 -05:00
qa-eval-spa.html feat: 3-tier eval suite with planted-bug outcome testing (EVALS=1) 2026-03-14 01:17:36 -05:00
qa-eval.html feat: 3-tier eval suite with planted-bug outcome testing (EVALS=1) 2026-03-14 01:17:36 -05:00
responsive.html Initial release — gstack v0.0.1 2026-03-12 01:32:16 -07:00
snapshot.html Initial release — gstack v0.0.1 2026-03-12 01:32:16 -07:00
spa.html Initial release — gstack v0.0.1 2026-03-12 01:32:16 -07:00
states.html feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00
upload.html feat: Phase 3.5 — cookie import, QA testing, team retro (v0.3.1) (#29) 2026-03-13 00:31:41 -07:00