GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix report-only scan -g hint dropping -g (#464) by mikolalysenko · Pull Request #777 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without the fix | With the fix |
|---|---|---|---|
#464 (-g, --global-prefix, quoting) |
scan::render::tests::report_only_hint_keeps_global_scope (unit) |
does not compile (the hint takes no scope) | pass |
| #464 (real report-only scan) | covgap_commands_scan_mod::scan_global_report_only_hint_keeps_the_global_scope |
fails: the hint printed socket-patch scan --mode agent [PATHS] |
pass |
| project hint unchanged | report_only_hint_names_agent_mode, scan_prune_without_a_mode_is_report_only |
pass | pass |
Commands run locally on b311073:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-cli --all-features --lib: 835 passed.cargo test -p socket-patch-cli --all-features --test covgap_commands_scan_mod --test cli_parse_scan --test e2e_socket_yml_policy: 45 + 52 + 20 passed.cargo fmt --check: my hunks are clean. main already has about 500 rustfmt diffs under the pinned 1.93.1 toolchain, and CI doesn't run fmt, so I didn't reformat unrelated code.cargo test --workspace filled the sandbox disk while linking test binaries, so the full suite is left to CI.🤖 Generated with Claude Code
Note
Low Risk
Human-output and documentation change for scan hints, plus a mechanical digest helper refactor in JVM/Gradle paths with existing test coverage.
Overview
Fixes #464: report-only scan (no --mode, including --prune or global scope) now prints follow-up commands that repeat the run’s global scope, so copying the hint does not accidentally run agent mode against the cwd project.
report_only_hint takes GlobalArgs: with -g it suggests scan --mode agent -g / get -g …; with --global-prefix it embeds a shell-safe prefix via new shell_word (POSIX single quotes; Windows double quotes, including trailing-backslash handling). Project-local report-only scans keep the [PATHS] hint. CLI_CONTRACT.md documents this.
Also routes Gradle cache / JVM jar / Maven sidecar SHA-1 (and JVM SHA-256) through shared utils::digest helpers instead of inline sha1/sha2 calls—no intended behavior change.
Unit tests in render and an integration test scan_global_report_only_hint_keeps_the_global_scope lock in the scoped hint.
Reviewed by Cursor Bugbot for commit 7e78c76. Configure here.
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A report-only `scan -g` (or `--global-prefix <dir>`) ends with a hint for applying what it found. The hint dropped the global flag, so running it as printed scanned the cwd project instead, exited 0, and left the global install unpatched. The hint now repeats the run's scope: `-g`, or `--global-prefix <dir>` shell-quoted when the path needs it. A project `--prune` scan keeps the old hint. Covered by unit tests on the hint and an integration test of a real report-only global-prefix scan. Fixes #464 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Main reflowed the old one-line report_only_hint() test with rustfmt; this branch replaced that test with ones for the scoped hint (report_only_hint(&GlobalArgs)). Keep the branch's tests, which cover the same header line plus the #464 global-scope cases. Co-Authored-By: Claude <[email protected]>
|
bugbot run Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
[agent] Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Brings in the vex_consumed alias test fix (#849) that main's red test/test-release/coverage jobs were waiting on. Co-Authored-By: Claude <[email protected]>
shell_word wrapped a --global-prefix with spaces in double quotes as-is, so a prefix ending in '\' produced "C:\dir\" and the argv parser read that last backslash as escaping the closing quote: the pasted hint was no longer one argument. Doubling the trailing backslash run keeps the quote closing and still names the same directory. Co-Authored-By: Claude <[email protected]>
|
bugbot run Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Head branch was modified
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Head branch was modified
Brings the branch up to date with main so CI and Bugbot run on the Windows backslash fix in f53164c, which GitHub never synced to the PR. Assisted-by: Claude Code:claude-opus-5-5
|
[agent] The Bugbot thread on Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
[agent] On
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] CI on 1bb6331:
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7e78c76. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Burn-down agent: re-verified Ready for review at the new head
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
A report-onlyscan -g tells you to run socket-patch scan --mode agent [PATHS] without -g, so following the hint scans the cwd project instead of the global install
There was an error while loading. Please reload this page.