- Project scaffolding: go.mod, Makefile, .golangci.yaml, doc.go - README, ARCHITECTURE, PROJECT_PLAN, PROGRESS documentation - db package: Open (WAL, FK, busy timeout, 0600 permissions), Migrate (sequential, transactional, idempotent), SchemaVersion, Snapshot (VACUUM INTO) - 11 tests covering open, migrate, and snapshot Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.4 KiB
1.4 KiB
MCDSL Progress
Current State
Phase 1 complete. The db package is implemented and tested.
Completed
Phase 0: Project Setup (2026-03-25)
- Initialized Go module (
git.wntrmute.dev/kyle/mcdsl) - Created
.golangci.yamlmatching platform standard (withexportedrule enabled since this is a shared library) - Created
Makefilewith standard targets (build, test, vet, lint, all) - Created
.gitignore - Created
doc.gopackage doc make allpasses clean
Phase 1: db — SQLite Foundation (2026-03-25)
Open(path string) (*sql.DB, error)— opens with WAL, FK, busy timeout 5000ms, 0600 permissions, creates parent dirsMigrationtype with Version, Name, SQL fieldsMigrate(database *sql.DB, migrations []Migration) error— sequential, transactional, idempotent, records name and timestamp in schema_migrationsSchemaVersion(database *sql.DB) (int, error)— highest applied versionSnapshot(database *sql.DB, destPath string) error— VACUUM INTO with 0600 permissions, creates parent dirs- 11 tests: open (pragmas, permissions, parent dir, existing DB), migrate (fresh, idempotent, incremental, records name), schema version (empty), snapshot (data integrity, permissions, parent dir)
make allpasses clean (vet, lint 0 issues, 11/11 tests, build)
Next Steps
- Phase 2:
authpackage (MCIAS token validation with caching)