Fix official plugin install e2e regressions in workspace #357

Closed
opened 2026-06-07 21:58:04 +00:00 by steve · 0 comments
Owner

Recent workspace end-to-end coverage regressed in the official plugin install
path. The daily-use journey now fails while installing the notebook plugin from
the official registry with a browser fetch() failure, and the local official
plugin verification suite can reach the app before pluginDistribution is
available.

Problem

  • packages/workspace/e2e/daily-use-journey.spec.ts fails when
    installOfficialPlugin() refreshes the catalog and installs an official
    plugin from the routed registry fixture.
  • packages/workspace/e2e/local-official-plugin-install.spec.ts fails because
    the helper evaluates the page before app.pluginDistribution has been
    constructed, so the suite cannot verify any local official plugin installs.
  • These regressions break the release-critical daily-use journey and the
    registry install verification added in #353.

Goal

Restore stable official plugin install coverage in workspace E2E so both the
daily-use journey and the local official plugin matrix pass against the current
registry/bundle contract.

Scope

  • Diagnose the current workspace/plugin-distribution boot and fetch path used by
    Playwright official-plugin helpers.
  • Fix the browser-fixture registry routing and/or app boot timing regression so
    official installs work again in daily-use and local official-plugin E2E.
  • Update tests or helper synchronization only as needed to match the intended
    runtime contract.

Non-goals

  • Changing production registry trust keys or official source policy.
  • Broadening plugin registry feature scope beyond this regression fix.
  • Reworking unrelated plugin runtime diagnostics or release publishing flow
    unless directly required to restore these failing tests.

Acceptance Criteria

  • pnpm --filter @lapis-notes/workspace test:e2e:daily-use passes again.
  • pnpm --filter @lapis-notes/workspace test:e2e:official-plugins passes
    again.
  • Official plugin install helpers do not race app boot before
    pluginDistribution exists.
  • Routed/local registry fixture installs use a fetch path that works in the
    browser-hosted workspace test runtime.

Implementation Notes

  • Start by tracing how mountWorkspaceApp() injects
    pluginDistributionOptions into App and when the E2E helpers attach init
    scripts and route handlers.
  • Compare the routed fixture flow used by the daily-use helper with the local
    fixture flow used by prepareLocalOfficialPluginPage().
  • Prefer the smallest fix that restores the documented plugin-registry contract
    and existing E2E coverage.

Suggested Files or Specs To Inspect

  • packages/workspace/e2e/official-plugin-install.helpers.ts
  • packages/workspace/e2e/local-official-plugin.helpers.ts
  • packages/workspace/src/main.ts
  • packages/workspace/src/lib/components/app/bootstrap.ts
  • packages/api/src/lib/context.svelte.ts
  • packages/api/src/lib/plugin-distribution/installer.ts
  • packages/api/src/lib/plugin-distribution/manager.ts
  • spec/src/30-cross-package-contracts/plugin-registry.md
  • spec/src/20-packages/workspace/index.md

Validation Commands

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

Follow-up Tasks

Implementation Summary

Hardened workspace official-plugin E2E helpers by waiting for pluginDistribution before local installs, retrying transient page-context failures, and requiring the daily-use journey to fail fast when its local official registry fixture is missing. Validated with workspace check:all, workspace test, workspace daily-use E2E, and the full official-plugin E2E wrapper.

Recent workspace end-to-end coverage regressed in the official plugin install path. The daily-use journey now fails while installing the notebook plugin from the official registry with a browser `fetch()` failure, and the local official plugin verification suite can reach the app before `pluginDistribution` is available. ## Problem - `packages/workspace/e2e/daily-use-journey.spec.ts` fails when `installOfficialPlugin()` refreshes the catalog and installs an official plugin from the routed registry fixture. - `packages/workspace/e2e/local-official-plugin-install.spec.ts` fails because the helper evaluates the page before `app.pluginDistribution` has been constructed, so the suite cannot verify any local official plugin installs. - These regressions break the release-critical daily-use journey and the registry install verification added in #353. ## Goal Restore stable official plugin install coverage in workspace E2E so both the daily-use journey and the local official plugin matrix pass against the current registry/bundle contract. ## Scope - Diagnose the current workspace/plugin-distribution boot and fetch path used by Playwright official-plugin helpers. - Fix the browser-fixture registry routing and/or app boot timing regression so official installs work again in daily-use and local official-plugin E2E. - Update tests or helper synchronization only as needed to match the intended runtime contract. ## Non-goals - Changing production registry trust keys or official source policy. - Broadening plugin registry feature scope beyond this regression fix. - Reworking unrelated plugin runtime diagnostics or release publishing flow unless directly required to restore these failing tests. ## Acceptance Criteria - `pnpm --filter @lapis-notes/workspace test:e2e:daily-use` passes again. - `pnpm --filter @lapis-notes/workspace test:e2e:official-plugins` passes again. - Official plugin install helpers do not race app boot before `pluginDistribution` exists. - Routed/local registry fixture installs use a fetch path that works in the browser-hosted workspace test runtime. ## Implementation Notes - Start by tracing how `mountWorkspaceApp()` injects `pluginDistributionOptions` into `App` and when the E2E helpers attach init scripts and route handlers. - Compare the routed fixture flow used by the daily-use helper with the local fixture flow used by `prepareLocalOfficialPluginPage()`. - Prefer the smallest fix that restores the documented plugin-registry contract and existing E2E coverage. ## Suggested Files or Specs To Inspect - `packages/workspace/e2e/official-plugin-install.helpers.ts` - `packages/workspace/e2e/local-official-plugin.helpers.ts` - `packages/workspace/src/main.ts` - `packages/workspace/src/lib/components/app/bootstrap.ts` - `packages/api/src/lib/context.svelte.ts` - `packages/api/src/lib/plugin-distribution/installer.ts` - `packages/api/src/lib/plugin-distribution/manager.ts` - `spec/src/30-cross-package-contracts/plugin-registry.md` - `spec/src/20-packages/workspace/index.md` ## Validation Commands - `pnpm --filter @lapis-notes/api check:all` - `pnpm --filter @lapis-notes/api test` - `pnpm --filter @lapis-notes/workspace check:all` - `pnpm --filter @lapis-notes/workspace test` - `pnpm --filter @lapis-notes/workspace test:e2e:daily-use` - `pnpm --filter @lapis-notes/workspace test:e2e:official-plugins` ## Related Issues - Follow-up to #353 — [Add local official plugin install verification](../closed/353-add-local-official-plugin-install-verification.md) ## Follow-up Tasks ## Implementation Summary Hardened workspace official-plugin E2E helpers by waiting for pluginDistribution before local installs, retrying transient page-context failures, and requiring the daily-use journey to fail fast when its local official registry fixture is missing. Validated with workspace check:all, workspace test, workspace daily-use E2E, and the full official-plugin E2E wrapper. <!-- backlog:task_id=TASK-PLUGIN-REGISTRY-INSTALL-E2E-REGRESSION source_spec=spec/src/30-cross-package-contracts/plugin-registry.md related_issue=353 -->
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#357
No description provided.