Route local official plugin bundles in workspace E2E #358

Closed
opened 2026-06-07 22:27:05 +00:00 by steve · 0 comments
Owner

The workspace Playwright helpers route local official-registry metadata from
https://local.lapis.test/v1/**, but the generated local registry fixture now
publishes plugin bundles at ../releases/<plugin>-<version>.lapis-plugin.
During install, the plugin-distribution manager resolves that relative bundle
URL against the routed detail document, which produces
https://local.lapis.test/releases/.... The browser test runtime does not have
that origin routed, so the installer's fetch fails during the daily-use journey.

Problem

  • packages/workspace/e2e/daily-use-journey.spec.ts fails while installing the
    notebook plugin from the local official registry fixture.
  • The local fixture metadata fetch succeeds, but the bundle fetch escapes the
    helper's current .../v1/** route and hits an unrouted .../releases/**
    request.
  • That breaks the release-critical daily-use journey for the browser workspace
    host.

Goal

Route local official plugin bundle requests in workspace E2E so official plugin
installs can fetch the generated .lapis-plugin archive from the local fixture
origin instead of failing with browser fetch() errors.

Scope

  • Update the workspace E2E local official-plugin routing helper to serve the
    generated local bundle path used by the fixture.
  • Keep existing local registry metadata routing intact.
  • Validate the fix against the daily-use E2E slice and any directly affected
    official-plugin install coverage.

Non-goals

  • Do not change production registry sources, signing keys, or install-time
    verification rules.
  • Do not broaden the fix into unrelated plugin boot or notebook behavior unless
    validation proves another local dependency in the same path is broken.

Acceptance Criteria

  • The daily-use journey can install lapis-notebook from the local official
    plugin fixture without Failed to fetch from the bundle download step.
  • Workspace E2E helpers serve both local registry metadata and local release
    bundle requests needed by the generated fixture.
  • Existing local official-plugin install tests keep using the same local fixture
    contract.

Implementation Notes

  • The current bundle URL in the local fixture is ../releases/<bundle>, which
    resolves outside /v1/.
  • Prefer a helper-only change if that restores the fetch path cleanly.

Suggested Files or Specs To Inspect

  • packages/workspace/e2e/official-plugin-install.helpers.ts
  • packages/workspace/e2e/local-official-plugin.helpers.ts
  • packages/workspace/scripts/run-daily-use-e2e.mjs
  • scripts/build-local-official-plugin-registry.mjs
  • packages/api/src/lib/plugin-distribution/installer.ts

Validation Commands

  • pnpm --filter @lapis-notes/workspace test:e2e:daily-use
  • pnpm --filter @lapis-notes/workspace test:e2e:official-plugins

Follow-up Tasks

Implementation Summary

Route local official plugin bundle requests in workspace E2E from the fixture base directory so local registry installs can fetch ../releases/*.lapis-plugin assets again. Validated with workspace daily-use E2E, the repo official-plugin wrapper, workspace check:all, and workspace test.

The workspace Playwright helpers route local official-registry metadata from `https://local.lapis.test/v1/**`, but the generated local registry fixture now publishes plugin bundles at `../releases/<plugin>-<version>.lapis-plugin`. During install, the plugin-distribution manager resolves that relative bundle URL against the routed detail document, which produces `https://local.lapis.test/releases/...`. The browser test runtime does not have that origin routed, so the installer's fetch fails during the daily-use journey. ## Problem - `packages/workspace/e2e/daily-use-journey.spec.ts` fails while installing the notebook plugin from the local official registry fixture. - The local fixture metadata fetch succeeds, but the bundle fetch escapes the helper's current `.../v1/**` route and hits an unrouted `.../releases/**` request. - That breaks the release-critical daily-use journey for the browser workspace host. ## Goal Route local official plugin bundle requests in workspace E2E so official plugin installs can fetch the generated `.lapis-plugin` archive from the local fixture origin instead of failing with browser `fetch()` errors. ## Scope - Update the workspace E2E local official-plugin routing helper to serve the generated local bundle path used by the fixture. - Keep existing local registry metadata routing intact. - Validate the fix against the daily-use E2E slice and any directly affected official-plugin install coverage. ## Non-goals - Do not change production registry sources, signing keys, or install-time verification rules. - Do not broaden the fix into unrelated plugin boot or notebook behavior unless validation proves another local dependency in the same path is broken. ## Acceptance Criteria - The daily-use journey can install `lapis-notebook` from the local official plugin fixture without `Failed to fetch` from the bundle download step. - Workspace E2E helpers serve both local registry metadata and local release bundle requests needed by the generated fixture. - Existing local official-plugin install tests keep using the same local fixture contract. ## Implementation Notes - The current bundle URL in the local fixture is `../releases/<bundle>`, which resolves outside `/v1/`. - Prefer a helper-only change if that restores the fetch path cleanly. ## Suggested Files or Specs To Inspect - `packages/workspace/e2e/official-plugin-install.helpers.ts` - `packages/workspace/e2e/local-official-plugin.helpers.ts` - `packages/workspace/scripts/run-daily-use-e2e.mjs` - `scripts/build-local-official-plugin-registry.mjs` - `packages/api/src/lib/plugin-distribution/installer.ts` ## Validation Commands - `pnpm --filter @lapis-notes/workspace test:e2e:daily-use` - `pnpm --filter @lapis-notes/workspace test:e2e:official-plugins` ## Related Issues - Follow-up to #357 — [Fix official plugin install e2e regressions in workspace](../closed/357-fix-official-plugin-install-e2e-regressions-in-workspace.md) ## Follow-up Tasks ## Implementation Summary Route local official plugin bundle requests in workspace E2E from the fixture base directory so local registry installs can fetch ../releases/*.lapis-plugin assets again. Validated with workspace daily-use E2E, the repo official-plugin wrapper, workspace check:all, and workspace test. <!-- backlog:task_id=TASK-PLUGIN-REGISTRY-INSTALL-E2E-LOCAL-BUNDLE-ROUTE source_spec=spec/src/30-cross-package-contracts/plugin-registry.md related_issue=357 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#358
No description provided.