fix(token-audit): replace shell syntax in run() calls with Node.js APIs#197
Closed
TerminalGravity wants to merge 3 commits intomainfrom
Closed
fix(token-audit): replace shell syntax in run() calls with Node.js APIs#197TerminalGravity wants to merge 3 commits intomainfrom
TerminalGravity wants to merge 3 commits intomainfrom
Conversation
…lates The README documents .preflight/ config extensively but there were no actual example files to copy. Adds: - examples/.preflight/config.yml — profile, related projects, thresholds - examples/.preflight/triage.yml — keyword rules and strictness - examples/.preflight/contracts/api.yml — manual contract definitions - examples/.preflight/README.md — setup instructions and tips - README.md pointer to the examples directory
Part of #172. Fixes 4 broken patterns in token-audit.ts: - run('git diff ... 2>/dev/null') → run(['diff', ...]) (array args) - run('wc -l < file') → countLines() using fs.readFileSync - run('wc -c < file') → fileSize() using fs.statSync - run('tail -c N file') → readTail() using fs.openSync/readSync These shell operators were passed as literal git args since run() uses execFileSync without a shell.
…yntax in run() calls - session-handoff: hasCommand() uses 'which' instead of 'command -v' via git; gh pr list uses execFileSync directly instead of run() - sharpen-followup: diff commands use array args; status uses array args - sequence-tasks: ls-files uses array args, pipe to head replaced with JS slice Part of #172.
Collaborator
Author
|
Closing — superseded by #204 which covers all remaining tools. Let's consolidate there. |
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.
Fixes broken shell syntax in
run()calls across 4 tools (part of #172).Tools fixed:
wc,tail,2>/dev/null→ Node.js fs APIs (countLines,fileSize,readTail)command -v→whichvia execFileSync;gh pr list→ direct execFileSync2>/dev/null→ array argsls-files | head→ array args + JS.slice()All 43 tests pass. Clean build.
Partial fix for #172 — still need: verify-completion, audit-workspace, scope-work, enrich-agent-task.