Repository navigation
feat: add proof-obligation catalog - #342
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (19)
📝 WalkthroughWalkthroughThis PR establishes a proof-obligation kernel with verifiable object discovery, claim definitions, runner bindings, and quality validation. It adds CLI support to compile and render a verification catalog from command subjects, schema annotations, and proof obligations. Changes
Sequence Diagram(s)sequenceDiagram
actor CLI as CLI User
participant RVC as render_verification_catalog
participant SubjDisc as Subject Discovery
participant CatalogBld as Catalog Builder
participant QualityChk as Quality Checks
participant Renderer as Markdown Renderer
participant FileIO as File I/O
CLI->>RVC: main(["--check"])
RVC->>SubjDisc: command_subjects() + schema_annotation_subjects()
SubjDisc-->>RVC: tuple[SubjectRef, ...]
RVC->>CatalogBld: build_verification_catalog()
CatalogBld->>CatalogBld: compile_obligations(subjects, claims, bindings)
CatalogBld-->>RVC: VerificationCatalog
RVC->>QualityChk: catalog_quality_checks(catalog)
QualityChk-->>RVC: tuple[OutcomeCheck, ...]
RVC->>Renderer: build_catalog_markdown(catalog)
Renderer-->>RVC: markdown_string
RVC->>FileIO: read existing file
FileIO-->>RVC: existing_content
RVC->>RVC: compare rendered vs. existing
alt Content matches
RVC-->>CLI: exit(0) "sync OK"
else Content differs
RVC->>FileIO: write rendered markdown
RVC-->>CLI: exit(1) "out of sync"
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 903bd3ba6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Closes #192 ## Summary - Add the importable `polylogue.proof` kernel for subjects, claims, runner bindings, proof obligations, and evidence envelopes. - Compile first-slice catalog subjects from visible CLI commands and selected packaged-schema annotations. - Add `devtools render-verification-catalog` plus generated documentation and focused proof/devtools tests. ## Problem Polylogue had verification registries and runners, but no shared proof vocabulary tying verifiable subjects, semantic claims, runner contracts, obligations, and evidence metadata together. That made follow-on work prone to one-off validation machinery instead of compiling into a durable catalog. ## Solution The new `polylogue.proof` package defines `SourceSpan`, `SubjectRef`, the serializable `SubjectQuery` AST (`Kind`, `AttrEq`, `AttrIn`, `AttrContains`, `And`, `Or`, `Not`), `Claim`, `RunnerBinding`, `ProofObligation`, `EvidenceEnvelope`, and trust/environment metadata. The catalog compiler now discovers command subjects from `polylogue/cli/command_inventory.py::iter_command_paths()` and schema annotation subjects for `x-polylogue-values`, `x-polylogue-foreign-keys`, and `x-polylogue-mutually-exclusive`. The first claim set covers command help/no-traceback/plain-mode contracts and schema value-closure/foreign-key/mutual-exclusion contracts. Catalog self-quality checks expose missing source spans, stale or incomplete runner trust metadata, missing serious-claim bug classes, missing breakers or tracked exceptions, and zero-subject non-abstract claims. The showcase layer stays in place and only gains `Invariant.to_claim()` as the compatibility bridge. `devtools render-verification-catalog` renders `docs/verification-catalog.md`, supports `--check` and `--json`, and is wired into `devtools render-all`, the docs map, and the devtools command catalog. ## Verification ```bash 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 pytest -q -n 0 tests/unit/devtools/test_project_motd.py tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py devtools verify --quick devtools verify ``` The final `devtools verify` passed locally. The push hook also reran `devtools verify --quick` successfully.
Polylogue had verification registries and runners, but no shared proof vocabulary tying verifiable subjects, semantic claims, runner contracts, obligations, and evidence metadata together. Follow-on work was prone to one-off validation machinery instead of compiling into a durable catalog. Adds the importable `polylogue.proof` kernel for subjects, claims, runner bindings, proof obligations, and evidence envelopes. The package defines `SourceSpan`, `SubjectRef`, the serializable `SubjectQuery` AST (`Kind`, `AttrEq`, `AttrIn`, `AttrContains`, `And`, `Or`, `Not`), `Claim`, `RunnerBinding`, `ProofObligation`, `EvidenceEnvelope`, and trust/environment metadata. The catalog compiler discovers command subjects from `cli/command_inventory.py::iter_command_paths()` and schema annotation subjects for `x-polylogue-values`, `x-polylogue-foreign-keys`, and `x-polylogue-mutually-exclusive`. First claim set covers command help/no-traceback/plain-mode contracts and schema value-closure/foreign-key/mutual-exclusion contracts. Catalog self-quality checks expose missing source spans, stale or incomplete runner trust metadata, missing serious-claim bug classes, missing breakers or tracked exceptions, and zero-subject non-abstract claims. The showcase layer stays in place and only gains `Invariant.to_claim()` as the compatibility bridge. `devtools render-verification-catalog` renders `docs/verification-catalog.md`, supports `--check` and `--json`, and is wired into `devtools render-all`, the docs map, and the devtools command catalog. Verification: pytest over `tests/unit/proof` and devtools render / command-catalog / generated-surfaces / motd suites; devtools verify --quick and verify green. Closes #192
Polylogue had verification registries and runners, but no shared proof vocabulary tying verifiable subjects, semantic claims, runner contracts, obligations, and evidence metadata together. Follow-on work was prone to one-off validation machinery instead of compiling into a durable catalog. Adds the importable `polylogue.proof` kernel for subjects, claims, runner bindings, proof obligations, and evidence envelopes. The package defines `SourceSpan`, `SubjectRef`, the serializable `SubjectQuery` AST (`Kind`, `AttrEq`, `AttrIn`, `AttrContains`, `And`, `Or`, `Not`), `Claim`, `RunnerBinding`, `ProofObligation`, `EvidenceEnvelope`, and trust/environment metadata. The catalog compiler discovers command subjects from `cli/command_inventory.py::iter_command_paths()` and schema annotation subjects for `x-polylogue-values`, `x-polylogue-foreign-keys`, and `x-polylogue-mutually-exclusive`. First claim set covers command help/no-traceback/plain-mode contracts and schema value-closure/foreign-key/mutual-exclusion contracts. Catalog self-quality checks expose missing source spans, stale or incomplete runner trust metadata, missing serious-claim bug classes, missing breakers or tracked exceptions, and zero-subject non-abstract claims. The showcase layer stays in place and only gains `Invariant.to_claim()` as the compatibility bridge. `devtools render-verification-catalog` renders `docs/verification-catalog.md`, supports `--check` and `--json`, and is wired into `devtools render-all`, the docs map, and the devtools command catalog. Verification: pytest over `tests/unit/proof` and devtools render / command-catalog / generated-surfaces / motd suites; devtools verify --quick and verify green. Closes #192
Polylogue had verification registries and runners, but no shared proof vocabulary tying verifiable subjects, semantic claims, runner contracts, obligations, and evidence metadata together. Follow-on work was prone to one-off validation machinery instead of compiling into a durable catalog. Adds the importable `polylogue.proof` kernel for subjects, claims, runner bindings, proof obligations, and evidence envelopes. The package defines `SourceSpan`, `SubjectRef`, the serializable `SubjectQuery` AST (`Kind`, `AttrEq`, `AttrIn`, `AttrContains`, `And`, `Or`, `Not`), `Claim`, `RunnerBinding`, `ProofObligation`, `EvidenceEnvelope`, and trust/environment metadata. The catalog compiler discovers command subjects from `cli/command_inventory.py::iter_command_paths()` and schema annotation subjects for `x-polylogue-values`, `x-polylogue-foreign-keys`, and `x-polylogue-mutually-exclusive`. First claim set covers command help/no-traceback/plain-mode contracts and schema value-closure/foreign-key/mutual-exclusion contracts. Catalog self-quality checks expose missing source spans, stale or incomplete runner trust metadata, missing serious-claim bug classes, missing breakers or tracked exceptions, and zero-subject non-abstract claims. The showcase layer stays in place and only gains `Invariant.to_claim()` as the compatibility bridge. `devtools render-verification-catalog` renders `docs/verification-catalog.md`, supports `--check` and `--json`, and is wired into `devtools render-all`, the docs map, and the devtools command catalog. Verification: pytest over `tests/unit/proof` and devtools render / command-catalog / generated-surfaces / motd suites; devtools verify --quick and verify green. Closes #192
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Closes #192
Summary
polylogue.proofkernel for subjects, claims, runner bindings, proof obligations, and evidence envelopes.devtools render-verification-catalogplus generated documentation and focused proof/devtools tests.Problem
Polylogue had verification registries and runners, but no shared proof vocabulary tying verifiable subjects, semantic claims, runner contracts, obligations, and evidence metadata together. That made follow-on work prone to one-off validation machinery instead of compiling into a durable catalog.
Solution
The new
polylogue.proofpackage definesSourceSpan,SubjectRef, the serializableSubjectQueryAST (Kind,AttrEq,AttrIn,AttrContains,And,Or,Not),Claim,RunnerBinding,ProofObligation,EvidenceEnvelope, and trust/environment metadata. The catalog compiler now discovers command subjects frompolylogue/cli/command_inventory.py::iter_command_paths()and schema annotation subjects forx-polylogue-values,x-polylogue-foreign-keys, andx-polylogue-mutually-exclusive.The first claim set covers command help/no-traceback/plain-mode contracts and schema value-closure/foreign-key/mutual-exclusion contracts. Catalog self-quality checks expose missing source spans, stale or incomplete runner trust metadata, missing serious-claim bug classes, missing breakers or tracked exceptions, and zero-subject non-abstract claims. The showcase layer stays in place and only gains
Invariant.to_claim()as the compatibility bridge.devtools render-verification-catalogrendersdocs/verification-catalog.md, supports--checkand--json, and is wired intodevtools render-all, the docs map, and the devtools command catalog.Verification
The final
devtools verifypassed locally. The push hook also rerandevtools verify --quicksuccessfully.