Documentation
¶
Overview ¶
Package durabletest checks that an implementation satisfies the agent.Durable contract's fidelity guarantee, so every store (in-memory, SQLite, Postgres, or your own) is held to the property the agent loop's resume relies on: the record Do returns on the live path is exactly the record a replay reads back, for any content a model or tool can produce.
A store that returned the caller's own record live but a decoded copy on replay would let a resumed run rebuild a different conversation than the one it was having, so the model would read different bytes after a crash than without one. The suite feeds the store records whose encoding is easy to get wrong (HTML-significant characters, insignificant whitespace, U+2028, NUL, invalid UTF-8, unusual number forms, key order) and requires the live record, the memoized record, and the History record to be identical and in the journal's canonical form (agent.EncodeRecord).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Case ¶
type Case struct {
Name string
Record agent.Record
Want json.RawMessage
}
Case is one record the suite round-trips. Want, when set, is the Result the store must hand back: the record's canonical form, which is the tool's JSON with insignificant whitespace removed and every other byte kept.