Skip to content

refactor: rebuild schema generation and audit boundary contracts #257

Closed

Description

@Sinity

Summary

Renew the schema generation, audit, and tooling boundary layer around explicit JSON/document contracts instead of Any-shaped schema payload flow.

Problem

Recent renewal work tightened runtime schema and source boundaries, but the schema generation/audit/tooling surface still carries older path-dependent code:

  • audit walkers and checks still traverse schema payloads through broad dict[str, Any] shapes
  • generation helpers and workflow plumbing still return and mutate loosely typed schema payloads
  • validator/tooling registry seams still mix runtime contract logic with ad hoc coercion instead of explicit aliases and narrowing helpers
  • the result is type-clean code in places, but not semantically modeled code at the schema authoring/audit boundary

Scope

Target a coherent renewal slice across the schema authoring/audit layer, likely including:

  • polylogue/schemas/audit_walkers.py
  • polylogue/schemas/audit_checks.py
  • polylogue/schemas/generation_dynamic_keys.py
  • polylogue/schemas/generation_workflow.py
  • polylogue/schemas/tooling_registry.py
  • adjacent validator/tooling helpers where the same boundary contracts apply

Acceptance criteria

  • replace broad Any/dict[str, Any] schema payload flow with shared aliases or typed helpers where practical
  • keep schema traversal and generation behavior unchanged while making the boundary contracts explicit
  • align affected tests/verification helpers without widening production signatures back out
  • land as a coherent PR with local verification recorded

Ref #250

Activity

  1. added
    type:refactor
    on Apr 22, 2026
  2. added 4 commits that reference this issue on Apr 22, 2026
    2077459
    236f48c
    6c69437
    b030ef0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:schematype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions