operations capa

operations-link-graph

Ethical link-following traversal: SSRF-hardened frontier admission (ValidatedUrl), robots.txt compliance, and an async jittered outbound host-pacer composing operations-rate-limit

Ethical link-following traversal: SSRF-hardened frontier admission (ValidatedUrl), robots.txt compliance, and an async jittered outbound host-pacer composing operations-rate-limit

Tieroperations
Roleunclassified (baselined)
Pathcrates/operations/link-graph
Edition2021
Targetsoperations_link_graph, ssrf_corpus
Public items0 across 0 modules
Tests33

What it is for

# operations-link-graph

Ethical link-following traversal orchestration: an SSRF-hardened frontier (ValidatedUrl, Frontier), robots.txt compliance (RobotsPolicy), an async jittered outbound host-pacer composing operations-rate-limit (HostPacer), and typed traversal-progress tracking (Traversal, TraversalOutcome).

Lifted from the source's link-following analyzer and robots-policy modules, its batch-orchestration service, and its robots.txt/rate-limiter ethics modules — see CHANGELOG.md for the full provenance (exact paths/types) and deviation notes.

Layer

Operations (see docs/architecture/layers.toml's AC-layer resolution note) — a runtime traversal/pacing orchestration loop, not a data shape. Depends on foundation's foundation-web-analysis (the Analyzer trait), infrastructure's infrastructure-fetcher (SafeHttpClient, is_safe_url, read_body_capped), and operations' operations-rate-limit (RateLimitKey/token-bucket, composed as this crate's own async jittered host-pacer's allow/deny decision — the same-layer exception this needs is recorded in layers.toml, matching operations-mail-sync's precedent).

Gate 1.5 Round 2 (binding design decision)

This crate's frontier is filled from PAGE CONTENT (hrefs parsed out of a fetched page, redirects, sitemap entries), not just one operator-supplied seed URL. docs/userstories/sprint-3.46-plumber-harvest.md's Gate 1.5 Round 2 (unanimous, 3-of-4 seats) requires every discovered URL to be re-validated through infrastructure_fetcher::is_safe_url before frontier admission — implemented as ValidatedUrl, the only type Frontier::push accepts, so an unvalidated URL cannot enter the frontier by construction. See validated_url for the full rationale and tests/ssrf_corpus.rs for the required adversarial test corpus.

Capabilities

No public items.

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
UrlRejectionerrors::UrlRejection
ValidatedUrlvalidated_url::ValidatedUrl
{HostPacer,PacerConfig}pacer::{HostPacer,PacerConfig}
{PageRecord,SkipReason,Traversal,TraversalConfig,TraversalOutcome,TraversalReport,DEFAULT_MAX_BYTES,}traversal::{PageRecord,SkipReason,Traversal,TraversalConfig,TraversalOutcome,TraversalReport,DEFAULT_MAX_BYTES,}
{RobotsMeta,RobotsPolicy}robots::{RobotsMeta,RobotsPolicy}
{normalize_for_dedup,Frontier,FrontierEntry}frontier::{normalize_for_dedup,Frontier,FrontierEntry}

Boundary

Reaches into foundation, infrastructure.

Shares tier operations with 40 other crates: operations-approval-workflow, operations-assessments, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-liveview, operations-camera-registry, … (40 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)operations
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/operations/link-graph
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_operations["operations"] --> n_foundation["foundation"]
  n_operations["operations"] --> n_infrastructure["infrastructure"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-web-analysis`foundationnoalways
`infrastructure-fetcher`infrastructurenoalways
`operations-rate-limit`operationsnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
rand^0.8noalways
reqwest^0.12rustls-tlsnoalways
robotstxt^0.3noalways
scraper^0.20noalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tokio^1full, sync, timenoalways
url^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, full, test-utilnoalways
tokio-test^0.4noalways
wiremock^0.6noalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["operations-link-graph"]
  SELF -->|runtime| n_foundation_web_analysis["foundation-web-analysis"]
  SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"]
  SELF -->|runtime| n_operations_rate_limit["operations-rate-limit"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
liboperations_link_graph`src/lib.rs`
testssrf_corpus`tests/ssrf_corpus.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessnone detected
network I/Oyes
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests29
Integration tests4
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files7
Source lines1433
Code lines914
Public API items0
Public modules0
Tests33
Examples0
Cargo features0
Direct runtime dependencies15
Workspace reverse dependencies0
pie showData
    title Rust source composition
    "Code" : 914
    "Blank or comment" : 519

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las operations · Manual