Expand description
Plugin conformance checks for Autumn plugin authors.
Provides types and functions to verify that a plugin’s route contributions are safe, correctly attributed, and ready to publish. Plugin authors use this module in integration tests to get a pass/fail conformance report before publishing their crate.
§Quick start
use autumn_web::plugin_conformance::{ConformanceConfig, run_conformance};
// Build a minimal host app that installs the plugin, then inspect its routes
// via AppBuilder::plugin_route_infos() or via `autumn plugin-check` in CI.
let config = ConformanceConfig::new("autumn-admin-plugin")
.prefix("/admin")
.sensitive_route("/admin", "Role: admin required via AdminPlugin::require_role");
// Pass route_infos collected from AppBuilder to run_conformance(...)Structs§
- Check
Result - Result of a single conformance check.
- Collision
Diagnostic - Information about two or more routes that collide on the same (method, path).
- Conformance
Config - Configuration for a conformance run against a specific plugin.
- Conformance
Report - The full conformance report for a plugin.
- Route
Contributor - A single route that contributes to a collision.
- Sensitive
Route - Declaration of a sensitive route and its auth/profile gating mechanism.
Enums§
- Check
Status - Status of an individual conformance check.
Functions§
- check_
collisions - Detect route collisions: any two routes sharing the same (method, path) pair.
- check_
duplicate_ registration - Check that the plugin’s routes are not duplicated, which would indicate the plugin was registered more than once and the framework’s dedup logic was bypassed.
- check_
route_ attribution - Check that all routes attributed to the plugin carry the expected
Plugin("<plugin_name>")source. - check_
route_ prefix - Check that all plugin routes live under
prefix. - check_
sensitive_ surfaces - Check that sensitive-sounding plugin routes are declared with an auth mechanism.
- run_
conformance - Run all conformance checks and return a
ConformanceReport.