feat(render): add §5 body renderers as pure functions

TDD step 2: markdown-table rendering with the load-bearing escape order
(backslash, then pipe, then newlines to spaces with CRLF as one unit),
SQL value-to-text conversion (NULL empty, plain-decimal integers,
shortest round-trip floats, explicit bool/BLOB rejection — never silent
coercion), and the verbatim fenced block for http bodies. Table shape
and fenced-block form match the reference implementation byte for byte
ahead of the shared §11 golden fixtures.

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:52:21 +02:00
commit cda4a6a497
3 changed files with 187 additions and 0 deletions

View file

@ -9,3 +9,7 @@ class IngestError(Exception):
class ManifestError(IngestError):
"""The manifest failed fail-fast schema validation (ingest-spec §4)."""
class RenderError(IngestError):
"""A value cannot be rendered under the §5 body rules (never silent coercion)."""