Skip to content

test: compile schema annotations and provider semantics into obligations #332

Closed

Description

@Sinity

Parent

Part of #330. Depends on #192.

Context

The schema-first aspiration is that synthetic generation should be expressive enough to replace most arbitrary fixtures. Polylogue already consumes x-polylogue-* annotations in synthetic relation solving, but the same annotations are not yet systematically compiled into verification claims. Provider-specific semantics also need typed capability metadata rather than scattered tests or lossy normalization.

Scope

Compile schema annotations and provider capabilities into subjects and claims.

Schema subjects:

  • every x-polylogue-* annotation instance with provider/version/path provenance;
  • value/enum annotations;
  • foreign-key annotations;
  • mutually-exclusive annotations;
  • range annotations;
  • time-delta annotations;
  • semantic-role annotations.

Provider subjects:

  • parser identity and sidecar spec;
  • tool-use variant;
  • reasoning/thinking capability;
  • streaming capability;
  • native and canonical identity semantics;
  • timestamp semantics.

Concrete gap

tests/infra/strategies/schema_driven.py::schema_conformant_payload() currently strips x-polylogue-* annotations before Hypothesis-jsonschema generation. The target is that annotations can drive generation and verification, not only validation or relation solving.

Acceptance criteria

  • At least three annotation families compile into proof obligations.
  • The same annotation metadata drives generation and a verification claim for at least one family.
  • Provider capability metadata exists for at least two providers and is consumed by claims.
  • Cross-provider normalization preserves provider-native facts alongside canonical facts.
  • Partial coverage is explicit when a provider lacks reasoning, streaming, sidecars, or another facet.

Activity

  1. added
    theme:verifiability
    phase:migration
    on Apr 21, 2026
  2. changed the title [-]test: expand schema-native synthetic world controls[/-] [+]test: compile schema annotations and provider semantics into obligations[/+] on Apr 22, 2026
  3. added
    theme:semantic-proof
    on Apr 22, 2026
  4. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint for the implementation branch feature/test/schema-provider-obligations:

    • Added typed provider capability metadata in polylogue/lib/provider_capabilities.py for codex, claude-code, and chatgpt.
    • Compiled those records into provider.capability.* proof subjects and added catalog claims for native/canonical identity bridging plus explicit partial-capability coverage.
    • Kept the existing three schema annotation families in the catalog and made x-polylogue-values feed generation by translating it to JSON Schema enum before stripping test-hostile extensions.
    • Added evidence runners for schema value-generation closure and provider capability metadata checks.
    • Regenerated docs/verification-catalog.md; catalog now has 3 provider capability subjects, 10 claims, and 9,035 obligations.

    Verification run locally:

    pytest -q -n 0 tests/unit/proof tests/unit/sources/test_schema_driven.py
    ruff check polylogue/lib/provider_capabilities.py polylogue/proof tests/unit/proof tests/unit/sources/test_schema_driven.py tests/infra/strategies/schema_driven.py
    mypy polylogue/lib/provider_capabilities.py polylogue/proof tests/unit/proof/test_schema_provider_obligations.py tests/infra/strategies/schema_driven.py
    devtools render-all --check
    pytest -q -n 0 tests/unit/sources/test_parser_crashlessness.py tests/property/test_schema_roundtrip.py tests/property/test_semantic_properties.py
    devtools verify --quick
    devtools verify
    

    All checks passed locally. Next step is the atomic commit and PR for this issue.

  5. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Final for this slice:

    • PR test: compile schema provider obligations #344 (test: compile schema provider obligations) merged into master.
    • Squash merge: 531d5cac1074c34ff63cf51c29d10f756f39b1a2.
    • Local master was fast-forwarded to the merge commit.
    • Feature branch feature/test/schema-provider-obligations was removed locally; the remote branch is gone.

    The acceptance slice covered:

    • three schema annotation families already compiled into obligations;
    • x-polylogue-values now driving schema generation and verification evidence;
    • provider capability metadata for codex, claude-code, and chatgpt;
    • provider capability subjects consumed by identity/partial-coverage claims;
    • explicit partial-coverage records for absent or partial reasoning, streaming, sidecar, and tool-use facets.
  6. added 4 commits that reference this issue on Apr 22, 2026
    aa8687c
    ccf3de9
    a9fbaa2
    e106f0a
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:parserarea:qaarea:schemaphase:migrationtheme:semantic-prooftheme:verifiabilitytype:test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions