Skip to content

fix: remaining shell syntax in run() calls (closes #110)#124

Closed
TerminalGravity wants to merge 5 commits intomainfrom
fix/shell-syntax-remaining-files
Closed

fix: remaining shell syntax in run() calls (closes #110)#124
TerminalGravity wants to merge 5 commits intomainfrom
fix/shell-syntax-remaining-files

Conversation

@TerminalGravity
Copy link
Collaborator

Fixes the 3 remaining instances from #110 where run() (which uses execFileSync — no shell) was being called with shell syntax:

  • token-audit.ts: wc -c and tail -c calls → shell()
  • scope-work.ts: git ls-files | head | grep pipeline → shell(), added shell to imports

These would silently fail because execFileSync passes shell operators (|, <, 2>/dev/null) as literal arguments to git.

Build passes clean. Closes #110.

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
Fixes 3 remaining instances where run() (execFileSync, no shell) was called
with shell syntax (pipes, redirects, non-git commands):

- token-audit.ts: wc -c and tail -c calls now use shell()
- scope-work.ts: git ls-files | head | grep pipeline now uses shell()

These would silently fail since execFileSync passes shell operators as
literal args to git.

Closes #110
@TerminalGravity
Copy link
Collaborator Author

Superseded by #125 — same fixes plus the cleaner shell.ts module approach. Closing in favor of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Widespread shell syntax in run() calls after execFileSync migration

1 participant