Skip to content

feat(plugins): gate plugin registries against drift - #568

Draft
hamza-56 wants to merge 1 commit into
hamza/feat/plugin-frontend-consumptionfrom
hamza/feat/plugin-drift-gate
Draft

feat(plugins): gate plugin registries against drift#568
hamza-56 wants to merge 1 commit into
hamza/feat/plugin-frontend-consumptionfrom
hamza/feat/plugin-drift-gate

Conversation

@hamza-56

@hamza-56 hamza-56 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Part of: Plugin identity and display metadata are split across disconnected backend and frontend registries

Final PR of the sequence proposed in #372, stacked on #567. Together with #566 and #567 this closes #565.

What

A mismatch between the backend's plugin declarations and the frontend registry becomes a red build instead of a silently missing dashboard page: the frontend's plugin route list is generated from the backend FRONTEND_APPS declarations, and tests on both tiers fail on drift.

Changes

  • feat(plugins): scripts/dump_frontend_plugins.py dumps the FRONTEND_APPS declarations offline (the loader is DB-free) as frontend/lib/plugins/generated.ts
  • feat(frontend): generateStaticParams derives the dashboard plugin routes from the generated list instead of a hand-maintained array
  • chore: make frontend.build.plugins regenerates the committed list
  • test(plugins): pytest fails when the committed list is stale vs the declarations (tests/core/test_dump_frontend_plugins.py)
  • test(frontend): vitest fails when the frontend registry does not match the list (lib/tests/plugin-registry-drift.test.ts)
  • docs: plugin guides describe the regeneration workflow

How to Test

  1. uv run pytest tests/core/test_dump_frontend_plugins.py
  2. cd frontend && bun run test lib/tests/plugin-registry-drift.test.ts
  3. Remove FRONTEND_APPS.add_item(...) from a plugin without regenerating: step 1 fails. Regenerate with make frontend.build.plugins: step 2 fails until the frontend definition is removed too.

Notes

This PR description was written with the assistance of an LLM (Claude).

A mismatch between the two registries was silent: the frontend could
miss a static route (google-drive was absent from generateStaticParams)
or register a plugin the backend never declared (#565, item 4 of #372).

- scripts/dump_frontend_plugins.py dumps the FRONTEND_APPS declarations
  offline (the loader is DB-free) as frontend/lib/plugins/generated.ts,
  regenerated with `make frontend.build.plugins`.
- generateStaticParams derives the dashboard plugin routes from the
  generated list instead of a hand-maintained array.
- Drift is a red build on both tiers: pytest fails when the committed
  list is stale vs the declarations, vitest fails when the frontend
  registry does not match the list.
@hamza-56 hamza-56 changed the title feat(plugins): gate backend and frontend plugin registries against drift feat(plugins): gate plugin registries against drift Jul 31, 2026
@hamza-56 hamza-56 self-assigned this Jul 31, 2026
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.

Plugin identity and display metadata are split across disconnected backend and frontend registries

1 participant