Skip to content

v0.32.1 — block-tier false-positive fixes (code-review patch)

Choose a tag to compare

@sdsrss sdsrss released this 23 May 18:19
· 1019 commits to main since this release

Four-finding code-review patch on v0.32.0. All findings were Important (not Critical, not data-loss), but they hit exactly the spec the v0.32.0 block tier was designed to satisfy ("narrowest case"), so they get fast follow-up.

Fixed

  • Block tier no longer false-positives on identifier-shaped PATH ARGUMENTS — v0.32.0's shouldBlock ran IDENTIFIER_LIKE.test(cmd) against the full command, so grep -rn "abc" src/EmbeddingModel.rs blocked because the filename contains CamelCase. Same problem for snake_case directory names. v0.32.1 adds extractPatterns(cmd) that pulls quoted arguments out of the command and tests against patterns only. Unquoted-pattern usage falls back to hint behavior — conservative.
  • type dropped from declaration-anchor keyword list; remaining anchors pinned to pattern start — \btype\s+\w matched "# type checking", "some type X", and other comment scans. v0.32.1 drops type and anchors fn / def / class / function / struct / impl / trait to ^\s* so they only fire when the pattern actually starts with a declaration.
  • isOurHookEntry script-name fallback tightened — v0.32.0 used cmd.includes('code-graph') which would claim a user's own ~/code-graph/foo.js. v0.32.1 uses MARKETPLACE_NAME (code-graph-mcp) instead.
  • doctor.js report no longer prints two 'Hooks' rows — check 7 (settings.json coverage) renamed to 'Hook coverage'.

Internal

  • Dropped pluginRootDir() function that duplicated module-level PLUGIN_ROOT.
  • Cleaned up doctor.js unused imports left over from the v0.32.0 inversion.

Testing

437/437 plugin script tests pass (+18 new for the regressions). cargo check + cargo +1.95.0 clippy --no-default-features and --all-targets all clean under -D warnings.

E2E smoke (three sample inputs through the actual hook script, sandboxed .code-graph/index.db): I1 case emits hint text, I4 case emits hint text, real CamelCase symbol search emits JSON block envelope with permissionDecision: "deny".

Process

Driven by /superpowers:requesting-code-review subagent on the b5c907f..a25bee9 (v0.31.2..v0.32.0) range. Verdict was "With fixes — needs v0.32.1 patch"; this is that patch.

See fix commit 9a674c0 for the substantive diff; release commit cd3339e is the 9-file version bump + CHANGELOG.

🤖 Generated with Claude Code