Repository navigation
Conversation
Use native PostgreSQL SQL and restricted telemetry/account roles. Preserve legacy SQLite only in the offline importer, which snapshots, resumes and verifies data before enabling runtime access. Update native backups, deployment, tests and the source-pinned paired benchmark harness. BREAKING CHANGE: runtime storage requires PostgreSQL 18. Existing SQLite instances must use the documented planned-downtime import before cutover. Refs Kpa-clawbot#2144
|
Review feedback addressed (commit
Independent follow-up reviews are clear. Full CI and the paired performance results remain pending; this PR stays in draft. |
|
Review feedback addressed (commit
The previous run passed Go, race, and packaged deployment checks. A fresh full run and benchmark pilot are starting; comparative performance remains unverified. |
|
Review feedback addressed (commit
All 28 controls pass, and independent follow-up review is clear. The prior candidate passed every standard CI check, including native backup restoration and packaged startup. Its benchmark failed before PostgreSQL measurements; the new run must complete before any comparison is claimed. |
|
Review feedback addressed (commits
The full local S import passed: 30,000 transmissions, 90,000 observations and all 18 table digests match; the source is unchanged. The full importer suite and 29 benchmark controls pass. Independent review is clear. Standard CI passed on the previous candidate; the performance comparison is restarting with this fix. |
|
Review feedback addressed (commit
Go 1.27.2 full/hot startup retained all 112,000 transmissions and 1,792,000 observations for 65 seconds with zero evictions. Independent review and 31 harness controls pass. The small paired pilot completed earlier; the five-pair Linux comparison is restarting. No speedup is claimed. |
|
Review feedback addressed (commit The 100-event/s SQLite qualification filled its 1,024-event input queue during a retention pass: 82 schedules were dropped, while durable effects matched completed writes. That failed result remains linked in the benchmark documentation. The next experiment uses 50 events/s and 20 HTTP requests/s for both engines. Queue size, five pairs, durations, corpus, durability, resource limits and zero-loss gates are unchanged. It is labeled separately from the failed 100/s qualification. All 33 harness controls and workflow lint pass. Linux must still qualify the new rate; no speedup is claimed. |
|
Review feedback addressed (commit
Full local server/migrator suites, 195 frontend suites and 36 benchmark controls pass. Independent reviews are clear. The earlier five-pair comparison passed data checks; final-candidate CI and remeasurement are pending. This remains draft until results are published. |
|
Review feedback addressed (commit
The measured candidate passed all standard CI, packaged startup, browser validation and independent review. The final documentation update is going through CI; the completed benchmark is not being repeated. |
|
Scope update: SQLite will remain the default, with PostgreSQL offered explicitly at installation or update. Updates must preserve the configured backend; switching requires verified offline migration of telemetry and accounts. I’ve returned this PR to draft while adding backend selection and coverage for both configurations. The existing performance report measures the PostgreSQL-only candidate; it is not evidence for the forthcoming optional-backend implementation. The separate SQLite benchmark, retention and memory work under #2146 continues alongside this, without duplicating #2147. |
|
Review feedback addressed (commit
The pending #2214 schema remains outside the supported import layout, and no external-snapshot bypass was added. The ongoing soak on |
|
Review feedback addressed (commit
|
|
Review feedback addressed (commit
The current application source is identical to the locally verified database/migration/package candidate. Upstream CI is rerunning on the latest head; no fresh cloud pass is claimed yet. |
|
Soak moved to The soak above ran on On the earlier points Thanks for the sizing example in The import point is still open. On the cache change: the The last update also brings in about twenty UI, analytics and operator fixes from another fork. Splitting those into their own PRs would make this one easier to review, and would let soak results be attributed to the storage change rather than to everything that moved with it. Edited 2026-10-15: corrected option (a). The importer also refuses #2214's two tables, not just its triggers. |
Fixes #2144. Related to #2146, #2148 and #2151.
Also fixes #2200, #2212, #2213, #2216, #2217, #2218, #2219, #2221, #2226, #2227, #2228, #2229, #2230, #2231, #2232 and #2233.
SQLite remains the default; PostgreSQL is an explicit installation choice. Updates preserve the recorded backend and database targets. Planned-downtime conversion works in both directions, retains recovery copies and identity sequences, verifies telemetry and initialized accounts, and supports resume/abort. Missing initialized databases cannot become empty replacements.
Current upstream compatibility and upgrades
Merged upstream
6d56f551, retaining its compact observations, on-demand subpaths, companion/device accounts, key backfill and transmission rewrite feed. New queries, migrations, grants and fixtures support both native engines. The ingestor's account projection can read approved channels and linked public keys, without access to private account, session or challenge tables.Existing PostgreSQL installations have an offline owner upgrade from telemetry schema 1 to 2 and account schema 5 to 6. Bootstrap invokes it before readiness checks and runtime grants complete. It validates every recorded target and its supported physical layout before changing either database, excludes local running services, preserves the selection, and upgrades initialized accounts even when the account UI is disabled. An absent account store stays absent. Each database upgrade is transactional; interrupted work across the two databases is retryable, not a cross-database transaction.
Take native backups of both recorded stores, preserve state/configuration and the previous image, and stop writers before upgrading. Older images may require restoring their matching backups. SQLite account migration recognizes both historical version-6 layouts and preserves accounts, sessions, devices, companion links and identity high-water marks. See operator instructions.
Strict validation of unsupported source objects remains. The hop-index schema proposed in still-open #2214 is not included, and this update does not add an external-snapshot bypass.
Portable fixes from the fork
No new customizer settings or dependencies are introduced. Backend credentials and migration controls remain offline operator settings.
Performance evidence
Original backend comparison and raw results measured
c03a258against upstream3e21b17in two independent Linux five-pair studies. Different workloads/runners prevent ranking the candidate backends against each other. PostgreSQL cleanup improved from 11.27 to 0.97 seconds, while many reads slowed and CPU, PSS and storage increased. SQLite's observer-query regression was repaired separately. These historical measurements are not a new benchmark of this merged head.Bounded startup measurements cover observation-aware memory admission, complete-transmission admission, concurrent live observations and SQL access to history omitted from the cache. The same configured budget may retain a shorter hot window; database retention is unchanged. Disk-planning documentation includes the normalized working snapshot and avoids counting measured WAL twice.
The graph changes carry the paired algorithm benchmark from fork PR #9: on 2,000 nodes/10,000 edges, medians were 10.20 → 1.63 seconds for bridge scoring and 7.02 → 0.75 seconds for coverage scoring. Those measurements used Go 1.25.1 before this upstream merge, not live API traffic. Algorithmic complexity is unchanged; workspace stays O(V+E), with a heap bounded by V. This merged candidate passes independent path-oracle, allocation-bound and readiness regressions. SQL-under-store-lock tests enforce the locking property directly.
Validation
Local validation is used with the contributor's approval because their GitHub Actions minutes are exhausted. Upstream CI is rerunning for this head. The first run exposed an initial-theme timing race in the resize regression test and a missing declaration for an existing shared helper in the lint configuration. Follow-ups
30a812f3andd132e582correct these checks. Full frontend lint passes with zero errors, and the complete 24-check chart suite passes again after pushing. Application code is unchanged by these follow-ups. No fresh cloud-CI pass is claimed; earlier CI results apply to earlier commits.The current live Canadaverse deployment is separate from this PR update.