Skip to content

refactor: rename submodule mount packages/web to packages/owletto (#789)#817

Merged
buremba merged 2 commits into
mainfrom
refactor/rename-packages-web-to-owletto
May 17, 2026
Merged

refactor: rename submodule mount packages/web to packages/owletto (#789)#817
buremba merged 2 commits into
mainfrom
refactor/rename-packages-web-to-owletto

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 17, 2026

Summary

Renames the Owletto submodule mount path packages/webpackages/owletto to 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:name from @lobu/web to @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 to owletto/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).
  • Submodule pointer bumped to lobu-ai/owletto@79929a9 (PR-A branch tip).
  • Workflows: ci.yml, pr-validation.yml, mac-release.yml, submodule-drift.yml, and actions/setup-submodule/action.yml updated. OWLETTO_WEB_DEPLOY_KEY secret name kept as-is per issue.
  • Server runtime paths: packages/server/src/{index,dev-vite,utils/public-origin}.ts point at packages/owletto/.... Sibling ../web/... fallbacks for out-of-monorepo deployments left intact.
  • Build/config: Dockerfiles, Makefile, tsconfig.json, config/knip.ts, config/biome.config.json, .github/triage-config.yml, .claude/commands/triage-pr.md all swept.
  • Tests + comments: Path references in packages/server/src/__tests__/..., packages/cli/src/commands/dev.ts, theme/CSS/astro/SQL comments, and docs/plans/*.md references all updated.
  • bun.lock regenerated — workspace entry now @lobu/owletto@workspace:packages/owletto.

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.

Test plan

  • CI green on this PR after PR-A merges (or against the PR-A branch SHA pin)
  • mac-build-smoke job runs (submodule pointer changed) and Xcode build of packages/owletto/apps/mac/Lobu.xcodeproj succeeds
  • submodule-drift job recognises the new path
  • Dev clone instructions still work: fresh clone → git submodule update --init packages/owlettobun installmake build-packages

Summary by CodeRabbit

  • Chores
    • Updated codebase organization and build infrastructure to reference a reorganized submodule structure.
    • Updated CI/CD workflows, build configurations, and tooling to support new code layout.
    • Refreshed internal documentation and development guides to reflect structural changes.

Review Change Stack

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`.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0eb6bc2a-417a-4495-b2c2-4768f428b3f1

📥 Commits

Reviewing files that changed from the base of the PR and between 2ffccfb and 9bf2f9c.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (35)
  • .claude/commands/triage-pr.md
  • .github/actions/setup-submodule/action.yml
  • .github/triage-config.yml
  • .github/workflows/ci.yml
  • .github/workflows/mac-release.yml
  • .github/workflows/pr-validation.yml
  • .github/workflows/submodule-drift.yml
  • .gitmodules
  • AGENTS.md
  • Makefile
  • config/biome.config.json
  • config/knip.ts
  • db/migrations/20260516200100_events_lifecycle_changes_index.sql
  • docker/app/Dockerfile
  • docker/embeddings-service/Dockerfile
  • docker/worker/Dockerfile
  • docs/plans/mcp-multi-org-and-execute.md
  • docs/plans/personal-mode-auth.md
  • docs/plans/world-model.md
  • packages/cli/src/commands/dev.ts
  • packages/landing/src/pages/reference/api-reference.astro
  • packages/landing/src/styles/starlight-theme.css
  • packages/landing/src/styles/theme-tokens.ts
  • packages/owletto
  • packages/server/src/__tests__/integration/pages/public-pages-contract.test.ts
  • packages/server/src/__tests__/unit/subdomain-reserved-parity.test.ts
  • packages/server/src/auth/oauth/routes.ts
  • packages/server/src/dev-vite.ts
  • packages/server/src/index.ts
  • packages/server/src/utils/__tests__/mcp-install-targets.test.ts
  • packages/server/src/utils/entity-management.ts
  • packages/server/src/utils/public-origin.ts
  • packages/web
  • scripts/check-security-patterns.sh
  • tsconfig.json

📝 Walkthrough

Walkthrough

This pull request systematically renames the submodule mount point from packages/web to packages/owletto across the monorepo. Changes span configuration files, GitHub Actions workflows, server runtime code, build tooling, tests, and documentation to reflect that the mounted submodule now contains not just the web SPA but also Mac and Chrome app code.

Changes

Submodule rename and path updates

Layer / File(s) Summary
Submodule configuration and initialization
.gitmodules, .github/actions/setup-submodule/action.yml, packages/owletto
.gitmodules declares the submodule mount as packages/owletto; the setup action now initializes and stubs the owletto submodule; the owletto commit pointer is updated to 673636eaa9740402f423ffb30c6ad7daea6aedb5.
Triage policies and process configuration
.claude/commands/triage-pr.md, .github/triage-config.yml
Triage policies updated to flag PRs modifying packages/owletto/ as needs-human, replacing the prior packages/web/ escalation path.
GitHub Actions workflows and CI/CD paths
.github/workflows/ci.yml, .github/workflows/mac-release.yml, .github/workflows/pr-validation.yml, .github/workflows/submodule-drift.yml
All workflow YAMLs updated to reference packages/owletto for path-based triggers, artifact validation, build step execution, and remediation commands in frontend tests, Mac release/smoke build, PR validation, and drift-check pipelines.
Server-side path resolution and frontend discovery
packages/server/src/dev-vite.ts, packages/server/src/index.ts, packages/server/src/utils/public-origin.ts
Server now resolves SPA at runtime from packages/owletto/dist and packages/owletto/index.html for both production and development, including fallback template loading and local-frontend detection logic.
Build system, Docker, and local development tools
Makefile, docker/app/Dockerfile, docker/embeddings-service/Dockerfile, docker/worker/Dockerfile, tsconfig.json, config/biome.config.json, config/knip.ts
Makefile typecheck and ensure-submodule targets, Docker build stages, TypeScript, and linter configurations now reference packages/owletto for workspace inclusion, build dependencies, and exclusion patterns.
Tests with submodule-availability conditionals
packages/server/src/__tests__/integration/pages/public-pages-contract.test.ts, packages/server/src/__tests__/unit/subdomain-reserved-parity.test.ts, packages/server/src/utils/__tests__/mcp-install-targets.test.ts
Integration and unit tests now gate on packages/owletto/src presence, dynamically skipping or loading test fixtures based on submodule initialization state.
Documentation, comments, and policy references
AGENTS.md, packages/cli/src/commands/dev.ts, packages/server/src/auth/oauth/routes.ts, packages/server/src/utils/entity-management.ts, packages/landing/src/pages/reference/api-reference.astro, packages/landing/src/styles/*.css, docs/plans/*, scripts/check-security-patterns.sh, db/migrations/*
Plan documentation, design guidelines, development guides, and inline comments throughout the codebase updated to reference packages/owletto as the location of UI components, endpoints, and frontend implementation details.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Possibly related PRs

  • lobu-ai/lobu#806: Updates the mac-build-smoke job in .github/workflows/ci.yml to reference packages/owletto/... paths for the Mac build condition and Xcode project, directly building on the renamed submodule layout.
  • lobu-ai/lobu#807: Modifies .github/workflows/mac-release.yml release-contract validation to reference packages/owletto Xcode project, Info.plist, and bundle identifier paths, complementing the same file's updates in this PR.

Suggested labels

skip-size-check

Poem

🐰 The web was never just web, you see,
Now owletto's name lets the whole tree be,
Mac, Chrome, and SPA all find their way,
Through paths that say "packages" clear as day! 🦉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/rename-packages-web-to-owletto

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.

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

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/commands/dev.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@buremba buremba merged commit 61bcd1d into main May 17, 2026
16 of 18 checks passed
@buremba buremba deleted the refactor/rename-packages-web-to-owletto branch May 17, 2026 05:29
buremba added a commit that referenced this pull request May 17, 2026
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.
buremba added a commit that referenced this pull request May 18, 2026
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).
buremba added a commit that referenced this pull request May 18, 2026
…#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.
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.

Rename submodule mount packages/webpackages/owletto

2 participants