Skip to main content

Module plugin_conformance

Module plugin_conformance 

Source
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§

CheckResult
Result of a single conformance check.
CollisionDiagnostic
Information about two or more routes that collide on the same (method, path).
ConformanceConfig
Configuration for a conformance run against a specific plugin.
ConformanceReport
The full conformance report for a plugin.
RouteContributor
A single route that contributes to a collision.
SensitiveRoute
Declaration of a sensitive route and its auth/profile gating mechanism.

Enums§

CheckStatus
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.