You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Renew rendering and source boundary contracts around block payloads and dispatch #278
The verification-renewal branch has exhausted the tests/ and devtools/ weak-typing residue, but the next high-leverage source-side debt is still concentrated in a small boundary-heavy cluster:
polylogue/rendering/block_models.py
polylogue/sources/dispatch.py
polylogue/rendering/core_messages.py
polylogue/sources/token_store.py
polylogue/lib/json.py
These files still carry a disproportionate share of cast-heavy payload coercion, structural object plumbing, and runtime narrowing that is only partially modeled. They are also central seams used by adjacent helpers such as sources/parsers/drive_support_attachments.py, sources/providers/gemini_message.py, and sources/source_acquisition.py.
Outcome
Run a source-renewal tranche that turns these into explicit typed boundaries instead of loose compatibility layers.
Acceptance Criteria
rendering/block_models.py no longer relies on cast-driven extraction for block fields or tool-input payloads.
rendering/core_messages.py attaches branch payloads through typed helpers rather than list-level casts between rendered messages and mapping payloads.
sources/dispatch.py lowers payloads and provider detection through typed sequence/record helpers without the current list/object casts for Claude Code and Codex paths.
sources/token_store.py replaces the current keyring object/ignore seam with an explicit protocol-backed keyring contract.
lib/json.py removes its remaining cast-based loads path and keeps the JSON contract typed end-to-end.
Adjacent follow-through is applied where needed in nearby files (drive_support_attachments.py, gemini_message.py, source_acquisition.py, or similar) so the renewed contracts are actually consumed.
ruff check, mypy, and targeted pytest coverage pass for the touched tranche before PR.
Notes
This is the next source-side continuation after the verification-renewal work. It should stay substrate-first: define the new contracts in the source/rendering/lib layer first, then adapt any surface-level callers second.
Activity
refactor: renew rendering and source boundary contracts (#279)
refactor: renew rendering and source boundary contracts (#279)
refactor: renew rendering and source boundary contracts (#279)
refactor: renew rendering and source boundary contracts (#279)