chore: session followups — CI greens, AGENTS.md auth scope, lobu run shared-DB guard#745
Conversation
…shared-DB guard Cleans up four loose ends surfaced while debugging the food-ordering agent: 1. **format-lint green again** — `packages/landing/src/components/ FeatureGraphics.tsx:357` had a trailing blank line that biome rejected. Stripped via `bunx biome format --write`. The CI `format-lint` job has been red on `main` since this slipped in; this unblocks every PR's CI. 2. **integration green again** — `packages/server/src/utils/__tests__/ mcp-install-targets.test.ts:28` expected the legacy 7-element list of first-class MCP install targets, but the source list now has 9 (`skills` and `lobu-cli` were added without updating the test). Updated the expected array. CI `integration` job goes from red to green on `main`. 3. **AGENTS.md auth-scope clarification** — adds a paragraph to the "Browser-driven verification" section calling out that the forged session cookie authenticates only the web admin REST mounted at `/` (what `lobu apply` and the SPA hit), NOT the public Agent API at `/lobu` (which expects a JWT bearer from `lobu login` or a PAT). The missing distinction caused an hour of debugging in the previous session — anyone hitting `/lobu/api/v1/agents` with a cookie now gets pointed at the right auth path. 4. **`lobu run` refuses non-loopback DATABASE_URL inherited from shell** — `packages/cli/src/commands/dev.ts` checks at startup: if `DATABASE_URL` is set in `process.env` but NOT in the project's `.env`, AND its host isn't `localhost` / `127.0.0.1` / `::1`, refuse to start. The error spells out three remediations (pin in .env, unset, or pass the new `--unsafe-shared-db` escape hatch). Closes the silent footgun where a developer's parent shell carries a tailnet/prod URL into a freshly-cloned project's `lobu run`, leading to local-dev runs racing prod workers and writing into shared data. Tested: - `bun test packages/cli/src/__tests__/dev.test.ts` — 6 pass (1 new for isSharedDatabaseUrl loopback/tailnet/prod/IPv6/garbage cases) - `bunx vitest run mcp-install-targets.test.ts` — 3 pass - `bun run typecheck` clean - `bun run format:check` clean - `make build-packages` clean Out of scope: PR #734's Phase B/C of the agents per-org PK refactor (~67 storage call sites + composite FK swap). That's a multi-day project that deserves its own branch and review pass.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Cleans up four loose ends surfaced while debugging the food-ordering agent end-to-end (PRs #734, #735, #740). Each piece is independent; bundled because they're all small and tightly related to the auth/run footguns we hit.
What
format-lint green again —
packages/landing/src/components/FeatureGraphics.tsx:357had a trailing blank line that biome rejected. The CI `format-lint` job has been red onmainsince this slipped in; this unblocks every PR's CI.integration green again —
packages/server/src/utils/__tests__/mcp-install-targets.test.ts:28expected the legacy 7-element list of first-class MCP install targets, but the source list now has 9 (`skills` and `lobu-cli` added without updating the test). CI `integration` job goes from red to green onmain.AGENTS.md auth-scope clarification — the "Browser-driven verification" section's forged-session-cookie recipe authenticates only the web admin REST mounted at
/, NOT the public Agent API at/lobu. The missing distinction caused an hour of debugging in the previous session.`lobu run` refuses non-loopback `DATABASE_URL` inherited from shell — if `DATABASE_URL` is set in `process.env` but NOT in the project's `.env`, AND its host isn't loopback, refuse to start. The error spells out three remediations (pin in .env, unset, or pass the new `--unsafe-shared-db` escape hatch). Closes the footgun where a parent shell carries a tailnet/prod URL into a freshly-cloned project's `lobu run`, racing prod workers and mutating shared data.
Out of scope
PR #734's Phase B/C of the agents per-org PK refactor (~67 storage call sites + composite FK swap). Multi-day; separate branch and review pass.
Test plan