Expand description
Robots-policy guard port — recon/production URL permission check (T111). Robots-policy guard port — closes guide failure mode #9.
RobotsPolicyGuard is the consumer-owned port trait that both recon
and production paths use to ask “may I fetch this URL?”. The
RobotsPolicy value type
lives in the domain layer and is shared; only the guard implementation
(the part that actually fetches + parses robots.txt) is swappable.
Default adapters shipped by stygian-graph:
PermissiveRobotsGuard— returnsAllowfor every URL. Used when the operator has explicitly opted in toIgnoreSilentlyor the guard has not been wired up. Safe default for unit tests.- (Reserved for future adapters) —
CachedRobotsGuardbacked by a realrobots.txtfetch + parse.
Structs§
- Permissive
Robots Guard - No-op guard: returns
RobotsDecision::Allowfor every URL.
Enums§
- Forbid
Reason - Reason captured in the
RobotsDecision::Forbidvariant. - Policy
Outcome - The reducer’s output — what the caller should do for this URL.
Traits§
- Robots
Policy Guard - Port trait: ask a guard whether a URL is permitted under the
configured
RobotsPolicy.
Functions§
- apply_
policy - Apply a
RobotsPolicyto aRobotsDecision. The single source of truth for how a decision maps to a concrete action. - permissive_
guard - Wrap a
PermissiveRobotsGuardso the result is always a freshArc— convenient for callers that need a stable port-owned type. - validate_
guard_ pair - Validate that the supplied
RobotsPolicy+RobotsDecisioncombination is internally consistent.