Weir – deterministic unit tests for AI agents
说明与用途
Weir 为 AI 代理提供确定性、无 LLM 的单元测试,自动检测禁止的数据流并在 CI 中失败,提供清晰的路径证据。
问题
AI agents can silently misbehave, sending sensitive data to forbidden sinks while logs claim success, making it hard to detect failures without relying on another LLM.
结果
Weir provides deterministic, LLM‑free unit tests for AI agents, automatically detecting forbidden data flows and failing CI with a clear witness path.
工作流
- 1. Instrument agent to emit OpenTelemetry traces.
- 2. Run
weir gaugeto check trace coverage and instrumentation completeness. - 3. If coverage is low, adjust instrumentation and re‑run.
- 4. Run
weir scanon the exported traces. - 5. Weir reconstructs the session graph and tracks taint through it.
- 6. If a forbidden flow is detected, Weir exits with code 1 and outputs a witness path.
- 7. CI fails the build, alerting developers to the issue.
证据
It reads the OpenTelemetry traces your agent already emits and fails the build when sensitive data reaches a sink it should not reach.
Same input, byte‑identical answer, no LLM in the loop, nothing leaves your machine.
- 记录日期: 2026-09-07T01:06:25.977Z