Judge the SDK conformance fixtures against the SDK the controller pins, never a desktop's checkout (issue 449)
A check clones mesh-sdk beside the controller at the commit go.mod pins; elsewhere the test reads a copy captured at that commit, held to go.mod. A missing clone fails instead of skipping.
This commit is contained in:
Vendored
+6
-1
@@ -9,6 +9,7 @@ a second place to clean besides the catalogue itself.
|
||||
|
||||
mesh-catalog b9de001833b1b61b297182b8e3bcdae1cbdeace9 modules/*/module.json, modules/nats/Dockerfile
|
||||
mesh-host bd5cc6980419c1bd4824be6d58dfebd2381a9de3 examples/foundation-first-node-nats.lock
|
||||
mesh-sdk f047d0a4a9702f5d7f3d7eadd3e62496311acc00 conformance/events/module-event.json
|
||||
|
||||
To move them, from this repository's root, with the two repositories checked out beside it:
|
||||
|
||||
@@ -19,4 +20,8 @@ To move them, from this repository's root, with the two repositories checked out
|
||||
find testdata/beside -name module.json -exec mv {} {}.captured \;
|
||||
git -C ../mesh-host archive <commit> examples/foundation-first-node-nats.lock | tar -x -C testdata/beside/mesh-host
|
||||
|
||||
and write the commits here.
|
||||
and write the commits here. The SDK is captured at the commit go.mod pins for git.novox.be/novox/mesh-sdk/go
|
||||
(the last part of its pseudo-version; novox/hq issue 449), which internal/link's conformance test holds it to:
|
||||
|
||||
rm -rf testdata/beside/mesh-sdk && mkdir -p testdata/beside/mesh-sdk
|
||||
git -C ../mesh-sdk archive <commit> conformance/events | tar -x -C testdata/beside/mesh-sdk
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"capability": "events",
|
||||
"name": "a module emits an event",
|
||||
"why": "The envelope is what two implementations can disagree about without either failing: a missing header, a header spelled differently, or a body nested where metadata belongs. None of those stop a mesh running; they stop it reacting.",
|
||||
"given": {
|
||||
"module": "shop",
|
||||
"node": "one",
|
||||
"key": "order.placed",
|
||||
"body": { "id": "a1", "total": 12 },
|
||||
"headers": {
|
||||
"x-event-id": "0123456789abcdef0123456789abcdef",
|
||||
"x-source": "shop",
|
||||
"x-node": "one",
|
||||
"x-time": "2026-09-26T12:00:00Z",
|
||||
"content-type": "application/json"
|
||||
}
|
||||
},
|
||||
"wire": {
|
||||
"subject": "mesh.mod.shop.event.order.placed",
|
||||
"requiredHeaders": ["x-event-id", "x-source", "x-node", "x-time", "content-type"],
|
||||
"optionalHeaders": ["x-causation-id", "x-schema"],
|
||||
"headerFormats": {
|
||||
"x-time": "RFC3339",
|
||||
"content-type": "application/json",
|
||||
"x-event-id": "^[0-9a-f]{32}$"
|
||||
},
|
||||
"payloadIs": "the body alone, not the envelope",
|
||||
"keyRecoveredFrom": "the subject, after the .event. token"
|
||||
},
|
||||
"refuses": [
|
||||
{
|
||||
"what": "an envelope nested in the payload",
|
||||
"why": "an implementation that publishes the whole envelope as the body passes all of its own tests and is unreadable to every other"
|
||||
},
|
||||
{
|
||||
"what": "a missing x-event-id",
|
||||
"why": "delivery is at-least-once and only the emitter can say which of two messages is a redelivery"
|
||||
},
|
||||
{
|
||||
"what": "an x-source that differs from the subject's module",
|
||||
"why": "the bus enforces the namespace, so a disagreement means the envelope is lying about its origin"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user