Skip to main content

validate_guard_pair

Function validate_guard_pair 

Source
pub fn validate_guard_pair(
    policy: RobotsPolicy,
    guard: &dyn RobotsPolicyGuard,
) -> Result<()>
Expand description

Validate that the supplied RobotsPolicy + RobotsDecision combination is internally consistent.

Returns Err(StygianError::Graph(GraphError::InvalidPipeline(...))) if a pipeline tries to enforce Obey while shipping a no-op guard that returns Allow for everything — that combination would mean the pipeline claims to obey robots.txt but cannot, since it has no data source to check against. The intent is to surface this at pipeline-build time rather than silently passing every URL through.