Documentation
¶
Overview ¶
Package goldenassert is the shared TEST helper for the golden-payload fixtures under internal/eventpayload/testdata — the cross-channel drift lock for the stable event `data` payloads.
Each fixture file is a full wire envelope {type,id,schema_version, created_at,data}. The canonical envelope-level lock lives in internal/eventpayload's own golden test; the per-builder tests (relay, agent, delivery, ws) call Data to assert that THEIR builder's marshaled `data` is byte-identical to the fixture's `data` subdocument. The TS and Python SDK payload tests parse the very same files, so a server-side field rename that would break an SDK type fails both sides against one artifact.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Data ¶
Data asserts that json.Marshal(got) is byte-identical to the (compacted) `data` subdocument of the fixture at path.
func DataIgnoringLifecycle ¶ added in v1.4.1
DataIgnoringLifecycle asserts the non-ledger portion of a producer payload. Pure builder tests use it because they do not own persistence and therefore must never be fed fixture-derived transitions. DB-backed producer tests lock the exact persisted rows separately.
func Lifecycle ¶ added in v1.4.1
Lifecycle compares lifecycle rows emitted by a real producer to the static fixture, normalizing only database-generated identity and observation-time fields. Evidence, correlations, recipient, taxonomy, retryability, and presence remain byte-for-byte locked to the fixture. Rows are matched by reason code because equal occurred_at values use generated ids as the deterministic production tie-breaker; DB ordering tests lock that rule.
Types ¶
This section is empty.