Skip to content

refactor(proof): make Proof Pack evidence taxonomy actionable (#855) - #877

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/proof-pack-taxonomy-855
May 7, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/proof-pack-taxonomy-855

Conversation

@Sinity

@Sinity Sinity commented May 7, 2026

Copy link
Copy Markdown
Owner

Summary

Classify every affected proof obligation by evidence taxonomy so agents can distinguish executable checks from static declarations, metadata completeness assertions, and advisory noise.

Problem

devtools proof-pack produced an undifferentiated report where 533 stable obligations and 32 required gates looked like change-specific evidence. A clean tree still reported catalog-quality checks without making the affected=0 case visible. Agents couldn't tell what to run now vs. what was static metadata.

Solution

Evidence Taxonomy

Introduced EvidenceTaxonomy — a six-way classification derived from existing oracle, independence_level, and evidence_class fields (no new catalog metadata required):

Taxonomy Derived from Meaning
executable_behavior oracle=proof/smoke, evidence_class=smoke/semantic/performance Backed by executable checks
observability evidence_class=trace Runtime trace/diagnostic evidence
architectural_static oracle=drift_check Static boundary checks (topology, layering)
metadata_spec oracle=construction_sanity (default) Metadata completeness — does not block
manual_review oracle=manual_review Requires agent judgment artifact
advisory oracle=ceremonial, independence=ceremonial/self_attesting Tracking only

Report Restructuring

The markdown output now shows:

  1. Required Gates (run now) — combined focused + always-on PR gates, deduplicated
  2. Always-On PR Gates — the baseline gates every PR runs
  3. Confidence Gates (optional) — deployment checks, not required
  4. Affected Evidence by Taxonomy — grouped with actionable/does-not-block labels
  5. Agent Judgment Cells — separated, with severity guidance
  6. Known Gaps (tracking, not blocking) — explicitly labeled as non-blocking

Clean-Tree Distinction

Added clean_tree flag and _context field. When no paths changed, the report states: "No changed paths -- zero obligations are change-specific. Catalog stats reflect the baseline, not a diff."

Files Changed

  • polylogue/proof/models.py — add EvidenceTaxonomy Literal type
  • devtools/proof_pack.py — taxonomy classification, grouping, restructured render_markdown and _print_human_report
  • tests/unit/devtools/test_proof_pack.py — tests for taxonomy grouping and clean-tree behavior
  • docs/verification-catalog.md — regenerated (EvidenceTaxonomy added to model exports)

Verification

$ pytest tests/unit/devtools/test_proof_pack.py tests/unit/proof/ -q
99 passed

$ devtools proof-pack --check
# exits 0, check policy ok

$ devtools proof-pack --path docs/plans/layering.yaml --markdown
# Shows taxonomy breakdown:
#   - architectural_static (actionable): 2 obligations
#   - metadata_spec (does not block): 0 obligations
# Known Gaps (tracking, not blocking)

$ devtools proof-pack --base-ref HEAD --head-ref HEAD --json
# clean_tree: true, no affected obligations

Closes #855.

Classify every affected obligation by evidence taxonomy
(executable_behavior, observability, architectural_static, metadata_spec,
manual_review, advisory) so agents can distinguish what to run now from
what is static metadata or advisory noise.

- Add EvidenceTaxonomy typed variant to proof models
- Derive taxonomy from existing oracle + independence + evidence_class
- Group affected obligations by taxonomy in proof-pack JSON and markdown
- Restructure rendered output: Required Gates first, taxonomy breakdown,
  Known Gaps labeled as tracking-only
- Add clean_tree flag to distinguish baseline catalog from diff
- Add focused tests for taxonomy grouping and clean-tree behavior

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

coderabbitai Bot commented May 7, 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 1 second before requesting another review.

To continue reviewing without waiting, purchase usage credits 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: a9b44b98-ee4c-4ba4-b7b9-31b748c82f02

📥 Commits

Reviewing files that changed from the base of the PR and between 6e5f20d and d18853e.

📒 Files selected for processing (4)
  • devtools/proof_pack.py
  • docs/verification-catalog.md
  • polylogue/proof/models.py
  • tests/unit/devtools/test_proof_pack.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/proof-pack-taxonomy-855

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.

@Sinity
Sinity merged commit ef45ac2 into master May 7, 2026
3 checks passed
Copilot AI review requested due to automatic review settings May 7, 2026 06:19
@Sinity
Sinity deleted the feature/refactor/proof-pack-taxonomy-855 branch May 7, 2026 06:20

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

This PR makes devtools proof-pack outputs more actionable for agents by classifying affected proof obligations into an evidence taxonomy and restructuring the human/markdown reports to clearly separate “run now” gates from static/advisory metadata.

Changes:

  • Added EvidenceTaxonomy to the proof model layer and export surface.
  • Implemented taxonomy classification + grouping in devtools proof-pack, including a clean_tree indicator and contextual report message.
  • Updated unit tests and regenerated the verification catalog snapshot.

Reviewed changes

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

File Description
devtools/proof_pack.py Adds taxonomy derivation/grouping, clean_tree context, and restructures markdown/human output sections.
polylogue/proof/models.py Introduces EvidenceTaxonomy literal type and exports it.
tests/unit/devtools/test_proof_pack.py Updates assertions for new report fields/sections and adds coverage for clean-tree + taxonomy structure.
docs/verification-catalog.md Regenerated catalog snapshot reflecting updated subject/obligation counts.

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

Comment thread devtools/proof_pack.py
Comment on lines +95 to +107
def _taxonomy_for_obligation(
obligation_id: str,
catalog: VerificationCatalog,
*,
cache: dict[str, EvidenceTaxonomy] | None = None,
) -> EvidenceTaxonomy:
"""Look up an obligation by ID and return its evidence taxonomy."""
if cache is not None and obligation_id in cache:
return cache[obligation_id]
for obligation in catalog.obligations:
if obligation.id == obligation_id:
taxonomy = _classify_obligation_taxonomy(
claim_oracle=obligation.claim.oracle,
Comment thread devtools/proof_pack.py
lines.append(
f"- `{cell['claim_id']}` -- result `{cell['result']}`; "
f"artifact `{cell['artifact'] or 'missing'}`; "
f"reviewer `{cell['reviewer'] or 'missing'}`"
Sinity added a commit that referenced this pull request May 7, 2026
Closes #855. `devtools proof-pack` produced an undifferentiated
report where 533 stable obligations and 32 required gates
looked indistinguishable from change-specific evidence; a
clean tree still produced catalog-quality checks without
making the `affected=0` case visible. Agents could not tell
what to run now vs. what was static metadata.

- `EvidenceTaxonomy` (six-way classification) is derived from
  the existing `oracle`, `independence_level`, and
  `evidence_class` fields without new catalog metadata:
  `executable_behavior`, `observability`,
  `architectural_static`, `metadata_spec`, `manual_review`,
  `advisory`.
- Markdown report restructured: Required Gates first
  (focused + always-on, deduplicated), Always-On PR Gates,
  Confidence Gates (optional), Affected Evidence by Taxonomy
  (with actionable / does-not-block labels), Agent Judgment
  Cells (with severity guidance), and Known Gaps explicitly
  labeled non-blocking.
- Adds `clean_tree` flag and `_context` so an unchanged tree
  reports "No changed paths — zero obligations".

Closes #855
Sinity added a commit that referenced this pull request May 7, 2026
Closes #855. `devtools proof-pack` produced an undifferentiated
report where 533 stable obligations and 32 required gates
looked indistinguishable from change-specific evidence; a
clean tree still produced catalog-quality checks without
making the `affected=0` case visible. Agents could not tell
what to run now vs. what was static metadata.

- `EvidenceTaxonomy` (six-way classification) is derived from
  the existing `oracle`, `independence_level`, and
  `evidence_class` fields without new catalog metadata:
  `executable_behavior`, `observability`,
  `architectural_static`, `metadata_spec`, `manual_review`,
  `advisory`.
- Markdown report restructured: Required Gates first
  (focused + always-on, deduplicated), Always-On PR Gates,
  Confidence Gates (optional), Affected Evidence by Taxonomy
  (with actionable / does-not-block labels), Agent Judgment
  Cells (with severity guidance), and Known Gaps explicitly
  labeled non-blocking.
- Adds `clean_tree` flag and `_context` so an unchanged tree
  reports "No changed paths — zero obligations".

Closes #855
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.

refactor(proof): make Proof Pack evidence taxonomy actionable

2 participants