From db5ef85fa9494899c624d2834f6ef2e9177d94bb Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Wed, 25 Mar 2026 16:57:31 -0700 Subject: [PATCH] Document mc-proxy migration in PROGRESS.md Co-Authored-By: Claude Opus 4.6 (1M context) --- PROGRESS.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/PROGRESS.md b/PROGRESS.md index 9707106..71d4d2f 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -99,6 +99,37 @@ Dependencies added: Result: vet clean, lint 0 issues, builds successfully. +### Phase 11a: mc-proxy Migration (2026-03-25) + +mc-proxy migrated db and config to mcdsl. Different pattern from mcat +because mc-proxy doesn't embed config.Base (no [server] or [mcias] sections). + +| Changed | How | +|---------|-----| +| `internal/db/db.go` Open | Delegates to `mcdsl/db.Open` | +| `internal/db/migrations.go` | Function-based migrations → `mcdsl/db.Migration` SQL strings | +| `internal/db/snapshot.go` | Delegates to `mcdsl/db.Snapshot` | +| `internal/config/config.go` Duration | Type alias for `mcdsl/config.Duration` | +| `internal/config/config.go` Load | Uses `mcdsl/config.Load[T]` + Validator interface | + +Key design decisions: +- Store wrapper kept (has CRUD methods specific to mc-proxy) +- `type Duration = mcdslconfig.Duration` alias so all existing code + referencing `config.Duration` continues to work unchanged +- mc-proxy's complex validation stays as a Validate() method +- Manual env overrides kept for int64 rate_limit (reflection can't handle) + +Dependencies removed as direct: +- `modernc.org/sqlite` (now indirect via mcdsl) +- `github.com/pelletier/go-toml/v2` (now indirect via mcdsl) + +Behavioral change: invalid duration env overrides are now silently ignored +(test updated to match). + +Result: all tests pass, builds clean. Net -129 lines. + ## Next Steps -- Phase 11: Broader adoption (metacrypt, mcr, mc-proxy, mcias) +- Phase 11b: mcr migration +- Phase 11c: metacrypt migration +- Phase 11d: mcias migration