diff --git a/03-DESIGN/01-to-be/47-milestones/G-20-lead-answers.md b/03-DESIGN/01-to-be/47-milestones/G-20-lead-answers.md index a2e8d4b8..6b562d78 100644 --- a/03-DESIGN/01-to-be/47-milestones/G-20-lead-answers.md +++ b/03-DESIGN/01-to-be/47-milestones/G-20-lead-answers.md @@ -21,3 +21,10 @@ names the principle that settles it, and is cited as "design 47 G A-n". - **A-2** (§655; principle 7, the rule that code shared between modules lives in mesh-sdk) `nats-tools/internal/busarchive` moves whole with `bussnap` into mesh-sdk as its own package `go/busarchive`, its tests with it; every other importer (verify, the nightly dump) imports it from there, and no copy stays in mesh-catalog. +- **A-3** (§686, §640, §687; principle 7; replaces A-1) The generated contract types stay as they are, plain structs whose + fields every importer already reads; nothing is generated for the writer and no field is renamed. mesh-sdk's writer is + generic over the contract's body types (`Writer[F, C, S, A any]`, one type parameter per body) and works on their wire + form: it marshals a body, reads and sets `kind`, `scope`, `id`, `subject`, `at` and `since` by their contract names, + and runs `views.CheckFinding` on that form. A body whose wire form lacks a field the contract names fails loudly at its + first write (principle 3) and in the writer's unit test, which runs against the real generated types of + `mesh-conditions`.