feat(manifest): add fail-fast manifest validation (spec §3–§4)

TDD step 1 of the phase 1 plan: typed error hierarchy rooted in
IngestError, manifest parsing with schema validation before any source
call — id grammar, polymorphic source types, extraction rules, verdict
reservation (okf_type and filename namespace), and the no-embedded-
credentials rule for base_url. Dev tooling (pytest/mypy/ruff) added as
a PEP 735 dependency group; runtime dependencies stay empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QeqhJpYQyghASjiJo5EhGg
This commit is contained in:
Kjell Tore Guttormsen 2026-07-16 19:47:29 +02:00
commit 54ac494830
5 changed files with 959 additions and 0 deletions

View file

@ -0,0 +1,11 @@
"""Typed error hierarchy rooted in IngestError."""
from __future__ import annotations
class IngestError(Exception):
"""Base class for every error raised by this library."""
class ManifestError(IngestError):
"""The manifest failed fail-fast schema validation (ingest-spec §4)."""