测试
Tests 应证明被修改边界上的 contract。Fixtures 保持小、redacted,并基于真实行为。
单元测试
Go unit tests 用于 parsing、config validation、provider conversion、tool schemas、repository behavior、 channel normalization 和 prompt/context builders。
迭代时运行 focused package tests;代码变更完成后运行 standard handoff check。
RPC 测试
RPC tests 应验证 method names、params、error codes、redaction 和 payload shape。共享 method constants 位于
internal/protocol。
Dashboard、TUI 和 channels 应消费 RPC contracts,而不是复制 gateway behavior。
Smoke Tests
make smoke-local 运行 smoke-tagged local checks。修改 runtime assembly 或 high-level behavior 时用它获得
local product flow confidence。
普通 smoke tests 不应依赖 live external services。
Dashboard 测试
Dashboard tests 使用 fake RPC clients 和 Go HTTP handlers。部分 interactive flows 使用现有 dashboard tests 中的 browser automation patterns。
为 form submissions、redirects、status fragments、localization 和 RPC allowlist changes 添加覆盖。
Live Tests
Live tests 必须通过 environment gates opt-in,例如 channel live-smoke variables。它们应使用安全测试账号或目标。
记录 required env vars,并保持 live tests 默认 skipped。