refactor: rename submodule mount packages/web to packages/owletto (#789)#817
Conversation
Renames the Owletto submodule mount path to match the upstream repo name (lobu-ai/owletto) and the now-renamed package name (`@lobu/owletto`). ## Changes - `.gitmodules`: `[submodule "packages/web"]` → `[submodule "packages/owletto"]`, path bumped to `packages/owletto`. - `git mv packages/web packages/owletto` — submodule gitlink moved. - Submodule pointer bumped to lobu-ai/owletto@79929a9 (PR-A's branch tip with `package.json:name` renamed to `@lobu/owletto`). - Workflows (`ci.yml`, `pr-validation.yml`, `mac-release.yml`, `submodule-drift.yml`) and `actions/setup-submodule` updated to the new path; `OWLETTO_WEB_DEPLOY_KEY` secret name kept (per #789). - Server fallback paths (`packages/server/src/{index,dev-vite,utils}`) point at `packages/owletto/...`; sibling `../web/...` fallbacks for out-of-monorepo deployments left intact. - Dockerfiles, Makefile, tsconfig, knip, biome, triage configs, tests, doc plans, CSS/astro/SQL/script comments — all path refs swept. - `bun.lock` regenerated with the renamed workspace entry. ## Coordinated with - PR-A: lobu-ai/owletto#147 — must merge first. This PR pins the submodule at PR-A's branch tip (reachable); after PR-A merges to owletto/main, this PR can be re-pointed at the merge commit or left on the branch SHA (also reachable indefinitely). ## Validation - `bun run typecheck` passes. - `make build-packages` passes (server bundle + cli + workspace dists). - `make typecheck` (strict, mirrors Dockerfile) passes for both `packages/server` and `packages/owletto`.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (35)
📝 WalkthroughWalkthroughThis pull request systematically renames the submodule mount point from ChangesSubmodule rename and path updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 🔧 Trivy (0.69.3)Trivy execution failed: 2026-05-17T05:31:27Z FATAL Fatal error run error: fs scan error: scan error: scan failed: failed analysis: post analysis error: post analysis error: ansible scan error: scan config error: find projects: walk dir: range error: stat .coderabbit-opengrep-fallback.yml: no such file or directory Comment |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Submodule path moved from packages/web to packages/owletto in #817. Updated the pointer to 8ede17c (lobu-ai/owletto#149 merged into main), which preserves the account-profile rebind UI from this PR.
The packages/web → packages/owletto rename in #817 updated APP_ROOT-relative candidates but missed two: - The `../web/{dist,index.html}` sibling-deploy candidate was kept verbatim ("for out-of-monorepo deployments"), but after the rename the sibling dir is `../owletto/`, not `../web/`. The stale path silently misses on every lookup. - The `path.resolve(process.cwd(), '../packages/owletto/...')` candidate has always resolved to `packages/packages/owletto/...` (double `packages`) when cwd is `packages/server` — i.e. exactly the layout the integration job runs under. Rewriting as `../owletto/...` lands in the right sibling. Symptoms: every `public-pages-contract.test.ts` (and `mcp/auth.test.ts` indirectly) failure on `main` since 7a72456 — `buildPublicPageModel` returned a real model but `loadAnySpaHtmlTemplate()` returned null, so the catch-all fell through to the JSON discovery response with `Cache-Control: no-store`. Reproduces against PGlite locally; fixed and verified all 3 public-pages tests pass. Same broken pattern repaired in `utils/public-origin.ts:hasLocalFrontend` (8 candidates, 4 corrected).
…#828) * feat(connectors): browser.evaluate / fill_form / page_text + subdir layout Adds three Chrome-extension connectors (browser.evaluate, browser.fill_form, browser.page_text) whose executors live in the Owletto for Chrome extension. Definitions sit under `packages/connectors/src/browser/` so primitive groupings are structurally distinct from third-party service connectors. - packages/connectors/src/browser/{evaluate,fill_form,page_text}.ts (new) - packages/connectors/src/index.ts: re-export browser/* - packages/connector-worker/src/compile-connector.ts: resolve dotted keys via subdir (`browser/evaluate.ts`) in addition to the existing underscore-flat convention (`chrome_tabs.ts`). - packages/server/src/utils/connector-catalog.ts: scan one level deep so browser/* is discovered; preserve relative `source_path` so resolvers don't collide on basename. Submodule (packages/owletto) is left at main's pin (aeb3324) — the browser.evaluate executor already shipped via #825/#159, so no bump is needed by this PR. * chore(format): biome format pre-existing diff.test.ts drift Pre-existing format drift introduced in #829 was failing main's format-lint CI for several commits. Bundling the auto-fix here so PR #828's format-lint check turns green on top of an already-red main. * fix(connectors): subdir-aware resolvers + userManaged on browser primitives Pi review found four follow-ups to the browser/* subdir layout introduced in the previous commit: - packages/server/src/utils/connector-catalog.ts: server-side findBundledConnectorFile() was still flat-only — auto-install / device-reconcile / worker-poll would treat browser.evaluate as "no bundled source." Now mirrors the worker-side resolver (subdir first, underscore-flat fallback). Adds bundledConnectorSourcePath(filePath) so subdir paths round-trip through connectorSourcePathToUri. - packages/server/src/utils/ensure-connector-installed.ts + packages/server/src/worker-api/device-reconcile.ts: stop persisting basename(filePath) as source_path — collides on basename across subdirs and breaks source_uri resolution for subdir connectors. - packages/cli/src/commands/_lib/connector-loader.ts: CLI resolver was also flat-only. - packages/connectors/src/browser/{evaluate,fill_form,page_text}.ts: mark feeds userManaged so device-reconcile doesn't auto-wire them with config=NULL. These are bridge-composing primitives (script / url + fields / url are required, gateway-author-supplied), not end-user feeds. * fix(mcp,device-reconcile,owletto): inherited main failures + pi follow-up - packages/server/src/workspace/multi-tenant.ts: when a Bearer header is present but PAT verify, OAuth verify, AND session-cookie lookup all fail, return RFC 6750 `invalid_token` 401 (with WWW-Authenticate error=invalid_token) instead of falling through to anonymous and returning generic `unauthorized` later. Fixes mcp/auth.test.ts "should reject expired/invalid OAuth access token" — they assert the standards-compliant error code so MCP clients (Claude Desktop etc.) surface "bad token" rather than mistaking it for "no auth needed." - packages/server/src/worker-api/device-reconcile.ts: short-circuit ensureDeviceConnectorWired() when declaredFeedKeys is empty (every feed userManaged → nothing to auto-wire). Avoids a compile + upsert + no-auth-connection adopt per Chrome poll for browser.* primitives. Definition + version row still get installed lazily by ensureConnectorInstalled when a composing connector runs them. (Second-round pi review finding.) - packages/owletto: bump pointer to 2552ed0 — fix(build): vite target=esnext for top-level await in main.tsx (lobu-ai/owletto#161, merged). Unblocks PR Validation / build-test which had been failing on packages/owletto's vite build since the auth-pivot landed. * fix(server): repair sibling-walk SPA template/dist paths post-rename The packages/web → packages/owletto rename in #817 updated APP_ROOT-relative candidates but missed two: - The `../web/{dist,index.html}` sibling-deploy candidate was kept verbatim ("for out-of-monorepo deployments"), but after the rename the sibling dir is `../owletto/`, not `../web/`. The stale path silently misses on every lookup. - The `path.resolve(process.cwd(), '../packages/owletto/...')` candidate has always resolved to `packages/packages/owletto/...` (double `packages`) when cwd is `packages/server` — i.e. exactly the layout the integration job runs under. Rewriting as `../owletto/...` lands in the right sibling. Symptoms: every `public-pages-contract.test.ts` (and `mcp/auth.test.ts` indirectly) failure on `main` since 7a72456 — `buildPublicPageModel` returned a real model but `loadAnySpaHtmlTemplate()` returned null, so the catch-all fell through to the JSON discovery response with `Cache-Control: no-store`. Reproduces against PGlite locally; fixed and verified all 3 public-pages tests pass. Same broken pattern repaired in `utils/public-origin.ts:hasLocalFrontend` (8 candidates, 4 corrected). * fix(device-reconcile,catalog): pi review pass-3 follow-ups Third pi review flagged two issues with the prior round: - worker-api/device-reconcile.ts: the earlier early-return-when-empty short-circuited too aggressively. `local.directory` and other device connectors whose only feed is `userManaged` rely on ensureDeviceConnectorWired to install the connector_definition + version + connection — `/api/workers/me/feeds` 404s on "no connection wired" otherwise. Move the short-circuit into the fast-path check instead: when the connection + version already exist AND there's nothing to verify (declaredFeedKeys empty), fast-path returns without compiling. First poll still does the full install; subsequent polls are zero work. - utils/connector-catalog.ts: the one-level subdir scan was descending into `connectors/src/__tests__/` and trying to extract catalog metadata from test files that import `bun:test`, producing esbuild warnings on every cold scan. Skip `__tests__` and any leading-underscore dir.
Summary
Renames the Owletto submodule mount path
packages/web→packages/owlettoto match the upstream repo name (lobu-ai/owletto) and the now-renamed package name@lobu/owletto.Closes #789.
Coordinated with
PR-A (must merge first): https://github.com/lobu-ai/owletto/pull/147 — renames
package.json:namefrom@lobu/webto@lobu/owletto.This PR pins the submodule at PR-A's branch tip (
lobu-ai/owletto@79929a9), which is reachable on the remote. After PR-A merges toowletto/main, this PR can be re-pointed at the merge commit (or left on the branch SHA — also reachable indefinitely).Changes
.gitmodules: section[submodule "packages/web"]renamed to[submodule "packages/owletto"], path bumped.git mv packages/web packages/owletto— submodule gitlink moved (160000 mode).ci.yml,pr-validation.yml,mac-release.yml,submodule-drift.yml, andactions/setup-submodule/action.ymlupdated.OWLETTO_WEB_DEPLOY_KEYsecret name kept as-is per issue.packages/server/src/{index,dev-vite,utils/public-origin}.tspoint atpackages/owletto/.... Sibling../web/...fallbacks for out-of-monorepo deployments left intact.Makefile,tsconfig.json,config/knip.ts,config/biome.config.json,.github/triage-config.yml,.claude/commands/triage-pr.mdall swept.packages/server/src/__tests__/...,packages/cli/src/commands/dev.ts, theme/CSS/astro/SQL comments, anddocs/plans/*.mdreferences all updated.bun.lockregenerated — workspace entry now@lobu/owletto@workspace:packages/owletto.Validation
bun run typecheckpasses.make build-packagespasses (server bundle + cli + workspace dists).make typecheck(strict, mirrors Dockerfile) passes for bothpackages/serverandpackages/owletto.Test plan
mac-build-smokejob runs (submodule pointer changed) and Xcode build ofpackages/owletto/apps/mac/Lobu.xcodeprojsucceedssubmodule-driftjob recognises the new pathgit submodule update --init packages/owletto→bun install→make build-packagesSummary by CodeRabbit