Migrated from Method backlog
GitHub Issues are now the live work tracker. Repository docs remain Method evidence.
| Field |
Value |
| Source backlog |
docs/method/backlog/bad-code/SUB_p5-serialization-on-types.md |
| Archived source |
docs/archive/backlog/github-issue-migration-2026-06-01/docs/method/backlog/bad-code/SUB_p5-serialization-on-types.md |
| Original lane |
bad-code |
| Original id |
SUB_p5-serialization-on-types |
| Original legend |
SUB |
| Original feature |
observer-admission-runtime |
| Original release home |
v19.0.0 |
Original backlog card
Domain types own their own serialization (P5 violation)
Effort: S
What's Wrong
canonicalJson() lives directly on TickReceipt, EffectEmission,
and DeliveryObservation. ORSet has serialize()/deserialize().
P5: "Serialization is the codec's problem. Domain types do not know
how they are encoded." These methods couple domain types to a specific
encoding format and make it impossible to swap codecs.
Suggested Fix
Move serialization to codec modules in src/infrastructure/codecs/.
Domain types expose their data via accessors; codecs own the encoding.
Migrated from Method backlog
GitHub Issues are now the live work tracker. Repository docs remain Method evidence.
docs/method/backlog/bad-code/SUB_p5-serialization-on-types.mddocs/archive/backlog/github-issue-migration-2026-06-01/docs/method/backlog/bad-code/SUB_p5-serialization-on-types.mdbad-codeSUB_p5-serialization-on-typesSUBobserver-admission-runtimev19.0.0Original backlog card
Domain types own their own serialization (P5 violation)
Effort: S
What's Wrong
canonicalJson()lives directly onTickReceipt,EffectEmission,and
DeliveryObservation.ORSethasserialize()/deserialize().P5: "Serialization is the codec's problem. Domain types do not know
how they are encoded." These methods couple domain types to a specific
encoding format and make it impossible to swap codecs.
Suggested Fix
Move serialization to codec modules in
src/infrastructure/codecs/.Domain types expose their data via accessors; codecs own the encoding.