Fix API tests that require local-only registry fixture and slow CI hooks #280
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Forgejo checks fail
@lapis-notes/api#testin CI because:official-registry-fixture.test.tsexpects a siblinglapis-plugin-registrycheckout that CI does not have.
plugin-manager.test.tsbeforeAlldynamically importsworkspace/depsandworkspace-plugin-dependency-resolver, pulling a large UI/plugin-host graphthrough Vite in the linux/amd64 container (hook timeouts, 100s+ suite locally
in Docker).
Interim mitigation (landed)
official-registry-fixture.test.ts:describe.skipIfwhen local generatedregistry is absent.
plugin-manager.test.ts:describe.skipIf(process.env.CI)with hooks movedinside the suite so CI does not compile workspace deps.
Acceptance Criteria (proper fix via stubbing)
plugin-manager.test.tsruns in CI withoutimporting real
workspace/depsor generatedplugin-host-cjs-provider-values(empty provider map is enough for
canResolve/ install-bundle paths).packages/api/test/fixtures/(or fetch in CI) soofficial-registry-fixture.test.tsruns everywhere.describe.skipIf(process.env.CI)fromplugin-manager.test.tsoncestubs are in place.
pnpm docker:ci-check --skip-smokepasses with both suites enabled.Stubbing approach
workspace/src/lib/depsto a testmodule exporting
{}values for keys the resolver reads in install-bundle tests.plugin-host-cjs-provider-valuesto a stub keyed from
plugin-host-cjs-providers.generatedwith{}entries.index.json+ one signed plugin entryunder
packages/api/test/fixtures/official-registry/and point the test at it.Validation Commands
pnpm exec turbo run test --filter=@lapis-notes/api --forcepnpm docker:ci-check --skip-smoke --pullImplementation Summary
Vitest aliases plugin-host-cjs-provider-values to a lightweight stub; PluginManager keeps lazy workspace/deps import with 120s hook budget and ResizeObserver in vitest.setup. Checked-in signed registry fixture under packages/api/test/fixtures/official-registry/v1/ replaces sibling lapis-plugin-registry. Removed CI skipIf gates. Validated: CI=true pnpm exec turbo run test --filter=@lapis-notes/api --force; check:format/types/lint for @lapis-notes/api.