Skip to content

refactor(proof): delete dead runners/traces and orphaned devtools verifiers (#1074) - #1074

Merged
Sinity merged 2 commits into
masterfrom
feature/refactor/verification-dead-code-removal
May 16, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/refactor/verification-dead-code-removal

Conversation

@Sinity

@Sinity Sinity commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

Deletes ~1,400 lines of dead verification code: 7 unused evidence runners, the traces.py module, 3 dead runner test files, 3 orphaned devtools verifier scripts that were never registered in the command catalog, and the proof_pack.main() entry point.

Problem

After the verifiability revamp, several proof-era artifacts became unreachable:

  • 7 of 10 evidence runners in runners.py had no callers outside their own tests
  • traces.py was only used by those dead runners
  • devtools/verify_connection_sites.py, verify_schema_annotations.py, verify_sql_templates.py were never added to command_catalog.py and had no test coverage
  • proof_pack.main() was no longer registered as a command (users now reach the same functionality via affected-obligations --full); one test was calling it directly

Solution

  • Strip 7 dead runners from runners.py, keep the 3 with live test callers (run_generated_scenario_evidence, run_provider_capability_evidence, run_schema_value_generation_evidence)
  • Delete traces.py entirely (all importers removed)
  • Delete test_evidence_runners.py, test_structural_error_evidence.py, test_trace_evidence.py (exclusively tested dead runners)
  • Delete devtools/verify_connection_sites.py, verify_schema_annotations.py, verify_sql_templates.py
  • Remove main() and unused imports from proof_pack.py; redirect the one test that called proof_pack.main() to affected_obligations.main(["--full", ...])
  • Remove traces.py from topology-target.yaml; regenerate topology-status.md
  • Fix stale "proof-pack check" label in test_verify.py (missing verify-ci-workflows step)

Verification

devtools verify --quick   # all 16 gates green (pre-push hook passed)
pytest tests/unit/proof/ tests/unit/devtools/test_proof_pack.py   # 112 passed

Ref #594

…ifiers

Dead code removed:
- polylogue/proof/runners.py: strip 7 of 10 evidence runners (semantic_query,
  artifact_path, maintenance_repair, quarantine_error, error_context,
  trace_equivalence, diagnostic_trace_mapping) — no callers outside deleted tests
- polylogue/proof/traces.py: delete entirely (only used by dead runners)
- tests/unit/proof/test_evidence_runners.py, test_structural_error_evidence.py,
  test_trace_evidence.py: delete — tested dead runners exclusively
- devtools/proof_pack.py: remove main() entry point (not in catalog; redirected
  one test caller to affected_obligations.main) and dead argparse/sys imports
- devtools/verify_connection_sites.py, verify_schema_annotations.py,
  verify_sql_templates.py: delete — not in command catalog, no callers, no tests

Manifest / topology:
- Remove traces.py from docs/plans/topology-target.yaml
- Regenerate docs/topology-status.md after deletion

Net: ~1 400 LOC deleted, 5 files removed, proof/__init__.py re-exports pruned.

Co-Authored-By: Claude <[email protected]>
@coderabbitai

coderabbitai Bot commented May 16, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 36 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a11d824b-7a4c-4a7c-aef8-0515bccb9f8f

📥 Commits

Reviewing files that changed from the base of the PR and between 53b817f and 595987a.

📒 Files selected for processing (17)
  • devtools/proof_pack.py
  • devtools/verify_connection_sites.py
  • devtools/verify_schema_annotations.py
  • devtools/verify_sql_templates.py
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/proof/__init__.py
  • polylogue/proof/runners.py
  • polylogue/proof/traces.py
  • tests/unit/devtools/test_proof_pack.py
  • tests/unit/devtools/test_verify.py
  • tests/unit/pipeline/test_quarantine_fixtures.py
  • tests/unit/proof/test_diffing.py
  • tests/unit/proof/test_evidence_runners.py
  • tests/unit/proof/test_structural_error_evidence.py
  • tests/unit/proof/test_trace_evidence.py
  • tests/unit/storage/test_query_parity.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/verification-dead-code-removal

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Replace 3 deleted proof-era runner contracts with direct pytest tests:

- test_query_parity.py: add provider-filter semantic laws —
  provider_ids ⊆ all_ids, count == len(list), and equivalent
  filter constructions return identical IDs. These pin the
  foundational subset/count invariants that run_semantic_query_evidence
  verified via the EvidenceEnvelope path.

- test_quarantine_fixtures.py: add quarantine privacy contract tests —
  parse_error must contain structural context only (line/column),
  never private payload text from the malformed record. Also pins
  that the zero-length error is a fixed structural description and
  that parse_error == error for both failure shapes.

Ref #1074

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Sinity

Sinity commented May 16, 2026

Copy link
Copy Markdown
Owner Author

Added behavioral replacement coverage before merge (per feedback).

595987a adds 5 tests replacing the contracts that were deleted:

  • test_query_parity.py: provider_filter_ids_are_subset_of_all_ids, provider_filter_count_matches_list_length, equivalent_provider_filter_constructions_return_identical_ids — pins the semantic laws that run_semantic_query_evidence verified via the EvidenceEnvelope path.

  • test_quarantine_fixtures.py: test_quarantine_error_does_not_leak_payload_text, test_zero_length_quarantine_error_contains_only_structural_description — pins the privacy contract that parse errors contain structural context only (line/column), never private payload text. Verified in code that the error format is "Malformed JSONL lines: 1 (first bad line 2: Expecting ',' delimiter: ...)" — structural only, no content.

Deferred (would require rebuilding deleted trace infrastructure):

  • run_trace_equivalence_evidence — partially covered by existing test_query_parity.py tests
  • run_diagnostic_trace_mapping_evidence — low priority, depended on ObservableTrace/ObservableDiagnosticMapping which are now gone

All 5 new tests pass, all 16 quick-verify gates green.

@Sinity
Sinity merged commit 3fabd9e into master May 16, 2026
4 checks passed
@Sinity
Sinity deleted the feature/refactor/verification-dead-code-removal branch May 16, 2026 07:10
Sinity added a commit that referenced this pull request May 16, 2026
…ces (#1065 #594) (#1083)

## Summary

Pack C of #1065 — retire the proof-era operator entry points now that
Pack A
renamed report headings and Pack B added artifact-source grouping. The
`devtools proof-pack` library and `devtools affected-obligations`
command are
replaced with `devtools verification-impact` and a `verification_impact`
module
that delegates the same diff-shaped report. No backwards-compat aliases.

## Problem

After Pack A/B, the operator surface still said "proof-pack" /
"affected-obligations" even though the report headings and grouping had
been
moved to standard verification terminology. The terminology kept users
confused about what guarantee the report actually provides — it
summarizes
catalog-routed checks, not mathematical proofs. The `devtools verify`
baseline also still ran an `affected-obligations check` step, exporting
the
old name through git hooks and PR comments.

## Solution

- Rename `devtools/proof_pack.py` → `devtools/verification_impact.py`,
  `build_proof_pack` → `build_verification_impact_report`.
- Rename `devtools/affected_obligations.py` →
`devtools/verification_impact_cli.py`.
- Rename CLI command `affected-obligations` → `verification-impact` in
  `devtools/command_catalog.py` (with help/description updated to drop
  "proof-pack" language).
- Rename verify baseline step `affected-obligations check` →
  `verification-impact check` (and the `--commit` tier help text).
- Update changed-path routing in `polylogue/proof/diffing.py` to
recommend
  `devtools verification-impact` and point at the renamed test files.
- Update CLAUDE.md / CONTRIBUTING.md "Proof Pack workflow" section to
"Verification Impact workflow"; the markdown report heading was already
  "## Polylogue Verification Impact" from Pack A.
- Update catalog claim wording in `polylogue/proof/catalog.py` to talk
about
the verification catalog and changed-path routing instead of "proof-pack
  routing" / "proof-pack known-gap rendering".
- Fix inherited proof_catalog routing tests in
  `tests/unit/proof/test_diffing_runtime.py` that were left red after
PR #1079 narrowed the claim-file fan-out (used `diffing.py` as a fan-out
example; the test now uses `catalog.py`, which is a claim-defining file,
  and expects the new infrastructure reason text).

No `obligation-diff` command existed in the tree — only a stale
CHANGELOG
reference. No CI workflow invoked `devtools proof-pack`
(proof-comment.yml
is currently a no-op).

The library symbol `affected_obligations` (a dataclass field on
`AffectedObligationReport`) is still used inside
`polylogue/proof/diffing.py`.
That is an internal substrate name, not the operator-facing surface;
renaming
it is out of scope for this PR.

#594 catalog-row pruning is a deeper survey of
`polylogue/proof/catalog.py`
that was not done here; the catalog surface still exists and PR #1069 /
#1074
already retired CLI proof runners and dead runners.

## Verification

```
nix develop -c devtools render-all --check
nix develop -c devtools verify --quick   # exit 0 (30s)
nix develop -c pytest tests/unit/devtools/test_verification_impact.py \
                       tests/unit/devtools/test_verification_impact_cli.py \
                       tests/unit/devtools/test_verify.py \
                       tests/unit/devtools/test_devtools_main.py \
                       tests/unit/devtools/test_render_devtools_reference.py \
                       tests/unit/proof/ \
                       tests/unit/verification/test_breakers.py -q
# -> 134 passed, 1 xfailed
nix develop -c devtools verification-impact --json --path docs/verification-catalog.md
# -> emits the same report shape under the new command name
```

The generated `docs/devtools.md` table now lists `devtools
verification-impact`
in both the Verification-Lab Surface block and the Verification command
table.

Pre-existing failing tests in
`tests/unit/devtools/test_benchmark_campaign.py`
and `tests/unit/devtools/test_scenario_projections.py` (benchmark
scenario
catalog drift) are unchanged by this PR and outside its surface area.

Closes #1065
Ref #594

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant