Skip to content

fix(cli): treat staged paths literally - #9

Merged
andrei-hasna merged 1 commit into
mainfrom
fix/d0bb42cb-literal-pathspec-followup
Aug 7, 2026
Merged

fix(cli): treat staged paths literally#9
andrei-hasna merged 1 commit into
mainfrom
fix/d0bb42cb-literal-pathspec-followup

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #8 merged while its exact-head adversarial review had one open blocker: a staged filename using Git pathspec magic could suppress its own added hunk. This follow-up contains only that remediation.

  • force literal pathspec handling for each staged file passed to git diff
  • add a three-way regression: pathspec-magic known-positive, normal-path known-positive, and safe negative

Verification

  • focused RED before fix: 0 pass, 1 fail; magic filename returned no findings
  • focused regression after fix: 1 pass, 0 fail, 10 assertions
  • affected command/scanner group: 98 pass, 0 fail, 170 assertions
  • complete matrix: 437 pass, 0 fail, 7035 assertions
  • bun run typecheck: pass
  • strict OSS secrets policy: 0 violations
  • git diff --check origin/main...HEAD: pass
  • pre-push hook: scanned 1 outgoing commit
  • candidate tree matches the fully tested remediation tree exactly

Incident record: conversations #incidents message 678928.

Todos: SHI-00001 (d0bb42cb-27a2-42f0-96e4-afcc59f3147e)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@andrei-hasna
andrei-hasna merged commit 72dc25f into main Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant