From 450f6189d62b88f56345a4c353b2df0dfcd3a37c Mon Sep 17 00:00:00 2001 From: Jeffrey Smith Date: Thu, 2 Apr 2026 16:24:48 +0000 Subject: [PATCH] Add v0.7.6 Code Hygiene + Test Coverage to roadmap 9 code smells from chat gut (dead channels references, stale routes), migration numbering gaps, and store/workflow/middleware test coverage gaps identified in April 2026 codebase analysis. Gate for v0.8.x. Co-Authored-By: Claude Opus 4.6 (1M context) --- ROADMAP.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ROADMAP.md b/ROADMAP.md index 73c2c85..a1bd920 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -191,6 +191,43 @@ same pattern as the kernel surface migrations. | CI pipeline integration | done | Re-enable `test-runners` stage, add `e2e-smoke` stage. Failure blocks merge. | | Design docs landed | done | `docs/DESIGN-storage-primitives.md`, `docs/DESIGN-extension-composability.md`. Roadmap expanded through v1.0. | +### v0.7.6 — Code Hygiene + Test Coverage + +Codebase analysis (April 2026) found 9 code smells from the chat gut and +a test coverage gap in the store layer. Fix before v0.8.x kernel expansion. + +**Critical Fixes** + +| Step | Status | Description | +|------|--------|-------------| +| Remove channels from allowedViews | | `db_module.go` — `ext_view_channels` does not exist. `db.view("channels")` crashes. | +| Fix workflow.html dead routes | | Template calls `/api/v1/channels/{id}/workflow/*` — routes moved to `/api/v1/public/workflows/`. Update template to match. | + +**Dead Code Removal** + +| Step | Status | Description | +|------|--------|-------------| +| Delete SeedTestChannel() | | `database/testhelper.go` — inserts into nonexistent channels table. | +| Remove RunContext.ChannelID | | `sandbox/runner.go` — vestigial field, unused by any module. | +| Remove webhook.ChannelID | | `webhook/webhook.go` — vestigial struct field from chat era. | +| Fix stale comments | | `storage.go` key format, `prometheus.go` route pattern — reference dead `/channels` paths. | + +**Migration Hygiene** + +| Step | Status | Description | +|------|--------|-------------| +| Align SQLite migration numbering | | SQLite 013 = test_runner_type, PG 014 = same. Add placeholder `013_cluster_registry.sql` to SQLite (comment-only, explains PG-only). | +| Document missing 008 | | Add comment in both 009 files explaining the gap (merged/removed). | + +**Test Gap Closure** + +| Step | Status | Description | +|------|--------|-------------| +| store/ unit tests | | Direct tests for PG + SQLite store implementations. Priority: packages, ext_data, workflows. Target: ≥30% SLOC ratio (from 2%). | +| workflow/ engine unit tests | | Direct tests for `engine.go`, `routing.go`, `automated.go`. Currently 0% — tested only through handler integration. | +| middleware/ unit tests | | Auth middleware, rate limit, permissions. Currently 8.9%. | +| InstallPackage decomposition | | 224 cognitive complexity. Split into: validate → create → DDL → permissions → triggers. Each independently testable. | + --- ## Planned