feat: export provider-neutral authorization records v0.1#167
Conversation
|
Warning Review limit reached
More reviews will be available in 5 minutes and 7 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughIntroduces the ProofPath Authorization Record Export Profile v0.1: a JSON Schema for the exported record, two conformance fixture files (export cases and report-context timestamps), an interop specification document, two Python verification scripts ( ChangesAuthorization Record Export Profile v0.1
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review Final ready-for-review diff includes the independent semantic verifier and dedicated CI gate. |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
conformance/authorization-record-export-v0.1.json (1)
9-409: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd fixtures for the unexercised
REJECTandINVALIDpaths.The pack never covers
decision == "REJECT"orconsumption_state == "UNKNOWN", even though the schema exportsREJECTED/INVALIDandscripts/verify_authorization_record_export.py:267-291has dedicated branches for both. Right now those verifier paths can drift without the conformance gate noticing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@conformance/authorization-record-export-v0.1.json` around lines 9 - 409, The authorization record export fixture set is missing coverage for the verifier branches that handle REJECT and INVALID outcomes, so add new cases to the JSON pack that exercise decision_context.decision as REJECT and decision_context.consumption_state as UNKNOWN. Mirror the existing case structure in the cases array and make sure the new fixtures align with the dedicated paths in scripts/verify_authorization_record_export.py and the schema’s REJECTED/INVALID states so the conformance gate detects regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/authorization-record-export.yml:
- Line 30: The checkout step in the workflow currently uses actions/checkout
without disabling credential persistence, which leaves the GITHUB_TOKEN
available to later PR-controlled steps. Update the checkout invocation to set
persist-credentials to false in the workflow job so the token is not written to
.git/config while still using the existing checkout behavior.
In `@schemas/proofpath-authorization-record-v0.1.schema.json`:
- Around line 84-95: The canonical authorization record schema currently
includes the report-derived current_state value EXPIRED_AT_REPORT, which should
not be part of the exported record. Update the
proofpath-authorization-record-v0.1 schema by removing EXPIRED_AT_REPORT from
the current_state enum and keep report-time evaluation in the separate report
context instead, aligned with the canonical record contract and the
stale_authorization_honest_report and authorization-record-report-context
fixtures.
---
Nitpick comments:
In `@conformance/authorization-record-export-v0.1.json`:
- Around line 9-409: The authorization record export fixture set is missing
coverage for the verifier branches that handle REJECT and INVALID outcomes, so
add new cases to the JSON pack that exercise decision_context.decision as REJECT
and decision_context.consumption_state as UNKNOWN. Mirror the existing case
structure in the cases array and make sure the new fixtures align with the
dedicated paths in scripts/verify_authorization_record_export.py and the
schema’s REJECTED/INVALID states so the conformance gate detects regressions.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 94d86de1-df95-4b99-9e49-8d97bae1f33a
📒 Files selected for processing (7)
.github/workflows/authorization-record-export.ymlconformance/authorization-record-export-v0.1.jsonconformance/authorization-record-report-context-v0.1.jsondocs/interop/PROOFPATH_AUTHORIZATION_RECORD_EXPORT_V0_1.mdschemas/proofpath-authorization-record-v0.1.schema.jsonscripts/check_authorization_record_export.pyscripts/verify_authorization_record_export.py
Summary
Implements the ProofPath side of the three-record trustworthy-transition contract from Liminal#108 and ProofPath#166.
This PR adds a provider-neutral
authorization_recordexport without changing ProofPath's enforcement boundary.Added
docs/interop/PROOFPATH_AUTHORIZATION_RECORD_EXPORT_V0_1.mdschemas/proofpath-authorization-record-v0.1.schema.jsonconformance/authorization-record-export-v0.1.jsonconformance/authorization-record-report-context-v0.1.jsonscripts/check_authorization_record_export.pyscripts/verify_authorization_record_export.py.github/workflows/authorization-record-export.ymlState model
The canonical authorization record stores only intrinsic state:
ACTIVE;PENDING_APPROVAL;EXPIRED;CONSUMED;BLOCKED;REJECTED;INVALID.Report time remains external verifier context. The derived
authority_state_at_reportmay becomeEXPIRED_AT_REPORTwithout rewriting the original authorization record or changing its SHA-256 reference.Independent verification
The deterministic exporter reproduces canonical record bytes and references. A separate semantic verifier independently derives and checks:
MATCH,MATCH_WITH_INTEGRITY_FAILURE, orHISTORICAL_ONLYoutcomes.Fixture coverage
Boundary
Validation
Expected summaries:
Relates to #166 and safal207/Liminal#108.