Repository navigation
feat: add compare command for retained pull-request reviews - #153
Open
sundaram2021 wants to merge 4 commits into
Open
sundaram2021 wants to merge 4 commits into
sundaram2021 wants to merge 4 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 801a5942e2
ℹ️ 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".
Distinguish missing ENV assessments from completed empty inventories, isolate duplicate fingerprint ambiguity, and support completed ENV records without retired check receipts. Normalize safe text output and validate duplicate identities before indexing evidence. Add unit and real-binary regressions for the review findings.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
proofline compare, a read-only command for comparing two retained reviews of the same pull request.The command reads existing review records. It does not request another review, modify findings, or require a local checkout.
Why this
After running another review on a pull request, users need to understand what changed since an earlier run. Inspecting each review separately makes it difficult to track findings and distinguish recorded changes from missing or incomplete results.
This command presents those differences directly while preserving the limits of the retained data: a finding missing from the target review is not automatically treated as fixed.
How it works
Validate that both review IDs refer to retained
PULL_REQUESTreviews of the same repository and pull request.Compare CODE and ENVIRONMENT findings separately, matching only exact server-retained fingerprints rather than guessing from finding text or location.
Report matched findings, findings visible only in one snapshot, recorded lifecycle transitions, field changes, and evidence-reference additions/removals. Evidence comparison uses the retained references, not the contents of linked URLs.
Keep missing fingerprints, duplicate matches, and incomplete assessments explicitly unmatchable, ambiguous, or partial instead of presenting an unsupported conclusion.
Provide terminal-safe text output, versioned JSON (
proofline.review-comparison.v1) containing both retained snapshots, and an offline JSON Schema through--schema.Exit codes follow the existing CLI conventions:
0for a complete comparison,2for a partial comparison, and1for invalid arguments, incompatible reviews, or read failures.Relevant files
src/compare.rssrc/compare/render.rssrc/compare/schema.rssrc/compare/tests.rs,tests/compare.rssrc/lib.rs,tests/completions.rs,README.mdsrc/update.rs,src/update/tests.rs,tests/update.rssrc/agent/tests.rs,tests/agent_install.rs,tests/hooks.rs,tests/local_patch.rs,tests/mcp.rsScope: Windows follow-up fixes
Validation reproduced inherited Windows failures in files unchanged by the original comparison feature. This PR also includes two separate follow-up commits:
9663272makes the existing test fixtures portable: clone ownership, exact permission restoration, canonical executable/path comparisons, a valid Windows filename, a relative local push remote, and preservation ofSYSTEMROOTin the isolated MCP test subprocess.801a594defers advisory background update discovery when Windows output is redirected. Native diagnostics showed that the foreground invocation exited successfully while its discovery descendant kept the captured output pipes open. A deferred check does not consume the daily attempt, so a later console invocation can still check normally; cached notices and non-Windows behavior are retained.These follow-ups overlap existing work in #79, #103 and #116 and are isolated from the feature commit for review/reconciliation. No timeout was increased and no new test was skipped or ignored. The temporary diagnostic workflow is not part of this PR, and its remote test branch has been removed.
Before the comparison review follow-up, native Windows validation passed the complete suite (197 passed, 0 failed), strict all-target Clippy, formatting, and 12 consecutive updater-regression repetitions: https://github.com/sundaram2021/proofline-cli/actions/runs/47051658475. This is evidence for the existing Windows follow-up commits, not a claim of a fresh native Windows run for subsequent comparison-only changes.
Testing
All 41 comparison tests passed: 23 unit/render/schema tests and 18 real-binary integration tests using loopback API fixtures.
Coverage includes fingerprint matching and ambiguity, lifecycle transitions, evidence canonicalization, incomplete lane coverage, subject and response-ID validation, organization isolation, schema validation, safe rendering, bounded retries, and transport failures. New regressions cover missing ENV assessments in both directions, duplicate groups alongside unrelated one-sided fingerprints, current completed ENV records without retired check receipts, all documented no-receipt check states, ten incomplete/contradictory controls, and safe uppercase text/enum-change rendering.
Current review-fix commit:
a23e21b. On pinned Rust 1.100.0, the complete Linux all-target suite passed with 211 passed, 0 failed, and one pre-existing opt-in pre-commit test ignored. Formatting, strict all-target Clippy, andcargo deny checkalso passed; the latter retains existing duplicate-dependency warnings.Contributor-reported live testing also passed in both comparison directions for two retained review runs. Both live records had zero findings; finding-bearing behavior was validated with fixtures.