Repository navigation
feat(review): add --dry-run and list every preflight refusal - #102
Closed
mrpmohiburrahman wants to merge 1 commit into
Closed
mrpmohiburrahman wants to merge 1 commit into
mrpmohiburrahman wants to merge 1 commit into
Conversation
`proofline review --dry-run` builds the same local patch, prints the base commit, each changed file and the patch size, then runs the secret preflight. It reads no credential and sends no request. The preflight now collects every refusal instead of returning the first one. A patch with three secrets needs one run and one edit, not three. A refused `.env` path is listed once and its lines are not scanned again. `cargo test`, `cargo clippy --all-targets -- -D warnings` and `cargo fmt --check` pass.
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.
Who this helps
A person who is about to run
proofline reviewon local changes, before the patch leaves the machine.Problem
proofline login. The first local review sends the patch before the person sees what it holds.Change
proofline review --dry-runbuilds the same local patch asreviewand prints:It reads no credential and sends no request. The exit code is 1 when the preflight refuses the patch, and 0 when the patch passes.
The preflight now collects every refusal instead of returning the first one.
reviewandhook runprint the same list. A refused.envpath is reported once, and its lines are not scanned again, so a.envfile with five secrets is one line and not six. The list prints at most 20 lines and then counts the rest.Example:
Verification
a_dry_run_prints_the_patch_and_sends_nothing: exit 0, the summary names each file, and the fake server records no request.a_dry_run_reports_every_refused_path_in_one_run: three problems in three files, one run lists all three, no secret reaches stderr, and no request is made.every_refusal_is_listed_once_and_the_tail_is_counted: the list stops at 20 lines and counts the rest.tests/local_patch.rscases pass with the new wording.cargo test,cargo clippy --all-targets -- -D warningsandcargo fmt --checkpass. One test,unattended_registration_preserves_settings_and_uses_the_installed_binary, fails onmainon this macOS host because$TMPDIRis/var/...and its canonical path is/private/var/.... That failure is present without this change.Tradeoffs
--allow-pathor a path and line instead.--dry-runconflicts with--json, because it prints no JSON document. A JSON preview can follow..envpath hides a credential shape on its own lines. That matches the old behavior for a single run, and one--allow-pathshows the file again.