The root cause was twofold: 1. Raw (unsanitized) agent responses were stored in the conversation history DB. On subsequent calls, these paths were fed back to the agent as context, causing it to reproduce full paths regardless of Discord-side sanitization. 2. repoRoot (workspace_path) was not passed to sanitizeForDiscord, so workspace-specific paths were only partially masked via the home directory fallback. Fix: sanitize the full response once before both sending to Discord and storing in the DB. Pass workspace_path as repoRoot for precise path replacement. Add Windows path tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| identity-templates.test.ts | ||
| lockfile.test.ts | ||
| logger.test.ts | ||
| path-traversal.test.ts | ||
| resolve-claude.test.ts | ||
| sanitize-env.test.ts | ||
| sanitize-for-discord.test.ts | ||
| schemas.test.ts | ||
| semaphore.test.ts | ||
| workspace-root-resolve.test.ts | ||