Repository navigation
fix(proof): enforce proof-pack check policy - #690
Conversation
Problem: proof-pack exposed affected assurance domains and manual-review cells, but there was no command mode that made existing proof-quality failures block local or PR automation. Issue #594 calls for the report surface to reuse the catalog quality laws instead of leaving them as passive context.\n\nWhat changed: add catalog quality checks to the proof-pack payload, add a --check mode, evaluate existing catalog quality errors and affected serious manual-review cells as blocking policy failures, and keep known gaps/suppressed routing visible as warnings until their manifests become executable contracts.\n\nVerification:\n- pytest -q tests/unit/devtools/test_proof_pack.py\n- ruff check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py devtools/command_catalog.py\n- ruff format --check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py devtools/command_catalog.py\n- devtools render-all --check\n\nRef #594
Problem: #594 requires the quick verification path to run a proof-law or proof-check lane, but proof-pack policy was only available as an explicit command. Proof-pack tooling changes also routed as unknown paths, which made the new policy warn on its own implementation file.\n\nWhat changed: add devtools proof-pack --check to the non-pytest verify baseline and classify proof-pack/obligation-diff devtools as proof-catalog changes so they select proof obligations and focused proof tests.\n\nVerification:\n- pytest -q tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- pytest -q tests/unit/devtools/test_verify.py tests/unit/proof/test_diffing.py\n- ruff check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- ruff format --check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- devtools proof-pack --check --json | jq '.check'\n\nRef #594
Problem: #594 refined manual-review cells into agent judgment cells because the report is used by coding agents that can produce review artifacts. Keeping the old payload name made the workflow sound human-only and hid the intended artifact shape.\n\nWhat changed: replace the proof-pack payload and rendered report wording with agent_judgment_cells, update the check policy to describe missing agent judgment artifacts, and update tests to cover the renamed contract.\n\nVerification:\n- pytest -q tests/unit/devtools/test_proof_pack.py\n- ruff check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py\n- ruff format --check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py\n- devtools proof-pack --path polylogue/proof/catalog.py --check --json | jq '{check:.check, cells:.agent_judgment_cells}'\n\nRef #594\nRef #635
Problem: #594 requires manual-review cells to become agent judgment cells with artifact-oriented fields, but the proof-pack report still only exposed a count. That left agents without a concrete object to satisfy or justify.\n\nWhat changed: include artifact, reviewer, produced_at, freshness, and result fields on agent judgment cells, render them in Markdown, and cover the section in proof-pack tests.\n\nVerification:\n- pytest -q tests/unit/devtools/test_proof_pack.py\n- ruff check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py\n- ruff format --check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py\n- devtools proof-pack --path polylogue/proof/catalog.py --check --markdown | sed -n '/### Agent Judgment Cells/,/home/sinity/.nix-profile'\n\nRef #594
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR introduces a quality-check enforcement mechanism into the proof-pack tool. A new ChangesProof-Pack Check Enforcement & Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 51 minutes and 10 seconds.Comment |
Polylogue Proof PackRefs: Affected Domains
Additional routed domains with zero affected claims
Focused Gates
Required PR Gates
Optional Confidence Gates
Known Gaps
Additional gaps in zero-claim routed domains
Oracle / Cost
Agent Judgment Cells
|
|
Automated review / Proof Pack triage:
Additional focused verification after reading Proof Pack: |
There was a problem hiding this comment.
Pull request overview
Adds an enforceable proof-pack policy gate and integrates it into the fast verification baseline so proof-catalog quality regressions (and serious agent-judgment gaps) can fail devtools verify --quick rather than remaining report-only.
Changes:
- Add
devtools proof-pack --checkwith a computedcheckresult and non-zero exit on blocking policy failures. - Extend proof-pack payload/rendering: include catalog quality checks and rename/reshape
manual_review_cells→agent_judgment_cells. - Route
devtools/proof_pack.pyanddevtools/obligation_diff.pyasproof_catalogchanges; wire the new gate intodevtools verify --quickand add/adjust tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
devtools/proof_pack.py |
Implements --check, blocking policy evaluation, and new agent-judgment + catalog-quality payload/rendering. |
devtools/verify.py |
Adds proof-pack --check to the default/quick verification step list and updates docs. |
polylogue/proof/diffing.py |
Classifies proof-pack/obligation-diff devtools changes as proof_catalog for impact routing. |
devtools/command_catalog.py |
Updates proof-pack command examples to include --check. |
tests/unit/devtools/test_proof_pack.py |
Adds unit coverage for new report keys, markdown rendering, and check-policy exit behavior. |
tests/unit/devtools/test_verify.py |
Updates quick-verify expectations to include the new proof-pack check step. |
tests/unit/proof/test_diffing.py |
Verifies devtools proof-pack changes route to proof-catalog obligations/checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| suppressed = _suppressed_change_subjects(report) | ||
| if suppressed: | ||
| warnings.append("changed paths were suppressed from obligation routing: " + ", ".join(suppressed[:10])) |
| if isinstance(cell, dict) and cell.get("severity") == "serious" and not cell.get("tracked_exception") | ||
| ] | ||
| for cell in serious_judgment_cells: | ||
| errors.append( | ||
| "affected serious claim needs agent judgment artifact: " |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@polylogue/proof/diffing.py`:
- Around line 589-594: The routing condition that returns "proof_catalog" (the
if checking path.startswith("polylogue/proof/") or the set containing
"devtools/proof_pack.py") needs to also include the proof-pack test path so
proof-pack validations run; update the condition that uses the path variable and
returns "proof_catalog" to treat "tests/unit/devtools/test_proof_pack.py" (or a
startswith "tests/unit/devtools/" check that covers that test) as a match, and
make the same change in the duplicate block around the later occurrence (the
other if that returns "proof_catalog").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8e746da8-4ccf-4059-b31d-45dc84d22595
📒 Files selected for processing (7)
devtools/command_catalog.pydevtools/proof_pack.pydevtools/verify.pypolylogue/proof/diffing.pytests/unit/devtools/test_proof_pack.pytests/unit/devtools/test_verify.pytests/unit/proof/test_diffing.py
Problem: automated review found that proof-pack check warnings referred to suppressed changed paths even though the payload stores change-subject IDs, that produced judgment artifacts would still fail the gate, and that proof-pack report changes should recommend proof-pack-specific focused checks.\n\nWhat changed: make the suppressed-routing warning precise, allow serious judgment cells with accepted artifact/reviewer/produced_at/freshness metadata to satisfy the gate, route the proof-pack test file as proof-catalog impact, and add proof-pack-specific focused checks for proof-catalog changes.\n\nVerification:\n- pytest -q tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- ruff check devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- ruff format --check devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py\n- devtools proof-pack --check --json | jq '.check'\n\nRef #594
|
Review follow-up after automated comments:
Additional verification for the review-fix commit: CI note: GitHub Actions Python-matrix jobs are pending because repository CI quota is exhausted. Completed checks are green, and the local quick baseline plus focused Proof Pack gates passed. |
Summary: Adds a blocking proof-pack policy mode and wires it into the fast verification baseline. The report now carries catalog-quality check results, exposes agent judgment cells as structured artifact-oriented records, and routes proof-pack devtools changes through proof-catalog impact instead of treating them as unknown paths. Problem: Proof Pack was useful as a confidence report but still passive: existing catalog quality checks for weak evidence, stale runner trust, missing breaker metadata, and zero-subject claims were not connected to a nonzero command mode. The quick verification path also had no focused proof-check lane, so proof quality could regress unless a reviewer manually noticed report output. Solution: - Add devtools proof-pack --check with JSON/Markdown/human check payloads and nonzero exit on blocking policy failures. - Reuse existing catalog quality checks as blocking policy inputs. - Block affected serious agent-judgment cells unless they carry a tracked exception or an accepted artifact with reviewer, produced_at, and freshness metadata. - Keep known gaps and suppressed routing visible as warnings until #590/#594 make gap lifecycle and unrouted-path suppressions executable enough to fail globally. - Add devtools proof-pack --check to devtools verify --quick. - Classify proof-pack/obligation-diff tooling and proof-pack tests as proof-catalog impact and recommend proof-pack-specific focused gates. - Rename manual_review_cells to agent_judgment_cells and render artifact/reviewer/produced_at/freshness/result fields. Verification: - pytest -q tests/unit/devtools/test_proof_pack.py - pytest -q tests/unit/devtools/test_verify.py tests/unit/proof/test_diffing.py - pytest -q tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py - pytest -q tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py - pytest -q tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py - mypy tests/unit/devtools/test_proof_pack.py - ruff check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py devtools/command_catalog.py - ruff check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py - ruff check devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py - ruff format --check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.py - devtools render-all --check - devtools render-verification-catalog --check - devtools proof-pack --check --json | jq '.check' - devtools proof-pack --path polylogue/proof/catalog.py --check --markdown | sed -n '/### Agent Judgment Cells/,$p' - devtools verify --quick - push hook: devtools verify --quick CI note: GitHub Actions Python-matrix jobs were pending because repository CI quota was exhausted. Completed GitHub checks were green; local quick verification and focused Proof Pack gates passed. Ref #594 Ref #635
Summary
Adds a blocking proof-pack policy mode and wires it into the fast verification baseline. The report now carries catalog-quality check results, exposes agent judgment cells as structured artifact-oriented records, and routes proof-pack devtools changes through proof-catalog impact instead of treating them as unknown paths.
Ref #594
Ref #635
Problem
#594 identified that proof-pack was useful as a confidence report but still passive: existing catalog quality checks for weak evidence, stale runner trust, missing breaker metadata, and zero-subject claims were not connected to a nonzero command mode. The quick verification path also had no focused proof-check lane, so proof quality could regress unless a reviewer manually noticed report output.
The report also still described manual-review cells, even though the intended workflow is for coding agents to produce or cite judgment artifacts.
Solution
devtools proof-pack --check, including acheckpayload in JSON/Markdown/human output when requested.build_verification_catalog()as blocking policy failures.devtools proof-pack --checktodevtools verify --quick.devtools/proof_pack.pyanddevtools/obligation_diff.pyas proof-catalog changes for impact routing.manual_review_cellstoagent_judgment_cellsand render artifact/reviewer/produced_at/freshness/result fields.Verification
pytest -q tests/unit/devtools/test_proof_pack.pypytest -q tests/unit/devtools/test_verify.py tests/unit/proof/test_diffing.pypytest -q tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.pymypy tests/unit/devtools/test_proof_pack.pyruff check devtools/proof_pack.py tests/unit/devtools/test_proof_pack.py devtools/command_catalog.pyruff check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.pyruff format --check devtools/verify.py devtools/proof_pack.py polylogue/proof/diffing.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_proof_pack.py tests/unit/proof/test_diffing.pydevtools render-all --checkdevtools proof-pack --check --json | jq '.check'devtools proof-pack --path polylogue/proof/catalog.py --check --markdown | sed -n '/### Agent Judgment Cells/,$p'devtools verify --quickdevtools verify --quickRemaining Risk
This is not the full #594 closure. Evidence freshness still needs persisted CI/local run metadata, serious known-gap lifecycle still belongs with #590 manifest contracts, and unrouted changed paths are warnings until there is an explicit suppression model precise enough to avoid false failures on tests and non-source files.
Summary by CodeRabbit
New Features
--checkflag to the proof-pack command that evaluates quality checks and returns a failure status if issues are detected.Tests