2026-10-13 14:08:19 +02:00
|
|
|
# SCOPE
|
|
|
|
|
|
|
|
|
|
## One-liner
|
|
|
|
|
|
|
|
|
|
Provenance-first, standard-library fetching of data from public APIs and web sources for research repositories.
|
|
|
|
|
|
|
|
|
|
## Core Idea
|
|
|
|
|
|
2026-10-19 13:51:40 +02:00
|
|
|
Research repos declare *what* they need as JSON fetch specs; web-fetcher returns
|
|
|
|
|
`Observation` records that carry the value together with source, URL, the
|
|
|
|
|
source's own publication time, retrieval time and the SHA-256 of the raw
|
|
|
|
|
payload. Missing data is an explicit `not_found`, failures an explicit `error` —
|
|
|
|
|
never a guess. See `INTENT.md` for the commitments.
|
2026-10-13 14:08:19 +02:00
|
|
|
|
|
|
|
|
## In Scope
|
|
|
|
|
|
2026-10-19 13:51:40 +02:00
|
|
|
- `Observation` record, provenance-tracked HTTP fetching (`web_fetcher/core.py`).
|
|
|
|
|
- Spec dispatch that never raises for a single failing spec (`web_fetcher/registry.py`).
|
|
|
|
|
- Adapters: `eurostat` (JSON-stat 2.0), `http_json`, `http_csv`, `xlsx_wide`,
|
|
|
|
|
and the `manual` not_found placeholder. New public sources as adapters with
|
|
|
|
|
offline fixture tests.
|
|
|
|
|
- Optional content-addressed payload cache for replayable runs.
|
|
|
|
|
- CLI (`python3 -m web_fetcher fetch specs.json`) emitting JSONL, and the Python API.
|
|
|
|
|
- Reuse-surface capability record `capability.infotech.provenance-fetch` (`registry/`).
|
2026-10-13 14:08:19 +02:00
|
|
|
|
|
|
|
|
## Out of Scope
|
|
|
|
|
|
2026-10-19 13:51:40 +02:00
|
|
|
- Crawling, scraping behind logins, JavaScript-rendered pages
|
|
|
|
|
(use `capability.infotech.headless-browser`).
|
|
|
|
|
- LLM-based extraction or estimation of missing values.
|
|
|
|
|
- Scheduling — activity-core owns *when*.
|
|
|
|
|
- Execution orchestration — rein-aharness owns *how it runs*.
|
|
|
|
|
- Storing or analysing fetched data; that belongs to the consuming research repo.
|
|
|
|
|
- Third-party runtime dependencies.
|
2026-10-13 14:08:19 +02:00
|
|
|
|
|
|
|
|
## Current State
|
|
|
|
|
|
2026-10-19 13:51:40 +02:00
|
|
|
- Version 0.1.0, ~400 lines of stdlib Python, 8 offline tests passing (2026-10-19).
|
|
|
|
|
- Consumer: assembly-economics reality checkpoints (`checkpoints/run_checkpoint.py`).
|
|
|
|
|
- Known gaps: no retry/backoff, auth or pagination; no tagged release yet
|
|
|
|
|
(tracked in `WEBFETCH-WP-0002`).
|
|
|
|
|
- Reuse vector: D2 / A2 / C1 / R1.
|
2026-10-13 14:08:19 +02:00
|
|
|
|
|
|
|
|
## Getting Oriented
|
|
|
|
|
|
2026-10-19 13:51:40 +02:00
|
|
|
- Start with: `INTENT.md`, then `README.md` for spec fields and usage.
|
|
|
|
|
- Agent instructions and dev commands: `AGENTS.md`
|
|
|
|
|
- Capability record: `registry/capabilities/`
|
|
|
|
|
- Workplans: `workplans/`
|