Skip to content

fix(proof): reduce proof-pack review noise - #689

Merged
Sinity merged 2 commits into
masterfrom
feature/fix/proof-pack-report-quality
May 2, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/fix/proof-pack-report-quality

Conversation

@Sinity

@Sinity Sinity commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

Improves the Proof Pack PR report so it is usable as a review-routing artifact instead of a noisy checklist dump, and documents how Polylogue agents should consume it.

Problem

Recent Proof Pack comments were useful in principle but hard to act on in practice. They mixed focused checks, required PR gates, and optional deployment confidence checks under one heading; surfaced zero-claim domains as if they were equally affected; dumped broad known gaps into unrelated PRs; and used stale evidence for a bucket that actually means stable affected obligations, not freshness/SLA failure.

Solution

  • Documented the intended Proof Pack workflow in CLAUDE.md.
  • Split rendered gates into focused gates, required PR gates, and optional confidence gates.
  • Collapsed zero-claim routed domains behind a details block.
  • Kept visible known gaps to domains with affected claims, with zero-claim-domain gaps collapsed separately.
  • Renamed the proof diff bucket and report payload from stale evidence to stable affected obligations.
  • Updated proof-pack and affected-obligation tests to cover the new report shape.

Verification

  • ruff format devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py
  • ruff check devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py
  • mypy polylogue/
  • pytest -q tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py tests/unit/devtools/test_obligation_diff.py tests/unit/devtools/test_affected_obligations.py
  • devtools proof-pack --path polylogue/proof/catalog.py --markdown
  • devtools proof-pack --path docs/plans/layering.yaml --markdown
  • devtools render-all --check
  • devtools verify --quick

Ref #594
Ref #635

Sinity added 2 commits May 2, 2026 06:45
Problem: Polylogue PRs emit Proof Pack reports, but local agent instructions did not say how to use them, which made it too easy to ignore noisy or misleading reports instead of triaging them.\n\nWhat changed: documented Proof Pack as a verification impact report, including how to use required gates, nonzero affected domains, known gaps, and the current stale-evidence bucket during PR verification.\n\nVerification: devtools render-agents --input CLAUDE.md --output AGENTS.md.\n\nRef #594\nRef #635
Problem: Proof Pack comments were technically useful but too noisy for PR review: zero-claim domains looked as important as affected claim domains, deployment confidence checks appeared required, broad known gaps dominated unrelated PRs, and the stale-evidence label implied freshness semantics the implementation does not provide.\n\nWhat changed: grouped gates into focused, required PR, and optional confidence sections; collapsed zero-claim domains and their gaps; kept visible known gaps to domains with affected claims; renamed the diff bucket to stable affected obligations in payloads and rendered reports; and updated Polylogue agent guidance to use the refined report semantics.\n\nVerification: ruff format/check on touched Python files; mypy polylogue/; pytest -q tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py tests/unit/devtools/test_obligation_diff.py tests/unit/devtools/test_affected_obligations.py; devtools proof-pack --path polylogue/proof/catalog.py --markdown; devtools proof-pack --path docs/plans/layering.yaml --markdown; devtools render-all --check; devtools verify --quick.\n\nRef #594
Copilot AI review requested due to automatic review settings May 2, 2026 04:52
@coderabbitai

coderabbitai Bot commented May 2, 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 16 minutes and 49 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: 2fa6622e-7326-4060-9df9-87a658598793

📥 Commits

Reviewing files that changed from the base of the PR and between 1ae3b2e and 1c5b20b.

📒 Files selected for processing (6)
  • CLAUDE.md
  • devtools/proof_pack.py
  • polylogue/proof/diffing.py
  • tests/unit/devtools/test_proof_pack.py
  • tests/unit/proof/test_diffing.py
  • tests/unit/proof/test_diffing_runtime.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/proof-pack-report-quality

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
Review rate limit: 0/1 reviews remaining, refill in 16 minutes and 49 seconds.

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

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Polylogue Proof Pack

Refs: origin/master..HEAD
Changed paths: 6

Affected Domains

  • architecture_discipline — 4 claim(s), maturity growing
  • operational_resilience — 14 claim(s), maturity seed
  • schema_correctness — 1 claim(s), maturity growing
  • spec_completeness — 3 claim(s), maturity seed
  • surface_parity — 1 claim(s), maturity nascent
  • test_quality — 1 claim(s), maturity growing
  • unclassified — 18 claim(s), maturity seed
Additional routed domains with zero affected claims
  • benchmark_coverage — maturity seed
  • cli_surface — maturity established
  • distribution — maturity seed
  • docs_media — maturity seed
  • migration_safety — maturity nascent
  • mutation_coverage — maturity growing
  • performance — maturity nascent
  • pipeline_correctness — maturity growing
  • provider_coverage — maturity growing
  • scenario_coverage — maturity nascent
  • security_privacy — maturity nascent
  • site_publication — maturity seed
  • spec_accuracy — maturity seed
  • storage_correctness — maturity established

Focused Gates

  • pytest tests/unit/devtools/test_command_catalog.py — workflow/control-plane contract changed
  • devtools render-all --check — workflow docs may feed generated surfaces
  • pytest tests/unit/proof — proof kernel or catalog changed
  • pytest tests/unit/devtools/test_render_verification_catalog.py — catalog renderer changed
  • devtools render-verification-catalog --check — verification catalog must stay current

Required PR Gates

  • devtools verify --quick — full PR gate remains explicit
  • devtools verify — full PR gate remains explicit

Optional Confidence Gates

  • devtools build-package — deployment readiness gate; run when packaging or release confidence matters
  • nix flake check — deployment readiness gate; run when packaging or release confidence matters

Known Gaps

  • test_quality: direct_coverage: Coverage per-module not tracked (only aggregate fail_under) [owner: test-quality; next: Add measurable quality gate for this dimension], flakiness: No systematic flakiness tracking, CI retry, or quarantine [owner: test-quality; next: Add measurable quality gate for this dimension], fuzz: Atheris fuzz targets not run in CI [owner: test-quality; next: Add measurable quality gate for this dimension], mock_depth: Mock depth not measured or enforced [owner: test-quality; next: Add measurable quality gate for this dimension]
Additional gaps in zero-claim routed domains
  • distribution: dev_install: Not verified in CI; devshell is canonical environment [owner: distribution; next: Add package/build or cross-artifact CI gate], distribution: No scenario for install/package verification [owner: scenario-coverage; next: Add scenario family or generated projection for this subject], install_parity: No cross-artifact equivalence verification (wheel vs sdist vs Nix) [owner: distribution; next: Add package/build or cross-artifact CI gate], macos: No macOS CI runner [owner: distribution; next: Add package/build or cross-artifact CI gate], sdist: Not built or tested in CI [owner: distribution; next: Add package/build or cross-artifact CI gate], wheel: Not built or tested in CI [owner: distribution; next: Add package/build or cross-artifact CI gate], windows: No Windows CI runner [owner: distribution; next: Add package/build or cross-artifact CI gate]
  • docs_media: docs_media: No scenario for documentation freshness verification [owner: scenario-coverage; next: Add scenario family or generated projection for this subject], docs_media: README examples and media are not yet generated from executable scenario projections. [owner: docs-media; next: Add executable scenario projection or media integrity gate], docs_media: Screenshots and VHS media have no committed nonblank/readability verification. [owner: docs-media; next: Add executable scenario projection or media integrity gate]
  • migration_safety: migration_safety: No scenario for migration safety verification [owner: scenario-coverage; next: Add scenario family or generated projection for this subject]
  • performance: performance: No scenario family exercising memory or throughput budgets [owner: scenario-coverage; next: Add scenario family or generated projection for this subject]
  • security_privacy: dependency_audit: No dependency vulnerability scanning in CI [owner: security-privacy; next: Add dedicated security/privacy gate for this area], file_permissions: Crawl-source file permissions not verified [owner: security-privacy; next: Add dedicated security/privacy gate for this area], secrets_detection: No automated secrets scanning in CI [owner: security-privacy; next: Add dedicated security/privacy gate for this area], security_privacy: Security verification uses unit tests, not scenario specs [owner: scenario-coverage; next: Add scenario family or generated projection for this subject], xss_prevention: No dedicated XSS test file; relies on snapshot rendering [owner: security-privacy; next: Add dedicated security/privacy gate for this area]
  • site_publication: site_publication: Static-site publication has no visual or hyperlink integrity gate. [owner: docs-media; next: Add executable scenario projection or media integrity gate]
  • storage_correctness: storage_correctness: No dedicated scenario family for storage-layer verification [owner: scenario-coverage; next: Add scenario family or generated projection for this subject]

Oracle / Cost

  • oracle mix: {"construction_sanity": 509, "drift_check": 5, "manual_review": 1, "proof": 37, "smoke": 12}
  • cost tier: {"static": 548, "unit": 16}
  • stable affected obligations: 564
  • manual review cells: 1

@Sinity

Sinity commented May 2, 2026

Copy link
Copy Markdown
Owner Author

Automated review triage after opening:

  • Proof Pack: actionable. It suggested focused gates for command-catalog docs and the full proof unit suite. I ran:
    • pytest -q tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_render_verification_catalog.py tests/unit/proof
    • result: 92 passed in 37.64s
  • Proof Pack report shape: matches the intended improvement. Focused/required/optional gates are separate, zero-claim domains are collapsed, broad known gaps are collapsed, and the misleading stale evidence label is gone.
  • CodeRabbit: no substantive review available due rate limiting; classified as tool limitation, not actionable code feedback.
  • Copilot: no review posted yet at this check.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refines the Proof Pack report to be a practical PR review-routing artifact by restructuring gate output, reducing zero-claim domain noise, and renaming the “stale evidence” diff bucket to reflect its actual meaning.

Changes:

  • Renamed the obligation-diff bucket/payload field from stale_evidence to stable_affected (and surfaced it in proof-pack as stable_affected_obligations).
  • Split gates into explicit groups (focused, required PR, optional_confidence) and updated markdown rendering to collapse zero-claim routed domains/gaps.
  • Updated unit tests to validate the new report schema and markdown headings.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
polylogue/proof/diffing.py Renames diff status/bucket and payload key to stable_affected.
devtools/proof_pack.py Reworks report schema (gate grouping, known-gap visibility split) and markdown/human render output.
tests/unit/devtools/test_proof_pack.py Updates/extends tests for new proof-pack JSON shape and markdown headings/collapsing behavior.
tests/unit/proof/test_diffing.py Updates diffing test expectation to stable_affected.
tests/unit/proof/test_diffing_runtime.py Updates runtime diffing test expectation to stable_affected.
CLAUDE.md Documents intended Proof Pack workflow for agents/reviewers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md
Comment on lines +40 to +45
- Read the `Required Gates` before choosing verification. Run the gates that
match the touched files, or state in the PR why a suggested gate is only an
optional confidence gate for that change.
- Use nonzero affected domains and claims to decide which focused tests or
proof-law suites to run. Ignore zero-claim domain noise unless the changed
files genuinely belong to that domain.
Comment thread devtools/proof_pack.py
(*affected.inner_loop_checks, *affected.pr_gates, *affected.deployment_gates)
),
"gate_groups": gate_groups,
"required_gates": _checks_payload((*affected.inner_loop_checks, *affected.pr_gates)),
@Sinity
Sinity merged commit 365b736 into master May 2, 2026
18 checks passed
@Sinity
Sinity deleted the feature/fix/proof-pack-report-quality branch May 2, 2026 05:07
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Improves the Proof Pack PR report so it is usable as a review-routing artifact instead of a noisy checklist dump, and documents how Polylogue agents should consume it.

## Problem

Recent Proof Pack comments were useful in principle but hard to act on in practice. They mixed focused checks, required PR gates, and optional deployment confidence checks under one heading; surfaced zero-claim domains as if they were equally affected; dumped broad known gaps into unrelated PRs; and used `stale evidence` for a bucket that actually means stable affected obligations, not freshness/SLA failure.

## Solution

- Documented the intended Proof Pack workflow in `CLAUDE.md`.
- Split rendered gates into focused gates, required PR gates, and optional confidence gates.
- Collapsed zero-claim routed domains behind a details block.
- Kept visible known gaps to domains with affected claims, with zero-claim-domain gaps collapsed separately.
- Renamed the proof diff bucket and report payload from stale evidence to stable affected obligations.
- Updated proof-pack and affected-obligation tests to cover the new report shape.

## Verification

- `ruff format devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py`
- `ruff check devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py`
- `mypy polylogue/`
- `pytest -q tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py tests/unit/proof/test_diffing_runtime.py tests/unit/devtools/test_obligation_diff.py tests/unit/devtools/test_affected_obligations.py`
- `devtools proof-pack --path polylogue/proof/catalog.py --markdown`
- `devtools proof-pack --path docs/plans/layering.yaml --markdown`
- `devtools render-all --check`
- `devtools verify --quick`

Ref #594
Ref #635
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.

2 participants