chore(deps): re-pin llm-ingestion-okf to v0.3.1 + migrate tests to stable error codes

Pin dae0bd1a -> v0.3.1 (=692f2df) on the public Forgejo mirror; uv.lock pins
the exact commit behind the tag.

- Drop the mypy override: the library ships py.typed from v0.2.0, so strict
  mode now follows its real types instead of follow_untyped_imports.
- Migrate 8 library-error assertions from pytest.raises(match=...) to
  exc.value.code — message text is explicitly unstable from v0.3.0, the
  codes are the stability contract.
- Fix a real breakage the bump surfaced: IngestResult gained a required
  `stamp` field (d3a3bcc), which the delegation fake did not construct.
- The read-only SQL test loses resolution under the code contract
  (`sql_failed` is generic), so it now proves read-onlyness by effect —
  the write never lands — instead of by message wording.
- Correct the guard plan: G1's persist-gate anchor (ingest.py:372-387) died
  with the 2026-07-16 adoption. Door A is ungated by the library's own
  README, so gating stays our responsibility at the call site.

Verified: 426 tests green, golden output byte-exact unchanged, full gate
clean (ruff + format + mypy strict).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RmNAgbRXUgvoSKxVK4Bevv
This commit is contained in:
Kjell Tore Guttormsen 2026-07-20 07:22:09 +02:00
commit a7e8ffecb8
6 changed files with 41 additions and 23 deletions

View file

@ -59,8 +59,15 @@ går live. Det er derfor guarden er «når, ikke hvis».
Tre trigger-gatede wiringer, hver forankret i en eksisterende roadmap-beslutning:
### G1 — http-kilden går live · gate: D-B-utvidelse (i dag IKKE på D7-roadmap)
- **Persist-gate:** i `_read_extraction`/`materialize`, MELLOM http-fetch og skriving av
`ingest-{id}.md` (`ingest.py:372-387`).
- **Persist-gate:** MELLOM http-fetch og skriving av `ingest-{id}.md`.
- **KORRIGERT 2026-07-20 (pin-bump til v0.3.1):** den opprinnelige forankringen
(`_read_extraction`/`materialize` i `ingest.py:372-387`) er DØD — adopsjonen 2026-07-16
flyttet den koden til `llm-ingestion-okf`; lokal `ingest.py` er nå en 63-linjers adapter.
Biblioteket bekrefter selv at dør A er **ugatet** («What is gated today: nothing» — README):
null runtime-avhengigheter, ingen guard-kall før skriving. Gating er derfor VÅRT ansvar på
kallstedet. To mulige forankringer når http går live: (a) wrap i vår egen seam
(`ingest.materialize`) rundt bibliotekkallet, eller (b) løft gaten inn i biblioteket via
operatør-køen. Valget er IKKE tatt — det hører til D-B.
- **Minimal wiring:** ingest har intet modell-steg, så bookend-formen kollapser til
sanitér+scan over den hentede ekstraksjons-kroppen:
`prepared = prepare_input(fetched_body)` → deterministisk render →