Document mc-proxy migration in PROGRESS.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
33
PROGRESS.md
33
PROGRESS.md
@@ -99,6 +99,37 @@ Dependencies added:
|
|||||||
|
|
||||||
Result: vet clean, lint 0 issues, builds successfully.
|
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
|
## Next Steps
|
||||||
|
|
||||||
- Phase 11: Broader adoption (metacrypt, mcr, mc-proxy, mcias)
|
- Phase 11b: mcr migration
|
||||||
|
- Phase 11c: metacrypt migration
|
||||||
|
- Phase 11d: mcias migration
|
||||||
|
|||||||
Reference in New Issue
Block a user