Reagent code rules: offline tests with SSE fixtures, no restating comments, one-line doc contracts
PreferenceVerified 24 Oct 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.
Rule#
No test calls the network. Stream tests read crates/ai/tests/fixtures/*.sse. Do not write comments that restate the code. Every public item gets a one-line doc contract.
Why#
Not known yet.
How to apply#
When you write a stream test in the reagent repo, read a recorded file from crates/ai/tests/fixtures/*.sse. Do not open a network connection. When you write code, leave out comments that only repeat what the code does. Add a one-line doc comment that states the contract on each public item.