Skip to content

feat(core): config-driven database bootstrap via db.toml#17

Merged
lostmygithubaccount merged 4 commits intomainfrom
cody/config-driven-bootstrap
Apr 4, 2026
Merged

feat(core): config-driven database bootstrap via db.toml#17
lostmygithubaccount merged 4 commits intomainfrom
cody/config-driven-bootstrap

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Add declarative db.toml config file that bootstraps databases, tables, indexes, and server settings on startup
  • Config resolution: ./db.toml (CWD) then ~/.dkdc/db/config.toml (global fallback); optional — server works as before without config
  • Bootstrap is additive-only and idempotent (CREATE TABLE/INDEX IF NOT EXISTS)
  • New CLI commands: db init (scaffold starter config), db bootstrap (run bootstrap without server)
  • db serve --foreground now loads config, applies server host/port (CLI flags override), and bootstraps before starting
  • New Config(String) error variant in core, handled in server API
  • 6 tests: 3 parsing (minimal, full, empty) + 3 async bootstrap (create, idempotent, multi-db)

Generated with Claude Code

lostmygithubaccount and others added 3 commits April 4, 2026 13:32
…e, schema refresh, and build

- fix(core): track single-quoted string boundaries in CTE paren balancer to prevent
  string literals containing parens from misbalancing the parser (security fix)
- fix(server): classify errors into proper HTTP status codes (404 for not found,
  400 for validation, 409 for conflicts, 500 for internal errors)
- fix(server): return JSON body on request timeout instead of empty 408 response
- fix(core): return NULL instead of silently defaulting to 0/0.0 for unparseable
  numeric text values in type conversion
- fix(core): fall back to PRAGMA table_info for NULL column type inference in OLTP
  path instead of always defaulting to Utf8
- perf(core): selective schema refresh after DDL — only refresh the affected table
  instead of all tables
- perf: remove unused prettyprint feature from arrow dependency
- perf: restrict tokio dev-dependencies from "full" to specific features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 tests covering imports/API availability, database lifecycle,
execute operations, query/query_oltp paths, error handling, and
cross-database joins/unions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Declarative db.toml config file bootstraps databases, tables, indexes,
and server settings on startup. Config resolution: ./db.toml then
~/.dkdc/db/config.toml. Bootstrap is additive-only and idempotent
(CREATE IF NOT EXISTS). New CLI commands: db init, db bootstrap.
Serve now loads config and bootstraps before starting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount enabled auto-merge (squash) April 4, 2026 18:58
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lostmygithubaccount lostmygithubaccount merged commit d4aa50b into main Apr 4, 2026
1 check passed
@lostmygithubaccount lostmygithubaccount deleted the cody/config-driven-bootstrap branch April 4, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant