Refactor architecture into eight components and consolidate reliability work
Build and publish container images / images (push) Successful in 9m34s
Release container images / release (push) Successful in 36s

Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts.

Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation.

Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
This commit is contained in:
Anya Tokugawa committed 2026-11-01 15:23:31 +09:00
1 parent 9dd425f765
commit d5d21b7841
302 files changed
+20037 -3492

No files matched your search

+17 -1
View File
@@ -1,9 +1,12 @@
package db
import (
"context"
"database/sql"
"fmt"
"net/url"
"path/filepath"
"time"
_ "modernc.org/sqlite"
)
@@ -24,7 +27,20 @@ func Open(path string) (*sql.DB, error) {
},
}.Encode(),
}).String()
return sql.Open("sqlite", dsn)
database, err := sql.Open("sqlite", dsn)
if err != nil {
return nil, err
}
// sql.Open is lazy. Establish WAL once before exposing the pool, otherwise
// simultaneous first borrowers race the initial journal_mode transition in
// their connection pragmas (SQLITE_BUSY before BEGIN IMMEDIATE is reached).
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
if err := database.PingContext(ctx); err != nil {
database.Close()
return nil, fmt.Errorf("initialize SQLite connection: %w", err)
}
return database, nil
}
func Init(db *sql.DB) error {