gstack/browse/test/fixtures
Garry Tan b86ef06706
test(security): live + fixture-replay bench harness with 500-case capture
Adds two new benches that permanently guard the v2 tuning:

- security-bench-ensemble-live.test.ts (opt-in via GSTACK_BENCH_ENSEMBLE=1).
  Runs full ensemble on BrowseSafe-Bench smoke with real Haiku calls.
  Worker-pool concurrency (default 8, tunable via
  GSTACK_BENCH_ENSEMBLE_CONCURRENCY) cuts wall clock from ~2hr to
  ~25min on 500 cases. Captures Haiku responses to fixture for replay.
  Subsampling via GSTACK_BENCH_ENSEMBLE_CASES for faster iteration.
  Stop-loss iterations write to ~/.gstack-dev/evals/stop-loss-iter-N-*
  WITHOUT overwriting canonical fixture.

- security-bench-ensemble.test.ts (CI gate, deterministic replay).
  Replays captured fixture through combineVerdict, asserts
  detection >= 55% AND FP <= 25%. Fail-closed when fixture is missing
  AND security-layer files changed in branch diff. Uses
  `git diff --name-only base` (two-dot) to catch both committed
  and working-tree changes — `git diff base...HEAD` would silently
  skip in CI after fixture lands.

- browse/test/fixtures/security-bench-haiku-responses.json — 500 cases
  × 3 classifier signals each. Header includes schema_version, pinned
  model, component hashes (prompt, exemplars, thresholds, combiner,
  dataset version). Any change invalidates the fixture and forces
  fresh live capture.

- docs/evals/security-bench-ensemble-v2.json — durable PR artifact
  with measured TP/FN/FP/TN, 95% CIs, knob state, v1 baseline delta.
  Checked in so reviewers can see the numbers that justified the ship.

Measured baseline on the new harness:
  TP=146 FN=114 FP=55 TN=185 → 56.2% / 22.9% → GATE PASS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 20:32:15 -07:00
..
mock-claude feat(security): ML prompt injection defense for sidebar (v1.4.0.0) (#1089) 2026-04-20 22:18:37 +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
security-bench-haiku-responses.json test(security): live + fixture-replay bench harness with 500-case capture 2026-04-21 20:32:15 -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