๐
ARB1-MEFINE-ROUTER-001
Fleet Go Routing Architecture Review
mefine-static ยท stdlib vs chi vs cube-doctrine ยท Day 97
ยง1 โ Decision Record
Decision D1 โ Immediate
Adopt Cube Catch-All Doctrine for all slash-nested route families in mefine-static
Decision D2 โ Near Term
New Go services in the fleet use chi v5, not stdlib ServeMux
Decision D3 โ Mid Term
Add startup route assertion: verify all dispatch map files exist in embed FS
Decision D4 โ Open
Evaluate chi wrapper around mefine-static for full route unification
ยง2 โ Options Evaluated
SELECTED โ D1
Cube Catch-All in stdlib
Zero new dependencies. Proven working in v154. Slash-nested families handled in catch-all with explicit dispatch maps. Aligns with existing architecture.
SELECTED โ D2 (new services)
chi v5 for new Go services
Full stdlib http.Handler compat. No auto-redirects. Explicit routing. First-class middleware. Route groups map cleanly to SOSTLE zone boundaries. Used by senior Go engineers as default.
REJECTED
Migrate mefine-static to chi now
3,116+ routes in current binary. Risk outweighs benefit. Cube Catch-All solves the immediate problem. Defer migration until fleet has dedicated routing sprint.
REJECTED โ for main fleet
Fiber (fasthttp-based)
Not net/http compatible. Isolates from entire Go middleware ecosystem. Only valid for isolated high-throughput components with no existing middleware dependencies.
DEFERRED
Connect-RPC for service-to-service
Valid for fleet internal APIs (pemclau, LAAM, etc.). Protobuf-based. Eliminates routing as a concern entirely for S2S. Evaluate in dedicated S2S sprint.
ยง3 โ Implementation Tasks
| Task | Owner | Status | Target |
| Cube Catch-All for /clo/* in mefine-static | CODY | DONE | v154 |
| Ingress /clo/* backend โ mefine-static | BOSUN | DONE | Day 97 |
| TRB-MSI01-GO-ROUTER-001 filed | IMHOTEP | DONE | Day 97 |
| Startup embed FS route assertion | CODY | OPEN | v155+ |
| chi pilot service (new endpoint) | CODY | PLANNED | Week 12 |
| Quasicrystal route graph in SOT living graph | SIGNALS | PLANNED | Week 12 |
| ARB1 route weave into PEMCLAU graphRAG | SIGNALS | PLANNED | Week 12 |
ยง4 โ The Quasicrystal Connection
The dispatchMap pattern in the Cube Catch-All is not just a workaround โ it IS a quasicrystal routing structure. Properties:
โข Aperiodic: routes don't follow a regular pattern (no /clo/1, /clo/2 โ instead named vertices: amani, harvey, ruth, cochran, mandela)
โข Deterministic: each vertex maps to exactly one file โ no ambiguity, no fallback
โข Self-similar: the same catch-all pattern applies to any slash-nested family regardless of depth
โข Growing: add a vertex by adding one map entry โ the crystal grows without restructuring
Cube Doctrine: each catch-all dispatch map is a quasicrystal shard. The living graph indexes these shards. SET-OPS validates the shard at deploy time. PEMCLAU can RAG-query across all shards to answer "which crew member owns this URL path?"
ยง5 โ Linked Filings
ARB1-MEFINE-ROUTER-001 ยท Day 97 ยท ฮณโ = 14.134725141734693