Keep route-proxy's contract a package of its own module, not a second module behind a replace
mesh/delivery-group group feat/1126-removal rejected: composed together: the checker's verdict at the members' heads (6593d973ff2e): the composition
mesh/delivery closed: the pull request closed unmerged
mesh/check failed: the composition: route-proxy is defined twice, in novox/mesh-controller and novox/mesh-networking | 759a7bff129b on fe0392e05f62 | …

The group's check failed at go mod verify: the build module's workspace carries one module, so the replace of
./contract named a go.mod it never placed; and ADR 0573 clause 1 refuses a path into another tree. Nothing outside
route-proxy imports the contract today; when one must, it moves into the networking domain's package (research 081).
Issue 1126.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 13:55:07 +01:00
parent 6c15ff3f0e
commit 759a7bff12
14 changed files with 16 additions and 21 deletions
+5 -5
View File
@@ -17,11 +17,11 @@ consumer on its own machine.
## Its contract: a package of its own
**route-proxy defines its own contract, and other modules use it** (the operator, 2026-10-31). It is the Go module
`git.novox.be/novox/mesh-networking/modules/route-proxy/contract`, in `contract/` here with its own `go.mod`, standard
library only, released by tags `modules/route-proxy/contract/vX.Y.Z` of this repository, the way mesh-sdk is released
(`go/vX.Y.Z`); another module depends on it by its version like any other, and this module builds it from its own
tree (a `replace` of `./contract` in `go.mod`), so the two never drift. It holds:
**route-proxy defines its own contract** (the operator, 2026-10-31). It is the package `contract` of this module
(`route-proxy/contract`), standard library only, built from the same tree, so the two never drift. No `replace` to a
directory and no second module: ADR 0573 clause 1 refuses a path into another tree, and the build module's workspace
carries one module. No other module imports it today; when one must, the contract moves into the networking domain's
package, as research 081 (how seats are defined) decides. It holds:
- **the route a consumer asks** (`Request`, read strictly by `DecodeRequest`: no field it does not name, a name of
either kind, a port where the rule forwards, http or https, a positive body limit, a secret's file never a
@@ -14,7 +14,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/provider"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
func say(format string, args ...any) {
@@ -13,7 +13,7 @@ package main
import (
"git.novox.be/novox/mesh-sdk/go/provider"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// ProvisionName is what route-proxy provides, as its manifest says, and ModuleName this module.
@@ -14,7 +14,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// The tools' names, as the manifest declares them.
@@ -9,7 +9,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// held is a state as the bus holds it, read-only.
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"git.novox.be/novox/mesh-sdk/go/process"
"git.novox.be/novox/mesh-sdk/go/provisions"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// keptStates is every state route-proxy keeps, as both its halves write them: the routes and the refusals this
@@ -17,7 +17,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// What this proxy says on the bus about the names it serves and the names it refuses (issue 774).
@@ -25,7 +25,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// fakeState is a state on the bus, in memory, counting what was written to it.
+1 -1
View File
@@ -65,7 +65,7 @@ import (
"golang.org/x/crypto/acme/autocert"
"golang.org/x/crypto/bcrypt"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// Where public certificates come from when nothing says otherwise.
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/provisions"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// planned is the routes the seat's plans give this proxy on its node, by plan key, kept so a plan that cannot be read
@@ -18,7 +18,7 @@ import (
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/delivery"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// behind is a workload the proxy can send to, and a table routing one public name and one
@@ -13,7 +13,7 @@ import (
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/provisions"
"git.novox.be/novox/mesh-networking/modules/route-proxy/contract"
"route-proxy/contract"
)
// routesFrom is the table a test's routes make, written as `{"given":[{"from","node","at","values"}…]}`: the
-3
View File
@@ -1,3 +0,0 @@
module git.novox.be/novox/mesh-networking/modules/route-proxy/contract
go 1.26.0
-2
View File
@@ -9,7 +9,6 @@ require (
)
require (
git.novox.be/novox/mesh-networking/modules/route-proxy/contract v0.1.0
github.com/klauspost/compress v1.20.0 // indirect
github.com/nats-io/nkeys v0.4.16 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
@@ -19,4 +18,3 @@ require (
)
// The contract is this repository's own Go module, beside this one (contract/): built from the tree, not fetched.
replace git.novox.be/novox/mesh-networking/modules/route-proxy/contract => ./contract