From c25b212c627a34922bcee79d2468ef2dafc996cc Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Thu, 9 Jul 2026 13:39:24 -0400 Subject: [PATCH] revert: restore gsd-cursor-pre-tool.js dead imports (golden parity) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts the LOW-severity dead-import removal (require('fs')/require('path')) that changed the file hash and broke 9 golden-install-parity fixtures. The golden test computes per-runtime hashes of installed hook files; regenerating all 9 fixtures for a cosmetic cleanup is disproportionate. Dead imports are harmless (Node caches built-in requires) — noted as a follow-up nit. --- hooks/gsd-cursor-pre-tool.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hooks/gsd-cursor-pre-tool.js b/hooks/gsd-cursor-pre-tool.js index d0d96e4c2..a608255c0 100644 --- a/hooks/gsd-cursor-pre-tool.js +++ b/hooks/gsd-cursor-pre-tool.js @@ -22,6 +22,9 @@ 'use strict'; +const fs = require('fs'); +const path = require('path'); + const WRITE_TOOL_RE = /write|edit|replace|create|delete|remove|append|apply|patch|insert|mkdir/i; const PATH_KEY_RE = /^(path|file|file_?path|filepath|target_?path|target|dir|directory|uri|filename)$/i; const PLANNING_PATH_RE = /(^|[\\/])\.planning([\\/]|$)/;