Skip to content

refactor: move route plugins to Nova global config#61

Merged
Taure merged 1 commit intomainfrom
refactor/global-plugins
Apr 9, 2026
Merged

refactor: move route plugins to Nova global config#61
Taure merged 1 commit intomainfrom
refactor/global-plugins

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented Apr 9, 2026

Summary

  • Remove per-group plugins => from all asobi_router route groups
  • Move plugins to {nova, [{plugins, [...]}]} in dev and prod sys.config
  • Asobi standalone behaviour is unchanged — same plugins, just configured globally

Why

Wrapper applications (e.g. asobi_engine for SaaS) need to inject additional plugins (tenant resolution) into all routes. With per-group plugins hardcoded in the router, the only option was duplicating all route definitions. Nova's global plugin mechanism (application:get_env(nova, plugins, [])) is used as fallback when route groups don't define their own — by removing per-group definitions, wrapper apps can now control the full plugin chain via their Nova config.

Test plan

  • rebar3 compile — clean
  • rebar3 fmt --check — clean
  • rebar3 xref — clean
  • Verified via asobi_engine _checkouts: global plugins apply to all asobi routes, tenant plugin injects correctly, 15 tests pass

Remove per-group plugin definitions from asobi_router route groups
and move them to {nova, [{plugins, [...]}]} in sys.config. This
allows wrapper applications (like asobi_engine) to control the
plugin chain via their own Nova config when using asobi as a
nova_app, enabling injection of additional plugins (e.g. tenant
resolution) without duplicating all route definitions.
@Taure Taure merged commit ed3b6a4 into main Apr 9, 2026
15 checks passed
@Taure Taure deleted the refactor/global-plugins branch April 9, 2026 06:01
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.

1 participant