8000 fix(ci): recover baseline SQLite WAL startup race by adeelahmad · Pull Request #728 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

fix(ci): recover baseline SQLite WAL startup race - #728

Merged
adeelahmad merged 7 commits into
mainfrom
fix/upgrade-baseline-wal-restart
Nov 6, 2026
Merged

adeelahmad merged 7 commits into
mainfrom
fix/upgrade-baseline-wal-restart

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Evidence and fix

Upgrade job 128087988293 failed before seeding v0.20.0: its worker exited at textindex.py → PRAGMA journal_mode=WAL with sqlite3.OperationalError: database is locked, while the API completed startup. Production has restart: unless-stopped, whereas the harness stopped immediately.

Restart only the baseline worker for this specific traceback, at most twice within the existing startup budget. Preserve every failed attempt log. Initially start API and worker concurrently in both versions. Never retry the target version, API failures, migration failures or other exceptions. Check process liveness before and after readiness probes. All seeding, authentication, data retention, backup, exactly-once migration and idempotency checks are unchanged.

Seven stdlib regression tests run in Upgrade CI before the real upgrade, covering concurrent startup, recovery and logs, retry exhaustion, target fail-fast, unrelated errors, dead-worker readiness and API failure. Document the retry policy and add a changelog fragment.

Verification

  • Passed: bash -n ci/upgrade/upgrade.sh.
  • Passed: python3 ci/upgrade/test_startup.py -v.
  • Full ci/local-ci.sh --pr N, Docker upgrade and aggregate checks not run locally: this executor has materialized files but no Git checkout or Docker. PR CI must pass before merge; this draft is not a release-ready claim.

Done questions

  1. Goal: Pending green CI and merge; addresses the startup blocker, not the entire requested release.
  2. Agents: n/a, CI-only change.
  3. Zero setup: Yes, no new dependencies.
  4. Fewest clicks: n/a, automated CI.
  5. Configurable: n/a, no new user settings.
  6. Light: Yes, stdlib tests only; no installed runtime change.
  7. Private and secure: Yes, no new data flow or attack surface.
  8. Cost: n/a, no model calls.
  9. User decides: Yes, runtime defaults unchanged.
  10. Upgrades: Yes, all existing upgrade assertions retained; no schema change.
  11. Honest: Yes, test limitations disclosed.
  12. Tested and documented: Focused checks pass; CI pending. Documentation updated; no generated assets.
  13. Open: Yes, no dependencies added.
  14. Reported: Draft and test evidence returned to release coordinator; release remains pending.
  15. Reuse: Yes, existing shell lifecycle and production restart behavior.

@adeelahmad
adeelahmad marked this pull request as ready for review November 6, 2026 19:11
@adeelahmad
adeelahmad merged commit a81a6f5 into main Nov 6, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the fix/upgrade-baseline-wal-restart branch November 6, 2026 19:11
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

0