mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-21 07:41:28 +02:00
The fieldmap scrubber covers every tool record that maps through it, which is not how endpoints and ports are written: a sitemap entry, an archive record and a service banner go straight from a provider dataclass into a row. gov.np's URL discovery lost its whole run to one of them. Both inventory row builders now scrub, at the same single-writer choke point the fieldmap uses for tools. `endpoint_inventory._changes` scrubs too — the update path writes the same untrusted text as the insert. The savepoint guards added for exactly this caught nothing, because psycopg raises the NUL complaint while *binding parameters*: SQLAlchemy wraps that above DBAPIError, so `except DatabaseError` never fired. Both guards catch StatementError now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPueZXQMbjLXMokXeA8LFP