Skip to content

validate, engine: warn on tool_command with absolute cd path#39

Open
thewoolleyman wants to merge 1 commit intodanshapiro:mainfrom
thewoolleyman:tool-command-path-safety
Open

validate, engine: warn on tool_command with absolute cd path#39
thewoolleyman wants to merge 1 commit intodanshapiro:mainfrom
thewoolleyman:tool-command-path-safety

Conversation

@thewoolleyman
Copy link

Summary

  • Add a validator warning when tool_command attributes contain cd /absolute/path, which breaks portability across machines and CI
  • Add a runtime warning in the tool handler that logs when absolute cd paths are detected during execution
  • Includes design plan in docs/plans/

Test plan

  • Validator test for absolute cd path detection in validate_test.go
  • Full test suite passes on macOS and Linux CI

🤖 Generated with Claude Code

Detect `cd /absolute/path` in tool_command at both validation time
(lint rule) and runtime (warnEngine), preventing silent worktree CWD
overrides.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@thewoolleyman
Copy link
Author

Note: After merging this PR, #41 (test fixes + gofmt + CI) should be merged last — it includes a repo-wide gofmt pass that touches files in this PR. Merging #41 after the others avoids conflicts.

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.

1 participant