diff --git a/docs/plans/v2.2/01-route-templates.md b/docs/plans/v2.2/01-route-templates.md index 54d677c..fd44437 100644 --- a/docs/plans/v2.2/01-route-templates.md +++ b/docs/plans/v2.2/01-route-templates.md @@ -17,9 +17,14 @@ instances never share a lease and each has its own usage row. - Copy: `internal/config/config_v22_test.go` (its `TestWakeBroadcasts` belongs to task 02 and will fail to compile until then — see step 2), `internal/proxy/template_test.go`, `internal/admin/admin_template_test.go` -- Modify: `internal/config/config.go`, `internal/proxy/proxy.go`, `internal/admin/admin.go`, - `internal/admin/admin_ops.go`, `cmd/crossbar/main.go` (the identity middleware's route→peers - lookup), `docs/implementer-log.md` +- Create: `internal/config/route.go` — the template name pattern and `Route()` live here; + `config.go` is already at the 400-line limit, so add nothing to it beyond what the new file + needs from it (one-line hooks are fine) +- Modify: `internal/config/config.go` (minimal), `internal/proxy/proxy.go`, + `internal/admin/admin.go`, `internal/admin/admin_ops.go`, `cmd/crossbar/main.go` (the identity + middleware's route→peers lookup), `docs/implementer-log.md`. If `proxy.go` would pass 400 + lines, move route resolution (`route`, `SplitRoute`, `allowedPath`) into a new + `internal/proxy/route.go`. ## Interfaces @@ -56,7 +61,7 @@ Rules: `go test -race -count=1 ./internal/proxy/ ./internal/admin/` for the behaviour, and `go vet ./internal/config/` will fail only on the missing `Addresses` method until task 02: that is expected and is the one allowed red at the end of this task. Say so in the log row. -- [ ] **3.** `config.go`: the template regex, `Route()`. **4.** `proxy.go` route resolution. +- [ ] **3.** `config/route.go`: the template pattern, `Route()`; the validation in `config.go` accepts template names. **4.** `proxy.go` route resolution. **5.** `admin.go` / `admin_ops.go`. **6.** `main.go`. - [ ] **7.** `gofmt -w`; `go test -race -count=1 ./internal/proxy/ ./internal/admin/ ./internal/health/ ./internal/wake/` → `ok`. - [ ] **8.** Row `v2.2/01-route-templates`; commit (the gate runs green after task 02). @@ -75,4 +80,3 @@ git commit ## Stop and report if - Passing needs a change to any earlier given test. -- The 400-line limit forces `proxy.go` apart: say which split you propose before doing it. diff --git a/docs/plans/v2.2/README.md b/docs/plans/v2.2/README.md index 9be35b5..e2e6ae5 100644 --- a/docs/plans/v2.2/README.md +++ b/docs/plans/v2.2/README.md @@ -27,4 +27,7 @@ intended reasons. ## Changes during the run -(none yet) +- 2026-09-25, task 01, first session: ten minutes circling the line budget — `config.go` was + already at 401 lines and the task named no new file for the package. Owner fault: the task now + creates `internal/config/route.go` (and allows `internal/proxy/route.go`). Session stopped and + restarted on a clean tree.