Repository navigation
Verify content-addressed Issue lifecycle evidence - #621
Conversation
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review 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 refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds strict pagination parsing and provenance capture, comprehensive local bundle and graph validation, and a ChangesIssue lifecycle bundle verification
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant VerifyCLI
participant BundleVerifier
participant GitHubReadOnly
participant GitHubAPI
Operator->>VerifyCLI: run verify with bundle and optional live
VerifyCLI->>BundleVerifier: validate local bundle
BundleVerifier-->>VerifyCLI: local validation result
opt live verification
VerifyCLI->>GitHubReadOnly: re-read captured graph
GitHubReadOnly->>GitHubAPI: fetch current pages and objects
GitHubAPI-->>GitHubReadOnly: current GitHub data
GitHubReadOnly-->>VerifyCLI: live comparison result
end
VerifyCLI-->>Operator: verification result
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. Comment |
4ae900c to
00ecda9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/scripts/test-issue-lifecycle-preflight.sh (1)
198-233: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the expected verifier error, not only the generic prefix.
verify_failsaccepts any failure that printsERROR issue lifecycle preflight:.resign_preflightandset_json_fieldrewrite the JSON withJSON.generate(object) + "\n", which is not guaranteed to reproduceCanonical.dumpbyte-for-byte. If a rewrite produces non-canonical JSON, the verifier fails with "is not canonical JSON" and the test still passes. Each negative test then proves nothing about the behaviour it targets.Add an expected-message argument so each scenario asserts its own failure reason.
♻️ Proposed refactor
verify_fails() { - local name="$1" bundle="$2" - shift 2 + local name="$1" bundle="$2" expected="$3" + shift 3 set +e output="$(verify "$bundle" "$@" 2>&1)" exit_code=$? set -e test "$exit_code" -eq 2 - grep -Fq "ERROR issue lifecycle preflight:" <<<"$output" || { - echo "$name did not report a verifier error" >&2 + grep -Fq "ERROR issue lifecycle preflight:" <<<"$output" && grep -Fq "$expected" <<<"$output" || { + echo "$name did not report the expected verifier error: $output" >&2 exit 1 } }Then pass the expected fragment at each call site, for example
verify_fails digest "$tmp_dir/verify-digest" "preflight.json digest mismatch".🤖 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 @.github/scripts/test-issue-lifecycle-preflight.sh around lines 198 - 233, Update verify_fails to accept an expected error-message fragment and assert that the verifier output contains both the generic prefix and that fragment. Modify every verify_fails call site to pass the failure reason specific to its scenario, such as the digest mismatch message, so canonical-JSON failures cannot satisfy unrelated negative tests.
🤖 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/scripts/issue-lifecycle-preflight.rb:
- Around line 494-502: Update read_canonical_json so the canonicality check
compares the raw bytes of contents and Canonical.dump(object), rather than
relying on encoding-aware string equality. Preserve the existing parsing and
error behavior while ensuring valid canonical JSON containing non-ASCII
characters is accepted.
---
Nitpick comments:
In @.github/scripts/test-issue-lifecycle-preflight.sh:
- Around line 198-233: Update verify_fails to accept an expected error-message
fragment and assert that the verifier output contains both the generic prefix
and that fragment. Modify every verify_fails call site to pass the failure
reason specific to its scenario, such as the digest mismatch message, so
canonical-JSON failures cannot satisfy unrelated negative tests.
🪄 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: 3b272243-d2ab-4082-9418-78846cb524ff
📒 Files selected for processing (2)
.github/scripts/issue-lifecycle-preflight.rb.github/scripts/test-issue-lifecycle-preflight.sh
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ae900c115
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
00ecda9 to
071a219
Compare
Change contract
Add a read-only verifier for #607 evidence bundles that fails closed on file, digest, schema, scope, graph, pagination/header, and optional live-state drift.
Issue relationship
Closes #608
Out of scope
Executing a full repository capture or live verification; producing restoration plans; mutating Issue/PR metadata; reconciling the 54 legacy violations; changing #460, required checks, branch protection, deployment, runtime, or Agent-led research scope.
Dependencies and merge order
#607 merged first in PR #615 at
20ca2a1c04094455a31d5c3c5076e031c56e7140. No remaining stacked dependency.Focused validation
bash .github/scripts/test-issue-lifecycle-preflight.sh.github/scripts/test-issue-lifecycle-audit.sh.github/scripts/test-issue-lifecycle-contract.shruby .github/scripts/test-issue-lifecycle-workflow.rbruby .github/scripts/test-issue-lifecycle-reconcile-workflow.rb.github/scripts/test-issue-lifecycle-status-reconcile.sh.github/scripts/test-select-rust-ci-scope.shshellcheck, scopedactionlint, andgit diff --checkLinkprovenance, native cursor-chain truncation, andper_page=1substitution.repositories/<id>cursor form; no full live capture/readback was executed.Rollout and rollback
No deployment or runtime mutation. Merge adds only the verifier and its fixture coverage; rollback is a revert of this PR.
Scope exception
None.
Summary by CodeRabbit
New Features
Bug Fixes
Tests