mesh-mail: its go.mod test no longer reads a release out of the mesh-sdk version (the floor version, ADR 0573)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 18:04:55 +01:00
parent fb6bf361e4
commit 76e25aeee0
@@ -1,7 +1,7 @@
package main
// The SDK pin a process's own bus connection needs (novox/hq ADR 0436 §4, issue 1172): mesh-mail's go.mod
// requires mesh-sdk go at the release-2 commit (main 34392e7) and go 1.26.0, and go/process is importable.
// requires mesh-sdk go and go 1.26.0, and go/process is importable.
// The blank import below is what proves importability at compile time; go vet (run before every commit, per
// the context file) already fails the build if it is not.
@@ -13,19 +13,17 @@ import (
_ "git.novox.be/novox/mesh-sdk/go/process"
)
// 1172/AC1: given mesh-mail's go.mod, when built, then it requires mesh-sdk go at the release-2 commit or after it
// (v0.1.14-0.20261019062050-34392e74916c or any later pseudo-version, which the catalogue's pins move) and go 1.26.0, and
// go/process is importable (the import above).
func TestGoModPinsTheSDKsProcessRelease(t *testing.T) {
// 1172/AC1, as ADR 0573 sections 2 and 4 hold it: a go.mod names the oldest version a module accepts, the check builds
// the group's own heads whatever it names, so the test no longer reads a release out of the version. It asks that go.mod
// requires mesh-sdk go (at any version) and go 1.26.0, and go/process is importable (the import above).
func TestGoModRequiresTheSDKAndGo(t *testing.T) {
raw, err := os.ReadFile("../../go.mod")
if err != nil {
t.Fatal(err)
}
mod := string(raw)
const prefix, release2 = "git.novox.be/novox/mesh-sdk/go v0.1.14-0.", "20261019062050"
at := strings.Index(mod, prefix)
if at < 0 || len(mod) < at+len(prefix)+14 || mod[at+len(prefix):at+len(prefix)+14] < release2 {
t.Fatalf("go.mod does not require mesh-sdk go at release 2 (%s) or after:\n%s", release2, mod)
if !strings.Contains(mod, "git.novox.be/novox/mesh-sdk/go v") {
t.Fatalf("go.mod does not require mesh-sdk go:\n%s", mod)
}
if !strings.Contains(mod, "go 1.26.0") {
t.Fatalf("go.mod does not declare go 1.26.0:\n%s", mod)