Repository navigation
Closed
Labels
Description
Context
The post-mypy/source-renewal survey identified one coherent quiet-but-important surface cluster that was not fully covered by the current CLI/MCP/UI and verification issues. The concern is not simple file size; it is duplicated conceptual substrate around authored scenarios, showcase generation, rendering payloads, and site publication.
Scope
Audit and renew the authored-surface cluster:
polylogue/scenarios/polylogue/showcase/polylogue/rendering/polylogue/site/
Highest-risk files from the scratch survey:
polylogue/scenarios/execution.pypolylogue/scenarios/corpus.pypolylogue/showcase/generators.pypolylogue/showcase/workspace.pypolylogue/rendering/blocks.pypolylogue/rendering/core_markdown.pypolylogue/site/builder.py
Problems to remove
- repeated payload coercion helpers such as integer/float/string-tuple coercion
- multiple
to_payload/from_payloadmicro-systems over loose dictionaries - render payload shaping assembled through ad hoc dictionaries instead of typed view models
- orchestration files mixing model definition, normalization, and execution wiring
Acceptance criteria
- Introduce or reuse one shared typed payload/view substrate for scenario/showcase/rendering boundaries.
- Replace duplicated coercion helpers with narrow typed helpers or model methods.
- Make render/site payload shaping explicit enough that authored scenarios and showcase outputs share contracts instead of parallel dictionaries.
- Keep behavior-preserving rewrites unless the audit exposes a real correctness issue.
- Land as one or more coherent PRs with focused checks and
devtools verify.
Related work
- feat: add proof-obligation kernel and verification catalog #192
- test: cover missing generated scenario families as proof subjects #196
- refactor: contract CLI, MCP, and UI surfaces over renewed substrate #273
- refactor: renew verification, test helpers, and quality tooling contracts #274
- refactor: audit low-churn files after renewal campaign #315
Activity
Sinity commentedon Apr 22, 2026
Starting #317 on branch
feature/refactor/authored-surface-contractsfromorigin/masterate85a0d26.Execution boundary:
Sinity commentedon Apr 22, 2026
Implementation checkpoint on
feature/refactor/authored-surface-contracts:polylogue.authored_payloadsas the shared authored-surface payload contract layer.polylogue.scenarios; scenarios, showcase reporting, QA rendering, and site manifest serialization now import the contract directly.Verification so far:
ruff check polylogue/authored_payloads.py polylogue/scenarios polylogue/showcase polylogue/site tests/unit/scenarios/test_authored_payloads.py tests/unit/showcase/test_report.py tests/unit/site/test_builder.pymypy polylogue/authored_payloads.py polylogue/scenarios polylogue/showcase polylogue/site tests/unit/scenarios/test_authored_payloads.py tests/unit/showcase/test_report.py tests/unit/site/test_builder.pypytest -q tests/unit/scenarios/test_authored_payloads.py tests/unit/scenarios tests/unit/showcase/test_report.py tests/unit/showcase/test_exercise_catalog.py tests/unit/showcase/test_generators.py tests/unit/showcase/test_workspace.py tests/unit/showcase/test_qa_markdown.py tests/unit/site/test_builder.py tests/unit/rendering/test_rendering.py(149 passed)devtools render-all --checkdevtools lab-scenario verify-baselines(Ran 40 exercises, all baselines match)devtools verify(all checks passed)Decision: rendering already had typed records, and site already had a Pydantic publication manifest, so this slice only wires their manifest-facing payload methods into the shared authored payload contract instead of inventing a second rendering/site DTO layer.
refactor: share authored payload contracts (#367)
Sinity commentedon Apr 22, 2026
Closed by PR #367 (
refactor: share authored payload contracts (#367)), merged asa1470092794e123238b3aec1f3e5723e7d04a3be.Merge basis:
devtools verifypassed end-to-end.devtools verify --quickpassed.devtools lab-scenario verify-baselinesmatched all 40 tier-0 exercises.refactor: share authored payload contracts (#367)
chore(deps): bump pytest-benchmark from 5.2.3 to 5.3.0 (#4492)