Skip to content

feat(examples): enable Stage-0 static pre-filter by default in agy-safety-gate - #54

Merged
ghchinoy merged 1 commit into
GoogleCloudPlatform:mainfrom
ghchinoy:feat/agy-gate-default-static-stage
Nov 9, 2026
Merged

ghchinoy merged 1 commit into
GoogleCloudPlatform:mainfrom
ghchinoy:feat/agy-gate-default-static-stage

Conversation

@ghchinoy

@ghchinoy ghchinoy commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #53

Summary

Enables the <1 ms Stage-0 deterministic static pre-filter by default in examples/agy-safety-gate/ and updates the example documentation with the 200-item held-out confirming evaluation results:

  • examples/agy-safety-gate/dgem_gate.py: Defaults GateConfig.static_stage to True (DGEM_GATE_STATIC=1), preserves --static-stage for backwards compatibility, and adds --no-static-stage (alongside DGEM_GATE_STATIC=0) as an explicit opt-out.
  • examples/agy-safety-gate/hooks.example.json & README.md: Recommends Stage-0 static rules + --cascade gemini as the default hook configuration and updates Comparative Evaluation Summary with the 6-category, 200-item held-out evaluation numbers (93.5% 2-slot vs. 89.5% gemini-3.5-flash-lite baseline at 0.35x p50 latency and 0/70 leaks; 95.0% accuracy and 2/90 benign asks with --cascade gemini at 10% escalation).
  • examples/agy-safety-gate/test_dgem_gate.py: Adds unit test coverage for default static_stage=True, DGEM_GATE_STATIC=0, and --no-static-stage.

Verification

  • python3 -m unittest -v examples/agy-safety-gate/test_dgem_gate.py
  • make check-public

@ghchinoy
ghchinoy merged commit f5d4370 into GoogleCloudPlatform:main Nov 9, 2026
11 checks passed
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.

examples/agy-safety-gate: enable Stage-0 static pre-filter (--static-stage) by default

1 participant