Skip to content

feat(ingest): corpus source with pinned-ref tarball cache, url mapping, and exclusions (T05) - #8

Merged
prateekchaplot merged 2 commits into
mainfrom
arch/caliper/t05
Nov 16, 2026
Merged

prateekchaplot merged 2 commits into
mainfrom
arch/caliper/t05

Conversation

@prateekchaplot

Copy link
Copy Markdown
Owner

Task T05 from docs/ARCHITECTURE.md §14 (corpus source).

What's inside

  • fetch_corpus(cfg, *, refresh=False, fetcher=None) -> Path — GitHub ref resolution + codeload tarball for that exact SHA, sha-keyed cache + atomic pin pointer (main@<sha>), zero network on cache hit, DI Fetcher seam (httpx default)
  • page_to_url — A1 mapping (articles/azure-functions|service-bus-messaging/<slug>.md → learn.microsoft.com), typed SourceError
  • discover_pages — both article trees with /includes/ + _-prefix exclusions
  • read_cache_meta / format_source_ref for the §9.4 source_ref
  • Single unimplemented TOC-API fallback seam (_fetch_via_toc_api, A1-failure only)
  • 32 new tests (fake fetcher + fixture tarball, no network, no patch())

Verification: uv run pytest — 154 passed (122 + 32); ruff check + ruff format --check + mypy strict clean.

Notes: ambiguity resolutions recorded in docs/TASKS.md Notes (cache dir via CALIPER_CACHE_DIR env, corrupt pin fails loud, ingest/__init__.py marker stays T07-owned). Dependents: T06, T07.

@prateekchaplot
prateekchaplot merged commit 36d2d75 into main Nov 16, 2026
1 check passed
@prateekchaplot
prateekchaplot deleted the arch/caliper/t05 branch November 16, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant