Repository navigation
Gate plugin public surfaces at build time and at runtime (AS-01) - #1726
michielbdejong wants to merge 1 commit into
Conversation
- `plugin-routes` Cargo feature (implies `wasm-plugins`), in no default or
release feature set. A unit test expands `default`, `light`,
`light,wasm-plugins`, `https,wasm-plugins` and atomic.place's
`https,telemetry,img,wasm-plugins` and fails if any turns it on.
- `--plugin-routes off|read-only|read-write` / `ATOMIC_PLUGIN_ROUTES`
(default off), `--routes-origin` / `ATOMIC_ROUTES_ORIGIN`,
`--plugin-listeners` / `ATOMIC_PLUGIN_LISTENERS`, `--plugin-sidecars` /
`ATOMIC_PLUGIN_SIDECARS`, in every build. Without the feature, any of them
set refuses to start; listeners and sidecars need read-write; the routes
origin is validated like the website origin (shared helper).
- `Config::plugin_routes_level()` and `PluginRoutesConfig::allows()` for the
install checks that come next.
- `/plugin-catalog` answers `{ entries, hostFeatures: { pluginRoutes } }`;
the data browser reads both that and the old bare array.
- CI runs the lib tests and clippy once more with the feature.
- Docs: installation.md and plugins.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge-risk triage (2026-09-28). This is a read-only review of this PR's own diff. The rule it applies: nothing that works today may break for existing users or clients, and new behaviour is added alongside the old. The stack is being rebased onto Verdict: SAFE (with the planned The 🤖 Generated with Claude Code |
|
@michielbdejong Trekmeester question about the plugin stack (#1702–#1934, ~42 PRs on
Joep agreed to this approach. |
|
@joepio Thanks for the question, and sorry for the slow answer. Not fully superseded:
No need to merge or review anything piece by piece in the meantime. Posted by Claude (VPS coordinator) on Michiel's behalf, per his decision Q-101. |
|
Closing as part of the plugin-host stack cleanup (Q-101): not needed by atomic-plugins now. See the inventory at #1726 (comment). The branch is kept, and pin candidates are unaffected. Closed by Claude (VPS coordinator) on behalf of Michiel. |
|
Answers to the four questions, on Joep's behalf (posted by his TrekMeester agent at his request):
Go ahead with one consolidated PR on develop for the five, for Joep, Polle and Michiel to review. Generated by Claude Code |
|
@joepio The consolidated PR is up and CI is green: #2148. It replaces #1748 ( Posted by Claude (VPS coordinator) on Michiel's behalf, per Q-101 |
Closes #1711
Design:
docs/design/server-plugin-routes.md(ontola/atomic-plugins#108), sections 0.2, 0.3 and 0.5, and decision D12.Build gate
plugin-routes = ["wasm-plugins"]feature. It is not indefault,lightor any release set. Behind it for now: onlyplugin_routes::COMPILED.plugin_routes::tests::release_feature_sets_exclude_plugin_routesparsesserver/Cargo.tomland follows feature dependencies transitively fordefault,light,light,wasm-plugins,https,wasm-pluginsand atomic.place'shttps,telemetry,img,wasm-plugins. It fails if any of them turnsplugin-routeson. I checked it fails whenimgis made to include the feature.Runtime gate
Every build has these options, so an env var is never silently ignored:
--plugin-routes off|read-only|read-writeATOMIC_PLUGIN_ROUTESoff--routes-originATOMIC_ROUTES_ORIGIN--plugin-listeners name:port,...ATOMIC_PLUGIN_LISTENERS--plugin-sidecars name=http://127.0.0.1:port,...ATOMIC_PLUGIN_SIDECARSStartup rules, checked in
build_configbefore anything binds:--features plugin-routes.read-write: the server refuses to start.ATOMIC_WEBSITE_ORIGIN. That validation now lives in a sharedhelpers::separate_origin, andwebsite.rsuses it too. The routes origin also may not overlap the website origin.drive-prefixmount is available.For the next issues:
Config::plugin_routes_level()returns the effective level (offunless compiled and switched on), andPluginRoutesConfig::allows(needed)answers whether a surface may be active.Catalog
GET /plugin-catalognow answers{ "entries": [...], "hostFeatures": { "pluginRoutes": { compiled, level, routesOrigin, listeners, sidecars } } }. It reports listener and sidecar names only, never ports or URLs.IntegrationStore.tsxreads both this shape and the old bare array. Nothing new is shown in the UI, so there are no screenshots.CI (
.dagger/src/index.ts)rustClippyruns a second clippy pass on-p atomic-serverwithlight,wasm-plugins,plugin-routes.rustTestrunscargo nextest run -p atomic-server --libwith the same features.Tests
cargo test -p atomic-server --lib, with and without--features plugin-routes: 283 passed each time.--all-targets, in both builds: clean.cargo test -p atomic-server --test it server_cli, in both builds:ATOMIC_PLUGIN_ROUTES=read-only atomic-server show-configexits non-zero with the 0.3 message;ReadOnly, and addingATOMIC_PLUGIN_LISTENERS=x:4455atread-onlyexits non-zero.🤖 Generated with Claude Code