Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test(desktop): cover readFileForPreview schema and path containment

6 months ago

c8cee4a
Authored
mweinbach4/16/2026, 3:08:23 PM
Adds focused tests for the file-preview IPC contract:
- Schema validation for path and maxBytes bounds (negative, oversized,
  non-integer).
- Workspace-root containment via resolveAllowedPath, including symlink
  escapes.
- The byte-slice + truncation contract enforced by the IPC handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Parent7dd1729

1 file changed
  • apps/desktop/test/read-file-for-preview.test.ts+155−0