Skip to content

chore: drop stale PGlite references + vestigial workaround comments#1119

Merged
buremba merged 1 commit into
mainfrom
feat/pglite-cleanup
May 28, 2026
Merged

chore: drop stale PGlite references + vestigial workaround comments#1119
buremba merged 1 commit into
mainfrom
feat/pglite-cleanup

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 28, 2026

Summary

Post-#965 (embedded-postgres replacing PGlite), several comment blocks still referenced PGlite-era constraints that no longer apply. This sweep cleans up:

  • Landing docs (5 files): "bundled PGlite" / "in-process PGlite" → "embedded Postgres" copy.
  • Server code comments: `vitest.config.ts`, `scripts/build-server-bundle.mjs`, `tests/setup/test-db.ts`, `tests/setup/embedded-postgres-backend.ts`, `gateway/tests/turn-liveness.test.ts`.
  • Removed two stale comment blocks in `auth/index.tsx` justifying the `ctx.internalAdapter` pattern as a "PGlite pool-max=1 deadlock workaround" — the pattern is still the right BetterAuth idiom for transactional consistency, but the deadlock narrative is dead.
  • Removed two stale comment blocks in `gateway/orchestration/turn-liveness.ts` justifying literal queue_name as a "PGlite parameterized-RETURNING quirk workaround"; SQL unchanged.
  • CLI: `scripts/build.cjs` migration-copy comment + one test name.

Code unchanged — purely stale-narrative removal. Paired with owletto#239 (Chrome extension comment fix); submodule pointer bumped here.

Test plan

  • `bun run typecheck` — clean
  • `packages/server` `tsc --noEmit` — clean
  • `packages/landing` build — succeeds, 86 pages
  • Comment/docs-only; no behavior change

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Documentation
    • Updated getting-started guides, architecture docs, troubleshooting guides, and CLI reference to reflect embedded Postgres (PG18 + pgvector) as the default local database.
    • Clarified that DATABASE_URL is optional for local runs but required for monorepo development.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@buremba, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 3 minutes and 11 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f35ee12f-b517-4544-bfa6-ef9f7b1b77f3

📥 Commits

Reviewing files that changed from the base of the PR and between aaf0f7f and 3865ad7.

📒 Files selected for processing (17)
  • db/migrations/00000000000000_baseline.sql
  • packages/cli/scripts/build.cjs
  • packages/cli/src/__tests__/dev.test.ts
  • packages/landing/src/content/docs/getting-started/comparison.md
  • packages/landing/src/content/docs/getting-started/index.mdx
  • packages/landing/src/content/docs/guides/architecture.mdx
  • packages/landing/src/content/docs/guides/troubleshooting.md
  • packages/landing/src/content/docs/reference/cli.md
  • packages/owletto
  • packages/server/scripts/build-server-bundle.mjs
  • packages/server/src/__tests__/setup/embedded-postgres-backend.ts
  • packages/server/src/__tests__/setup/test-db.ts
  • packages/server/src/auth/index.tsx
  • packages/server/src/gateway/__tests__/turn-liveness.test.ts
  • packages/server/src/gateway/orchestration/turn-liveness.ts
  • packages/server/src/lobu/agent-routes.ts
  • packages/server/vitest.config.ts
📝 Walkthrough

Walkthrough

This PR updates terminology throughout the Lobu codebase, replacing references to "PGlite" with "embedded Postgres" (PG18 with pgvector) to reflect the default bundled database for scaffolded projects. Changes span CLI build scripts, landing documentation, server infrastructure comments, and a subproject version bump. No executable logic or functional behavior has been modified.

Changes

Terminology update: PGlite to embedded Postgres

Layer / File(s) Summary
CLI build scripts and test descriptions
packages/cli/scripts/build.cjs, packages/cli/src/__tests__/dev.test.ts
Build script comment and test case descriptions updated to refer to embedded Postgres instead of PGlite as the bundled local server.
Landing page documentation updates
packages/landing/src/content/docs/getting-started/comparison.md, packages/landing/src/content/docs/getting-started/index.mdx, packages/landing/src/content/docs/guides/architecture.mdx, packages/landing/src/content/docs/guides/troubleshooting.md, packages/landing/src/content/docs/reference/cli.md
All public documentation updated to reflect embedded Postgres (PG18 + pgvector) as the default scaffolded database. Changes clarify DATABASE_URL behavior (optional for local runs, required for external Postgres) and the distinction between bundled and external database configurations.
Server infrastructure and implementation comments
packages/server/scripts/build-server-bundle.mjs, packages/server/src/__tests__/setup/embedded-postgres-backend.ts, packages/server/src/__tests__/setup/test-db.ts, packages/server/src/auth/index.tsx, packages/server/src/gateway/__tests__/turn-liveness.test.ts, packages/server/src/gateway/orchestration/turn-liveness.ts, packages/server/vitest.config.ts
Comments updated in server build scripts, test setup utilities, authentication hooks, and gateway components to reflect embedded Postgres terminology. PGlite-specific implementation notes (pool-max deadlock workaround, parameterized-RETURNING quirk) are removed or clarified.
Dependency updates
packages/owletto
Owletto subproject commit pointer updated to new version.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • lobu-ai/lobu#983: Both PRs update the packages/owletto subproject pointer to a new commit hash.
  • lobu-ai/lobu#971: Both PRs modify the turn-liveness implementation in packages/server/src/gateway/orchestration/turn-liveness.ts—this PR updates SQL query comments while the related PR rewires the turn-liveness election and sweep machinery.

Poem

🐰 From PGlite to Postgres we now dance,
With PG18 in our toolkit's expanse,
Comments refreshed, the path now clear,
Embedded databases we hold dear,
Documentation shines from every sphere!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: removing stale PGlite references and outdated workaround comments across the codebase post-migration to embedded Postgres.
Description check ✅ Passed The description is comprehensive and follows the template structure, including a detailed Summary section, a completed Test plan with specific validations, and relevant Notes with context about the paired PR and submodule update.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pglite-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@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.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/landing/src/content/docs/guides/troubleshooting.md`:
- Line 6: The landing copy contains em dashes that must be removed in
user-facing text; update the sentences in the described markdown (the line
containing "so `DATABASE_URL` is optional — set it only when you want an
external Postgres..." and the other affected line at 143) by replacing the em
dash (—) with appropriate punctuation (e.g., a comma, period, or parentheses) so
the text reads naturally without em dashes; edit the markdown lines in
packages/landing/src/content/docs/guides/troubleshooting.md accordingly (locate
the sentence with "start-local.bundle.mjs" / "server.bundle.mjs" and the
sentence at line 143) and ensure grammar/spacing remains correct after the
replacement.

In `@packages/owletto`:
- Line 1: The submodule commit for packages/owletto is pointing to a SHA that is
not reachable from owletto/main and fails the Submodule Drift CI; re-pin the
submodule to a commit that exists on owletto/main (or merge/cherry-pick the
desired change into owletto/main), then update the gitlink for packages/owletto
to that reachable SHA: check out the owletto subrepo, identify a valid commit on
owletto/main (e.g., via git fetch && git log origin/main), update the submodule
reference in the parent repo (using git submodule update --init && git submodule
set-branch --branch main packages/owletto and git add packages/owletto followed
by git commit) or set the gitlink to the new SHA, and push the parent repo so CI
sees the corrected submodule SHA.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 407296cc-7745-4578-804d-44338f90aa04

📥 Commits

Reviewing files that changed from the base of the PR and between 449f93e and aaf0f7f.

📒 Files selected for processing (15)
  • packages/cli/scripts/build.cjs
  • packages/cli/src/__tests__/dev.test.ts
  • packages/landing/src/content/docs/getting-started/comparison.md
  • packages/landing/src/content/docs/getting-started/index.mdx
  • packages/landing/src/content/docs/guides/architecture.mdx
  • packages/landing/src/content/docs/guides/troubleshooting.md
  • packages/landing/src/content/docs/reference/cli.md
  • packages/owletto
  • packages/server/scripts/build-server-bundle.mjs
  • packages/server/src/__tests__/setup/embedded-postgres-backend.ts
  • packages/server/src/__tests__/setup/test-db.ts
  • packages/server/src/auth/index.tsx
  • packages/server/src/gateway/__tests__/turn-liveness.test.ts
  • packages/server/src/gateway/orchestration/turn-liveness.ts
  • packages/server/vitest.config.ts

---

Lobu boots as a single Node process: `lobu run`. A scaffolded project defaults to an **in-process PGlite** database (entry `start-local.bundle.mjs`), so `DATABASE_URL` is optional — set it only when you want an external Postgres (with pgvector), in which case the entry is `server.bundle.mjs`. The monorepo `make dev` always requires `DATABASE_URL`. Worker subprocesses are spawned by the gateway's `EmbeddedDeploymentManager`. There is no Redis.
Lobu boots as a single Node process: `lobu run`. A scaffolded project defaults to an **embedded Postgres** (PG18 + pgvector, entry `start-local.bundle.mjs`), so `DATABASE_URL` is optional — set it only when you want an external Postgres, in which case the entry is `server.bundle.mjs`. The monorepo `make dev` always requires `DATABASE_URL`. Worker subprocesses are spawned by the gateway's `EmbeddedDeploymentManager`. There is no Redis.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace em dashes in landing copy on these updated lines.

Please replace with alternative punctuation (e.g., comma/period/parentheses) in the changed user-facing text at Line 6 and Line 143.

As per coding guidelines, "Remove em dashes from user-facing text in landing copy".

Also applies to: 143-143

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/landing/src/content/docs/guides/troubleshooting.md` at line 6, The
landing copy contains em dashes that must be removed in user-facing text; update
the sentences in the described markdown (the line containing "so `DATABASE_URL`
is optional — set it only when you want an external Postgres..." and the other
affected line at 143) by replacing the em dash (—) with appropriate punctuation
(e.g., a comma, period, or parentheses) so the text reads naturally without em
dashes; edit the markdown lines in
packages/landing/src/content/docs/guides/troubleshooting.md accordingly (locate
the sentence with "start-local.bundle.mjs" / "server.bundle.mjs" and the
sentence at line 143) and ensure grammar/spacing remains correct after the
replacement.

Comment thread packages/owletto Outdated
Post-#965 (embedded-postgres replacing PGlite), several comment blocks
still referenced PGlite-era constraints that no longer apply. Cleans
up landing docs, code comments, test docstrings, and removes the
historical justifications for the auth/index.tsx ctx.internalAdapter
deadlock-avoidance pattern and the turn-liveness.ts literal-queue-name
workaround. The code itself is unchanged; only stale narrative is gone.
@buremba buremba force-pushed the feat/pglite-cleanup branch from aaf0f7f to 3865ad7 Compare May 28, 2026 23:45
@buremba buremba merged commit a8835c4 into main May 28, 2026
21 checks passed
@buremba buremba deleted the feat/pglite-cleanup branch May 28, 2026 23:50
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