Skip to content

refactor(utils): extract stripTrailingSlash and drop redundant require('path')#476

Merged
koichimurakami merged 1 commit into
developfrom
refactor/agent-string-utils
Jun 25, 2026
Merged

refactor(utils): extract stripTrailingSlash and drop redundant require('path')#476
koichimurakami merged 1 commit into
developfrom
refactor/agent-string-utils

Conversation

@koichimurakami

Copy link
Copy Markdown
Contributor

Summary

Pure consolidation; behavior unchanged.

  • Add stripTrailingSlash() to utils.ts as the single source of truth for the replace(/\/$/, '') idiom, used in the security path guards (2 sites) and the Docker volume mount builder (2 sites)
  • Remove two inline require('path') calls in docker-utils.ts in favor of the existing top-level import * as path from 'path'

Test

  • 4420 tests pass; coverage 99.23% / 97.18% / 98.49% / 99.43% (thresholds 95/90/95/95 cleared)
  • tsc --noEmit clean

🤖 Generated with Claude Code

…e('path')

- Add stripTrailingSlash() to utils as the single source of truth for the
  `replace(/\/$/, '')` idiom; use it in the security path guards (2x) and the
  Docker volume mount builder (2x).
- Remove two inline `require('path')` calls in docker-utils.ts in favor of the
  existing top-level `import * as path from 'path'`.

Pure consolidation; behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koichimurakami koichimurakami merged commit b79531b into develop Jun 25, 2026
3 checks passed
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