Feat v0.5.5 upgrade testing
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 3s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Failing after 2m39s
CI/CD / test-sqlite (pull_request) Successful in 2m44s
CI/CD / build-and-deploy (pull_request) Has been skipped

Upgrade test harness, schema edge case tests, and two bug fixes found
during testing.

New: docker-compose-upgrade.yml + ci/e2e-upgrade-test.sh for single-replica
upgrade testing (seed → upgrade → verify). ci/e2e-upgrade-rolling.sh for
multi-replica rolling upgrade with shared Postgres. 11 Go unit tests for
schema migration edge cases, settings preservation, and package compat.

Fix: Bundled permission auto-grant on Postgres — SQL used SQLite-style
`granted = 1` on BOOLEAN columns. Now dialect-aware (true/false on PG).
Fix: E2E chat test API fields — login, token extraction, profile endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 20:27:31 +00:00
parent 4da25350ac
commit 2c792cd3ec
9 changed files with 1445 additions and 14 deletions

View File

@@ -2,6 +2,38 @@
All notable changes to Switchboard Core are documented here.
## v0.5.5 — Upgrade Testing
### Fixed
- **Bundled permission auto-grant on Postgres**: The `InstallBundledPackages`
auto-grant SQL used SQLite-style `granted = 1` / `granted = 0` which fails
on Postgres BOOLEAN columns. Now dialect-aware: `true`/`false` on Postgres,
`1`/`0` on SQLite. This caused bundled extensions (notes, chat-core, etc.)
to install with permissions not granted on Postgres deployments.
- **E2E test API field corrections**: Fixed `ci/e2e-chat-test.sh` login field
(`"username"``"login"`), token extraction (`"token"``"access_token"`),
and profile endpoint (`/api/v1/me``/api/v1/profile`).
### Added
- **Upgrade test harness**: `docker-compose-upgrade.yml` + `ci/e2e-upgrade-test.sh`
orchestrate a full upgrade cycle: build old image, seed data (notes,
conversations, messages, settings), stop old, start new, verify data integrity
post-upgrade. Covers auth, notes, conversations, packages, and settings.
- **Rolling upgrade test**: `ci/e2e-upgrade-rolling.sh` tests rolling upgrade
with 2 replicas sharing Postgres. Upgrades one replica at a time, verifies
cross-replica reads during the mixed-version window.
- **11 new Go tests** in `upgrade_test.go`:
- Schema edge cases: add index (idempotent), add column (idempotent),
multi-column add, row preservation across migration.
- Settings migration: global/team/user overrides preserved across package
update, new keys get defaults, removed keys not deleted.
- Package compatibility: bundled skip-if-present on restart, dormant status
for unmet requires, enabled/type preserved across version bump.
- Direct `MigrateExtTables` tests: new table creation, column add with row
preservation, index idempotency.
## v0.5.4 — Package Updates
### Added