YuzuruS
f5c2be1910
fix: distinguish outside-workspace errors from not-found in fs-safe
...
When editing a file outside the workspace root, SafeOpenError previously
used the "invalid-path" code with the message "path escapes root". This
was indistinguishable from other invalid-path errors (hardlinks, symlinks,
non-files) and consumers often fell back to a generic "not found" message,
which was misleading.
Add a new "outside-workspace" error code with the message "file is outside
workspace root" so consumers can surface a clear, accurate error message.
- fs-safe.ts: add "outside-workspace" to SafeOpenErrorCode, use it for
all path-escapes-root checks in openFileWithinRoot/writeFileWithinRoot
- pi-tools.read.ts: map "outside-workspace" to EACCES instead of rethrowing
- browser/paths.ts: return specific "File is outside {scopeLabel}" message
- media/server.ts: return 400 with descriptive message for outside-workspace
- fs-safe.test.ts: update traversal test expectations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:08:10 +05:30
..
2026-02-26 22:17:58 +01:00
2026-02-14 13:17:41 +01:00
2026-02-22 18:37:25 +00:00
2026-02-21 13:56:58 +01:00
2026-02-21 19:24:42 +01:00
2026-02-18 18:33:40 +00:00
2026-02-21 11:46:11 +01:00
2026-02-21 11:46:11 +01:00
2026-02-23 18:56:14 +00:00
2026-02-22 19:08:38 +01:00
2026-02-24 04:23:22 +00:00
2026-02-22 17:54:51 +00:00
2026-02-22 18:37:25 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-22 18:37:25 +00:00
2026-02-18 01:34:35 +00:00
2026-02-18 18:54:27 +00:00
2026-02-18 01:34:35 +00:00
2026-02-15 18:22:10 +00:00
2026-01-12 17:32:44 +00:00
2026-02-15 18:22:10 +00:00
2026-01-12 17:32:44 +00:00
2026-02-22 17:20:27 +01:00
2026-02-26 19:55:39 +00:00
2026-02-16 14:59:31 +00:00
2026-01-31 16:19:20 +09:00
2026-02-24 01:52:01 +00:00
2026-02-24 01:52:01 +00:00
2026-01-30 03:16:21 +01:00
2026-02-22 17:11:54 +00:00
2026-02-19 08:25:12 +00:00
2026-02-19 02:35:50 -05:00
2026-02-18 17:48:02 +00:00
2026-02-14 15:54:29 +01:00
2026-02-23 18:56:14 +00:00
2026-02-23 18:56:14 +00:00
2026-02-26 15:08:55 +00:00
2026-02-26 15:08:55 +00:00
2026-02-26 22:17:58 +01:00
2026-02-14 13:30:11 +01:00
2026-02-24 01:52:01 +00:00
2026-02-24 01:52:01 +00:00
2026-02-26 01:04:05 +01:00
2026-02-28 18:08:10 +05:30
2026-02-18 01:34:35 +00:00
2026-02-18 01:34:35 +00:00
2026-02-21 21:44:50 +00:00
2026-02-02 16:18:09 +09:00
2026-02-14 15:39:45 +00:00
2026-01-31 16:19:20 +09:00
2026-02-13 20:26:39 +00:00
2026-02-17 15:50:07 +09:00
2026-02-13 20:26:39 +00:00
2026-02-01 10:03:47 +09:00
2026-02-23 05:43:43 +00:00
2026-02-18 22:06:44 +00:00
2026-02-22 08:40:29 +00:00
2026-02-22 08:07:41 +00:00
2026-02-22 08:05:12 +00:00
2026-02-01 10:03:47 +09:00
2026-02-24 01:52:01 +00:00
2026-01-31 16:19:20 +09:00
2026-02-21 23:58:33 +00:00
2026-02-26 00:40:56 +01:00
2026-02-19 15:19:38 +00:00
2026-02-26 00:40:56 +01:00
2026-02-26 22:17:58 +01:00
2026-02-26 00:40:56 +01:00
2026-01-31 16:19:20 +09:00
2026-02-26 00:40:56 +01:00
2026-01-31 16:19:20 +09:00
2026-02-21 11:46:11 +01:00
2026-02-24 01:52:01 +00:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-14 21:20:43 +00:00
2026-01-14 15:02:19 +00:00
2026-01-14 05:39:44 +00:00
2026-02-19 07:24:02 +00:00
2026-02-18 01:34:35 +00:00
2026-02-22 11:05:26 +00:00
2026-02-18 18:25:25 +00:00
2026-02-22 17:54:51 +00:00
2026-02-18 01:34:35 +00:00
2026-02-19 15:19:38 +00:00
2026-02-23 05:45:54 +00:00
2026-02-24 01:52:01 +00:00
2026-02-18 14:15:20 +00:00
2026-02-22 08:01:15 +00:00
2026-02-18 17:48:02 +00:00
2026-02-15 04:46:10 +00:00
2026-02-26 22:17:58 +01:00
2026-02-24 04:39:53 +00:00
2026-02-16 14:59:31 +00:00
2026-02-14 14:25:54 +00:00
2026-02-22 17:54:51 +00:00
2026-02-14 20:12:26 +00:00
2026-02-22 17:54:51 +00:00
2026-02-18 17:48:02 +00:00
2026-01-31 16:19:20 +09:00
2026-02-18 01:34:35 +00:00
2026-02-22 10:16:19 +01:00