From 759a7bff129bd485792f8c822fe622f6b4fb6e22 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 2 Nov 2026 13:55:07 +0100 Subject: [PATCH] Keep route-proxy's contract a package of its own module, not a second module behind a replace 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 --- modules/route-proxy/README.md | 10 +++++----- modules/route-proxy/cmd/route-provider/main.go | 2 +- modules/route-proxy/cmd/route-provider/provider.go | 2 +- modules/route-proxy/cmd/route-provider/tools.go | 2 +- modules/route-proxy/cmd/route-provider/tools_test.go | 2 +- modules/route-proxy/cmd/route-proxy/bus.go | 2 +- modules/route-proxy/cmd/route-proxy/ledger.go | 2 +- modules/route-proxy/cmd/route-proxy/ledger_test.go | 2 +- modules/route-proxy/cmd/route-proxy/main.go | 2 +- modules/route-proxy/cmd/route-proxy/plans.go | 2 +- modules/route-proxy/cmd/route-proxy/reach_test.go | 2 +- modules/route-proxy/cmd/route-proxy/routes_test.go | 2 +- modules/route-proxy/contract/go.mod | 3 --- modules/route-proxy/go.mod | 2 -- 14 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 modules/route-proxy/contract/go.mod diff --git a/modules/route-proxy/README.md b/modules/route-proxy/README.md index 1eae3ed..e8144c7 100644 --- a/modules/route-proxy/README.md +++ b/modules/route-proxy/README.md @@ -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 diff --git a/modules/route-proxy/cmd/route-provider/main.go b/modules/route-proxy/cmd/route-provider/main.go index 613405e..abdf46e 100644 --- a/modules/route-proxy/cmd/route-provider/main.go +++ b/modules/route-proxy/cmd/route-provider/main.go @@ -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) { diff --git a/modules/route-proxy/cmd/route-provider/provider.go b/modules/route-proxy/cmd/route-provider/provider.go index 2544845..4c2b6ae 100644 --- a/modules/route-proxy/cmd/route-provider/provider.go +++ b/modules/route-proxy/cmd/route-provider/provider.go @@ -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. diff --git a/modules/route-proxy/cmd/route-provider/tools.go b/modules/route-proxy/cmd/route-provider/tools.go index 1b9109f..218fa0e 100644 --- a/modules/route-proxy/cmd/route-provider/tools.go +++ b/modules/route-proxy/cmd/route-provider/tools.go @@ -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. diff --git a/modules/route-proxy/cmd/route-provider/tools_test.go b/modules/route-proxy/cmd/route-provider/tools_test.go index 3d4c7be..eed6527 100644 --- a/modules/route-proxy/cmd/route-provider/tools_test.go +++ b/modules/route-proxy/cmd/route-provider/tools_test.go @@ -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. diff --git a/modules/route-proxy/cmd/route-proxy/bus.go b/modules/route-proxy/cmd/route-proxy/bus.go index 911bfc7..2bd3160 100644 --- a/modules/route-proxy/cmd/route-proxy/bus.go +++ b/modules/route-proxy/cmd/route-proxy/bus.go @@ -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 diff --git a/modules/route-proxy/cmd/route-proxy/ledger.go b/modules/route-proxy/cmd/route-proxy/ledger.go index e6d4d70..19c8570 100644 --- a/modules/route-proxy/cmd/route-proxy/ledger.go +++ b/modules/route-proxy/cmd/route-proxy/ledger.go @@ -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). diff --git a/modules/route-proxy/cmd/route-proxy/ledger_test.go b/modules/route-proxy/cmd/route-proxy/ledger_test.go index f025e00..45c6b7e 100644 --- a/modules/route-proxy/cmd/route-proxy/ledger_test.go +++ b/modules/route-proxy/cmd/route-proxy/ledger_test.go @@ -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. diff --git a/modules/route-proxy/cmd/route-proxy/main.go b/modules/route-proxy/cmd/route-proxy/main.go index df423d3..2a7334c 100644 --- a/modules/route-proxy/cmd/route-proxy/main.go +++ b/modules/route-proxy/cmd/route-proxy/main.go @@ -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. diff --git a/modules/route-proxy/cmd/route-proxy/plans.go b/modules/route-proxy/cmd/route-proxy/plans.go index 480a02f..b2e91fa 100644 --- a/modules/route-proxy/cmd/route-proxy/plans.go +++ b/modules/route-proxy/cmd/route-proxy/plans.go @@ -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 diff --git a/modules/route-proxy/cmd/route-proxy/reach_test.go b/modules/route-proxy/cmd/route-proxy/reach_test.go index 74200c7..a6960e1 100644 --- a/modules/route-proxy/cmd/route-proxy/reach_test.go +++ b/modules/route-proxy/cmd/route-proxy/reach_test.go @@ -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 diff --git a/modules/route-proxy/cmd/route-proxy/routes_test.go b/modules/route-proxy/cmd/route-proxy/routes_test.go index 76ede98..0602ed3 100644 --- a/modules/route-proxy/cmd/route-proxy/routes_test.go +++ b/modules/route-proxy/cmd/route-proxy/routes_test.go @@ -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 diff --git a/modules/route-proxy/contract/go.mod b/modules/route-proxy/contract/go.mod deleted file mode 100644 index 51aac58..0000000 --- a/modules/route-proxy/contract/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module git.novox.be/novox/mesh-networking/modules/route-proxy/contract - -go 1.26.0 diff --git a/modules/route-proxy/go.mod b/modules/route-proxy/go.mod index cf8f360..593bfe7 100644 --- a/modules/route-proxy/go.mod +++ b/modules/route-proxy/go.mod @@ -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