pub struct FetchPlan {
pub metadata_sources: Vec<String>,
pub pdf_sources: Vec<PdfSourcePlan>,
pub redirect_allowlists_loaded: Vec<String>,
pub target_pdf_path: Utf8PathBuf,
pub target_metadata_path: Utf8PathBuf,
pub would_append_provenance: bool,
pub candidate_hosts_are_upper_bound: bool,
}Expand description
Structured dry-run preview returned by --dry-run and the
dry_run: true MCP variants. Wire shape matches ADR-0022 §1 and
docs/MCP_TOOLS.md §10.
Fields§
§metadata_sources: Vec<String>Metadata sources the real fetch would consult, in dispatch order.
pdf_sources: Vec<PdfSourcePlan>PDF sources the real fetch could attempt. candidate_hosts is an
upper-bound on the hosts a real fetch would touch (see
PdfSourcePlan).
redirect_allowlists_loaded: Vec<String>Source keys whose redirect allowlists are loaded into the HTTP
client. Useful for validating CapabilityProfile configuration
drift.
target_pdf_path: Utf8PathBufWhere the PDF would land on disk (always <root>/<safekey>.pdf).
target_metadata_path: Utf8PathBufWhere the metadata TOML would land
(always <root>/.metadata/<safekey>.toml).
would_append_provenance: booltrue in Phase 1+ — every successful fetch appends a provenance
row. Named explicitly so future fetch modes can declare “this
fetch would NOT append” without inverting the flag’s meaning
(ADR-0022 §1).
candidate_hosts_are_upper_bound: boolAlways true in Phase 1: PdfSourcePlan::candidate_hosts is the
static allowlist for the resolver, NOT a prediction of the
single host the real fetch would touch. See ADR-0022 §4 (“Honesty
about candidate uncertainty”). The field is machine-parseable so
an agent can detect the upper-bound semantics without reading the
spec — encoding the §4 disclaimer into the wire shape itself.