fix: shell syntax bugs in 8 remaining tool files#123
Open
TerminalGravity wants to merge 4 commits intomainfrom
Open
fix: shell syntax bugs in 8 remaining tool files#123TerminalGravity wants to merge 4 commits intomainfrom
TerminalGravity wants to merge 4 commits intomainfrom
Conversation
Covers LanceDB native binary failures, CLAUDE_PROJECT_DIR config, vector search not returning results, MCP handshake debugging, and performance tips. Links from README nav bar.
- examples/.preflight/config.yml: profile, related projects, thresholds, embeddings - examples/.preflight/triage.yml: strictness, always_check/skip/cross-service keywords - examples/.preflight/README.md: setup instructions and env var fallback reference - README.md: link to examples from Configuration Reference section
Add shell() helper to git.ts for commands needing pipes/redirects/||.
Fix run() calls that passed shell syntax or prefixed 'git' in strings:
- verify-completion: tsc, build, cat → shell(); git diff → array args
- token-audit: git diff → array args; wc -l → shell()
- clarify-intent: tsc pipe, find pipe → shell()
- session-handoff: command -v, gh pr list → shell()
- audit-workspace: git diff → array args; find pipe → shell()
- enrich-agent-task: git ls-files pipes, head → shell()
- sequence-tasks: git ls-files pipe → shell()
- scope-work: run('git status/diff') → run([...]) (removed 'git' prefix)
- sharpen-followup: run() with shell redirects → run([...]) array args
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.
Closes #110
Problem
After the
execFileSyncmigration, 8 tool files still passed shell syntax (|,||,2>/dev/null,2>&1) or prefixedgitin strings throughrun(), which usesexecFileSync(no shell). These commands silently broke or produced wrong results.Fix
shell()helper togit.ts— usesexecSyncwith shell for commands that genuinely need pipes/redirectsrun(['diff', '--name-only'])shell(): pipes, redirects,||, non-git commands (cat,find,wc,command -v,tsc,head)Files changed
src/lib/git.ts— added exportedshell()helperverify-completion.ts,token-audit.ts,clarify-intent.ts,session-handoff.ts,audit-workspace.ts,enrich-agent-task.ts,sequence-tasks.ts,scope-work.ts,sharpen-followup.tsBuild clean, all 43 tests pass.