Skip to content

feat: add proof-obligation kernel and verification catalog #192

Closed

Description

@Sinity

Parent

Part of #330.

Context

Polylogue has several verification registries and runners, but no single proof language. The first implementation must add the kernel that other verification work compiles into. Do not start with command moves, mass test migration, or a new lab CLI.

The corrected root model is below. Scenario/corpus/workload/oracle ideas remain useful as subject sources or runner inputs, but the durable root is:

SubjectRef -> Claim -> RunnerBinding -> ProofObligation -> EvidenceEnvelope

Scope

Add importable proof primitives and the rendered catalog:

  • SourceSpan: file/path/symbol provenance for discovered subjects.
  • SubjectRef: verifiable object with kind, id, attrs, and source span.
  • SubjectQuery: small serializable AST (Kind, AttrEq, AttrIn, AttrContains, And, Or, Not).
  • Claim: semantic property over subject queries, with evidence schema, bug classes, and optional breaker metadata.
  • RunnerBinding: claim runner with cost tier, freshness policy, and environment contract.
  • ProofObligation: compiled (subject, claim, runner) instance.
  • EvidenceEnvelope: status, evidence, counterexample, reproducer, artifacts, environment, provenance, fingerprint, and trust metadata.
  • devtools render-verification-catalog and --check.

First vertical slice

  • Compile command subjects from polylogue/cli/command_inventory.py::iter_command_paths().
  • Compile schema-annotation subjects for x-polylogue-values, x-polylogue-foreign-keys, and x-polylogue-mutually-exclusive.
  • Add command claims for help/no-traceback/plain-mode.
  • Add schema claims for value closure, foreign-key resolution, and mutual exclusion.
  • Add breaker/bug-class metadata to serious claims and render missing breakers visibly.
  • Add Invariant.to_claim() only as a compatibility bridge from showcase invariants; do not move showcase/.

Non-goals

  • No polylogue-lab CLI in this issue.
  • No Exercise/Demo rename.
  • No showcase/ relocation.
  • No benchmark-platform replacement.
  • No live archive dependency.
  • No collapse of Claim, RunnerBinding, and ProofObligation into one temporary class.

Acceptance criteria

  • A catalog renders command subjects, selected schema-annotation subjects, claims, runner bindings, and proof obligations.
  • Anti-omission tests fail on an unclaimed visible command or selected annotation.
  • Evidence envelopes include trust metadata and runner environment contracts.
  • Serious claims expose bug classes and breaker metadata or visible tracked exceptions.
  • Catalog self-quality checks expose missing source spans, stale trust metadata, missing breakers, and zero-subject non-abstract claims.
  • Existing showcase behavior remains intact.

Activity

  1. added
    type:refactor
    on Apr 16, 2026
  2. Sinity commented on Apr 21, 2026

    @Sinity
    OwnerAuthor

    Design update:

    The original "build a scenario registry" scope is partly covered by landed substrate work. Interpret this issue as:

    • AssertionSpec, ExecutionSpec, ExecutableScenario, CorpusSpec, scenario projections, and authored scenario catalog now exist in first form.
    • The remaining work is not another parallel registry. It is richer scenario source modeling and compilers that make validation lanes, benchmarks, showcase/QA, and regression capture more aggressively scenario-derived.
    • Highest-leverage follow-ups are invariant families, differential checks, richer corpus/workload/assertion specs, and stronger devtools control-plane maps.

    Keep #192 and #196 as the durable planning surfaces for these details.

  3. changed the title [-]refactor: unify verification under ScenarioSpec compilation[/-] [+]refactor: make ScenarioSpec the schema-native proof root[/+] on Apr 21, 2026
  4. added
    theme:verifiability
    phase:migration
    on Apr 21, 2026
  5. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Design update: #330 now owns the proof-obligation kernel model.

    The durable target is SubjectRef -> Claim -> RunnerBinding -> ProofObligation -> EvidenceEnvelope. Scenario/corpus/workload/oracle/projection concepts remain useful as subject sources and runner inputs, but they are supporting vocabulary rather than the core model. This issue now serves as Epic 0 for the proof-obligation kernel and catalog so the existing sub-issue relationship stays useful.

  6. changed the title [-]refactor: make ScenarioSpec the schema-native proof root[/-] [+]feat: add proof-obligation kernel and verification catalog[/+] on Apr 22, 2026
  7. added
    type:feat
    phase:architecture
    theme:proof-kernel
    theme:evidence-trust
    and removed
    type:refactor
    phase:migration
    on Apr 22, 2026
  8. 1 remaining item

  9. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Checkpoint on feature/feat/proof-obligation-kernel:

    • Added the importable polylogue.proof kernel with SourceSpan, SubjectRef, query AST nodes, Claim, RunnerBinding, ProofObligation, and EvidenceEnvelope carrying trust metadata.
    • Compiled first-slice subjects from visible Click commands and selected packaged-schema annotations (x-polylogue-values, x-polylogue-foreign-keys, x-polylogue-mutually-exclusive).
    • Added initial command/schema claims, static runner environment contracts, catalog self-quality checks, and devtools render-verification-catalog with --check/--json.
    • Regenerated generated surfaces including docs/verification-catalog.md.

    Local verification so far:

    pytest -q -n 0 tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_generated_surfaces.py
    devtools verify --quick

    Both pass. Full pytest gate still pending before PR.

  10. Sinity commented on Apr 22, 2026

    @Sinity
    OwnerAuthor

    Final checkpoint for #192:

    Merged PR #342 as squash commit e8c5e2e675fb12673516d3b6847740759f79debc.

    Delivered scope:

    • importable polylogue.proof proof-obligation kernel
    • command and selected schema-annotation subject compilers
    • first command/schema claim set and static runner bindings
    • evidence/trust/environment metadata primitives
    • catalog self-quality checks
    • Invariant.to_claim() showcase bridge
    • devtools render-verification-catalog with --check and --json
    • generated docs/verification-catalog.md

    Final local verification passed:

    devtools verify

    CI was still pending/unstable when merged, per the local verification result and current quota constraints.

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:devtoolsarea:qaphase:architecturetheme:evidence-trusttheme:proof-kerneltheme:verifiabilitytype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions