Skip to content

feat: default to SQLite with optional PostgreSQL - #4

Merged
ReaJason merged 1 commit into
masterfrom
sqlite-default
Nov 5, 2026
Merged

ReaJason merged 1 commit into
masterfrom
sqlite-default

Conversation

@ReaJason

@ReaJason ReaJason commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

application startup
├── default: SQLite
│   ├── portable JPA JSON mappings
│   ├── WAL + busy timeout + immediate transactions
│   └── persistent compose volume
└── opt in: PostgreSQL
    ├── postgresql Spring profile
    └── compose.postgres.yml override
  • Make SQLite the zero-configuration default while retaining PostgreSQL as an explicit option.
  • Replace PostgreSQL-only jsonb column definitions with dialect-managed JSON mappings.
  • Add SQLite identity DDL compatibility and production-like initialization coverage.
  • Prevent concurrent session, audit, and Shell status writes from failing with SQLITE_BUSY by correcting transaction boundaries.
  • Document backup, deployment, and database-selection behavior.

Evidence

  • Before: concurrent Controller requests returned 401 after SQLITE_BUSY; audited writes returned 201 without an audit row; Shell dispatch returned failure code 1 on nested writes.
    After: the new SQLite integration tests cover concurrent page requests, audit persistence, and Shell dispatch status/system-info writes; all pass.
  • ./gradlew :noone-server:test — full suite passed, including SQLite integration tests and PostgreSQL Testcontainers Controller tests.
  • Default and PostgreSQL-overlay Compose configurations passed docker compose config --quiet for dev, nightly, and prod.
  • Browser smoke test: /generator and /shells render successfully against the default SQLite backend.

Merge Danger

Door: two-way

Code and deployment defaults can be reverted, but operators should choose the intended database before upgrading.

Blast Radius: server persistence and deployment startup

Default Compose deployments now use SQLite. Existing PostgreSQL deployments must include compose.postgres.yml; switching database types does not migrate data. Audit and Shell remote-operation transaction boundaries are shared by both database profiles.

🤖 Generated with Kimi

Use portable JSON mappings, persistent SQLite Compose volumes, and an explicit PostgreSQL overlay. Configure SQLite for concurrent access and keep audit and shell remote operations outside nested write transactions.

Co-Authored-By: Kimi <noreply@moonshot.cn>
@vercel

vercel Bot commented Nov 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
no-one Ready Ready Preview Nov 5, 2026 12:50am UTC

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.57%. Comparing base (d376e01) to head (434a407).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master       #4      +/-   ##
============================================
+ Coverage     46.51%   52.57%   +6.05%     
- Complexity      524      549      +25     
============================================
  Files           107      108       +1     
  Lines          3145     3150       +5     
  Branches        395      395              
============================================
+ Hits           1463     1656     +193     
+ Misses         1443     1251     -192     
- Partials        239      243       +4     
Flag Coverage Δ
noone-server 52.57% <100.00%> (+6.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ReaJason
ReaJason merged commit f8fff95 into master Nov 5, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 434a4076 Deployed Nov 5, 2026 by vercel[bot]
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.

2 participants