Repository navigation
refactor(core): move outcome grammar out of lib - #664
Conversation
Polylogue Proof PackRefs: Affected Domains
Required Gates
Known Gaps
Oracle / Cost
|
|
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 (38)
📝 WalkthroughWalkthroughThis PR relocates outcome types ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Pull request overview
Moves the shared “outcome” result grammar (status/check/report types) into the core primitives layer so cross-cutting verification/readiness/reporting code depends on polylogue.core instead of polylogue.lib.
Changes:
- Added
polylogue.core.outcomeswithOutcomeStatus,OutcomeCheck,OutcomeCounts, andOutcomeReport. - Updated runtime and test imports across showcase/proof/schemas/readiness/devtools/CLI to use
polylogue.core.outcomes. - Updated topology plan + generated topology status to reflect the move.
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/showcase/test_report.py | Update imports to polylogue.core.outcomes. |
| tests/unit/showcase/test_qa_workflow_runtime.py | Update imports to polylogue.core.outcomes. |
| tests/unit/showcase/test_qa_runner.py | Update imports to polylogue.core.outcomes. |
| tests/unit/showcase/test_operator_reporting_runtime.py | Update imports to polylogue.core.outcomes. |
| tests/unit/showcase/test_invariants_runtime.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_trace_evidence.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_structural_error_evidence.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_schema_provider_obligations.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_models.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_generated_scenario_obligations.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_evidence_runners.py | Update imports to polylogue.core.outcomes. |
| tests/unit/proof/test_catalog.py | Update imports to polylogue.core.outcomes. |
| tests/unit/lib/test_outcomes.py | Point outcomes tests at polylogue.core.outcomes. |
| tests/unit/devtools/test_semantic_axis_evidence.py | Update imports to polylogue.core.outcomes. |
| tests/unit/devtools/test_schema_lab_commands.py | Update imports to polylogue.core.outcomes. |
| tests/unit/core/test_audit.py | Update imports to polylogue.core.outcomes. |
| tests/unit/cli/test_schema_helper_runtime.py | Update imports to polylogue.core.outcomes. |
| tests/unit/cli/test_deterministic_output.py | Update imports to polylogue.core.outcomes. |
| tests/unit/cli/test_check_rendering_plain_runtime.py | Update imports to polylogue.core.outcomes. |
| tests/unit/archive/test_query_miss_diagnostics.py | Update imports to polylogue.core.outcomes. |
| polylogue/showcase/report_common.py | Update imports to polylogue.core.outcomes. |
| polylogue/showcase/qa_runner_models.py | Update imports to polylogue.core.outcomes. |
| polylogue/showcase/qa_markdown.py | Update imports to polylogue.core.outcomes. |
| polylogue/showcase/invariants.py | Update imports to polylogue.core.outcomes. |
| polylogue/schemas/audit/workflow.py | Update imports to polylogue.core.outcomes. |
| polylogue/schemas/audit/models.py | Update imports to polylogue.core.outcomes. |
| polylogue/schemas/audit/checks.py | Update imports to polylogue.core.outcomes. |
| polylogue/readiness/init.py | Update imports/re-exports to source outcomes from core. |
| polylogue/proof/runners.py | Update imports to polylogue.core.outcomes. |
| polylogue/proof/rendering.py | Update imports to polylogue.core.outcomes. |
| polylogue/proof/models.py | Update imports to polylogue.core.outcomes. |
| polylogue/proof/catalog.py | Update imports to polylogue.core.outcomes. |
| polylogue/maintenance/targets.py | Update imports to polylogue.core.outcomes. |
| polylogue/core/outcomes.py | New canonical implementation of shared outcome grammar under core. |
| docs/topology-status.md | Update generated counts for core-primitive / primitives after the move. |
| docs/plans/topology-target.yaml | Declare polylogue/core/outcomes.py under core-primitive and remove polylogue/lib/outcomes.py. |
| devtools/semantic_axis_evidence.py | Update imports to polylogue.core.outcomes. |
| devtools/build_topology_projection.py | Remove outcomes.py from LIB_ROOT_PRIMITIVES list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Summary Move shared outcome status/report types from `polylogue.lib.outcomes` to `polylogue.core.outcomes`. ## Problem `OutcomeStatus`, `OutcomeCheck`, and `OutcomeReport` are cross-cutting result grammar used by readiness, maintenance, proof, schema audits, devtools, CLI rendering, and verification scenarios. Keeping them under `lib` made a central contract look like miscellaneous helper code. ## Solution Rename `polylogue/lib/outcomes.py` to `polylogue/core/outcomes.py`, update proof/readiness/schema/showcase/devtools/test imports, refresh topology, and keep no old-path shim. ## Verification - `devtools build-topology-projection && devtools verify-topology` — realized=697 declared=697 blocking=False - `ruff check polylogue/ tests/ devtools/` — all checks passed - `mypy polylogue/` — no issues found in 697 source files - `pytest -q tests/unit/lib/test_outcomes.py tests/unit/core/test_health_core.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_deterministic_output.py tests/unit/proof/test_models.py tests/unit/proof/test_catalog.py tests/unit/proof/test_evidence_runners.py tests/unit/devtools/test_semantic_axis_evidence.py` — 93 passed - `devtools render-all --check` — sync OK - pre-push `devtools verify --quick` — all checks passed Ref #635
Summary
Move shared outcome status/report types from
polylogue.lib.outcomestopolylogue.core.outcomes.Problem
OutcomeStatus,OutcomeCheck, andOutcomeReportare cross-cutting result grammar used by readiness, maintenance, proof, schema audits, devtools, CLI rendering, and verification scenarios. Keeping them underlibmade a central contract look like miscellaneous helper code.Solution
Rename
polylogue/lib/outcomes.pytopolylogue/core/outcomes.py, update proof/readiness/schema/showcase/devtools/test imports, refresh topology, and keep no old-path shim.Verification
devtools build-topology-projection && devtools verify-topology— realized=697 declared=697 blocking=Falseruff check polylogue/ tests/ devtools/— all checks passedmypy polylogue/— no issues found in 697 source filespytest -q tests/unit/lib/test_outcomes.py tests/unit/core/test_health_core.py tests/unit/cli/test_check_rendering_plain_runtime.py tests/unit/cli/test_deterministic_output.py tests/unit/proof/test_models.py tests/unit/proof/test_catalog.py tests/unit/proof/test_evidence_runners.py tests/unit/devtools/test_semantic_axis_evidence.py— 93 passeddevtools render-all --check— sync OKdevtools verify --quick— all checks passedRef #635
Summary by CodeRabbit
Release Notes
Refactor
Documentation