Compare commits

..
Author SHA1 Message Date
jschoubben 897fb8e2d8 mesh-developer: the test budget is per module, counted before a test is added
Twice on 2026-11-26/27 a developer added top-level tests to the indexer,
which is over its budget: the definition said the repository, and asked
no count.
2026-11-27 03:21:50 +01:00
2 changed files with 4 additions and 16 deletions
+3 -2
View File
@@ -36,8 +36,9 @@ A fact the build map got wrong (a file moved, a function renamed) you say to the
one that uses a contract, type, verb or package another subtask adds starts from that subtask's commit. Commit per
subtask, its label in the subject and a line `Builds: design NN M §n, …` in the body, locally only: never push, never open a pull request, never call a verb that writes on the mesh (reads are fine). Never
ssh, never a shell helper for the mesh. Tests: every change carries a test that fails without it (check it);
rows or subtests in existing tests where the repository is over the test budget the instructions set; no real
sleeping. Run `go vet ./...`, `go vet -tags integration ./...` and `go test ./...` in every touched module as
rows or subtests in existing tests where the module is at or over the test budget the instructions set (per module:
count its top-level `func Test`, untagged and integration apart, before adding one, and say both counts in the
report); no real sleeping. Run `go vet ./...`, `go vet -tags integration ./...` and `go test ./...` in every touched module as
the running checker places siblings (playbook 07). Once per head you report, not per commit, also run the integration tests of
every package you touched, and of every package of the same module that imports one, against an embedded bus
(`go test -tags integration -count=1` on those packages); where the importers are many, run the tests of them that
+1 -14
View File
@@ -1,6 +1,6 @@
---
status: canonical
updated: 2026-11-22
updated: 2026-11-16
---
# The principles
@@ -34,19 +34,6 @@ add, sharpen or drop a principle in a pull request to this file.
path, a bound, a cap, a name, a time) is a setting with a default, never written into the code.
12. **A module writes only its own.** A module writes its own files and state alone; what another module needs from it
goes through a provision or a contribution that module declares, never a file written in its place.
13. **Logic belongs to one module, named by its seat.** What a module does lives in that module, named by the seat it
holds, whose verbs are its contract. Another module that needs it calls the seat's verbs where the need is
interchangeable between the seat's holders, and the holding module's own tool only where that module alone fills
the need (a holder may serve tools of its own beside the seat's verbs); never a shared function both import.
mesh-sdk, the domain SDKs and the contracts modules hold the least code possible: every change to a package is
published before any module can use it, and every importer is then rebuilt. A function moves into a shared
package only when it is a seat's contract itself: its records, keys and events, and the client package of its
verbs.
*The operator, 2026-11-22: "it's better to let module A use module B's tool than both using a shared sdk
function"; "logic should belong to a specific module, defined by its contract (seat)"; and at 21:02: "since seats
can have multiple (applicable) occupant modules, the seat contract is generic, but the occupant module can have
vendor-specific tools on top of the seat tools".*
How it is checked: the one code review of a milestone checks the code against these principles and the design's
shape; an answer to a develop question names the principle that settles it.