fix: replace broken run() calls with shell() or array args across 9 tools - #219
Closed
TerminalGravity wants to merge 2 commits into
Closed
fix: replace broken run() calls with shell() or array args across 9 tools#219TerminalGravity wants to merge 2 commits into
TerminalGravity wants to merge 2 commits into
Conversation
* add .preflight/ example config directory with commented starter files - examples/.preflight/config.yml — profile, related projects, thresholds, embeddings - examples/.preflight/triage.yml — keyword rules and strictness tuning - examples/.preflight/contracts/api.yml — manual cross-service contract definitions - examples/README.md — quick setup instructions - README.md — link to examples from config reference section * docs: add troubleshooting section with common setup issues * fix: add preflight-dev-serve bin so npm users can actually start the MCP server The 'preflight-dev' bin runs the init wizard, not the server. Users following the npm install path had no way to launch the actual MCP server without pointing into node_modules (which the init script was doing incorrectly, referencing 'preflight' instead of 'preflight-dev'). - Add bin/serve.js as 'preflight-dev-serve' entry point - Fix init CLI to generate correct .mcp.json using preflight-dev-serve - Update README quickstart to use npx -y preflight-dev-serve * docs: add concrete usage examples for 6 common workflows
Collaborator
Author
|
Superseded by #220. Recommend closing. |
…d, session-health - token-audit: use run() with array args for git commands, Node fs APIs for line/byte counting instead of shell wc, shell() for tail - what-changed: use run() with array args + fallback logic - session-health: use getDiffStat() instead of shell pipe - git.ts: add shell() helper for commands needing pipes/redirects Closes #215
TerminalGravity
force-pushed
the
fix/run-misuse-remaining
branch
from
March 11, 2026 23:16
9b8e072 to
2882a3c
Compare
Collaborator
Author
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 the remaining
run()misuse tracked in #215. Builds on theshell()helper from #214.Problem
run()usesexecFileSync('git', args)— no shell, always prependsgit. 9 tools were passing shell strings with pipes, redirects, or non-git commands, causing silent failures.Changes (9 files)
cat package.json→readFileSync, tsc/test/build commands →shell(), git diff → array argsshell()command -v+gh pr list→shell()shell()git ls-files | grep→shell(),head -30→readFileSync + slicegit ls-files | head→shell()git add→ array args, compound&&command →shell(),git reset→ array argsgit ls-files | grep→shell()Testing
tsc --noEmitpasses cleanlyfix/token-audit-shell-commandsbranch (fix: broken shell commands in token_audit and what_changed tools #214)Closes #215