kshitijk4poor
a721612bfa
fix(file_ops): vet the Delete/Move entry itself, not its parent directory
...
The previous fold guarded each Delete/Move entry by running
get_write_denied_error on dirname(path). That coordinate is wrong both ways:
- runtime self-protection treats ANCESTORS of the running venv/interpreter
as protected, so a plain file directly in ~, ~/.hermes, the checkout root
or the uv python dir could no longer be deleted or moved ("'/Users/x' is a
protected system/credential file");
- credential-dir prefixes end in os.sep and match via startswith, so the
bare dir ~/.ssh never matched and a link directly inside ~/.ssh, ~/.aws,
~/.gnupg, ... was unlinked/renamed.
The existing classifier gains an entry=True mode (get_write_denied_error /
_classify_write_denial, and is_protected_path(follow=False)) that vets
realpath(parent)/basename — the entry, leaf not dereferenced — in addition
to the resolved target. A file inside a protected dir or prefix is denied;
a file merely beside the venv is allowed. delete_file and move_file make
one entry-mode call per entry instead of the duplicated path+dirname loop.
The new parametrized test covers both directions (plain Delete/Move next to
a monkeypatched runtime venv succeeds; a link in <home>/.ssh is refused with
link and target intact); all four cases fail on the previous fold head.
2026-09-27 01:10:56 +05:30
..
2026-09-24 11:50:30 -04:00
2026-09-23 20:04:27 -04:00
2026-09-23 06:46:02 -07:00
2026-09-27 00:56:31 +05:30
2026-09-21 15:02:49 -07:00
2026-09-17 13:52:05 -04:00
2026-09-20 15:32:00 -07:00
2026-09-17 09:04:38 -07:00
2026-09-15 21:46:37 -07:00
2026-09-20 15:32:42 -07:00
2026-09-25 16:24:21 -05:00
2026-09-20 18:50:37 -07:00
2026-09-24 02:41:14 -05:00
2026-09-17 21:17:26 +05:30
2026-09-20 10:16:51 -07:00
2026-09-21 00:58:39 -04:00
2026-09-24 06:55:33 -04:00
2026-09-24 06:30:41 -04:00
2026-09-21 00:58:39 -04:00
2026-09-17 13:52:05 -04:00
2026-09-23 20:04:27 -04:00
2026-09-18 10:28:40 -07:00
2026-09-15 06:16:38 -07:00
2026-09-24 11:50:30 -04:00
2026-09-23 10:13:26 -04:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-24 11:50:30 -04:00
2026-09-17 09:02:55 -07:00
2026-09-23 07:36:31 -04:00
2026-09-23 07:36:31 -04:00
2026-09-18 14:06:15 -07:00
2026-09-24 01:55:51 -04:00
2026-09-24 03:42:38 -04:00
2026-09-24 01:55:51 -04:00
2026-09-19 01:03:23 -04:00
2026-09-16 17:47:50 -07:00
2026-09-19 10:44:26 -07:00
2026-09-27 00:56:31 +05:30
2026-09-27 00:56:31 +05:30
2026-09-27 00:56:31 +05:30
2026-09-20 15:49:52 -07:00
2026-09-20 15:54:45 -07:00
2026-09-21 06:09:56 -04:00
2026-09-17 13:52:05 -04:00
2026-09-20 15:50:20 -07:00
2026-09-23 10:42:18 -04:00
2026-09-20 09:52:22 -07:00
2026-09-19 23:57:59 -07:00
2026-09-15 18:40:52 -07:00
2026-09-22 13:57:51 +05:30
2026-09-15 03:45:41 -07:00
2026-09-25 17:33:06 -05:00
2026-09-20 12:53:47 -07:00
2026-09-21 14:01:47 -04:00
2026-09-25 14:58:09 -04:00
2026-09-25 14:58:09 -04:00
2026-09-21 00:58:39 -04:00
2026-09-27 01:10:56 +05:30
2026-09-18 10:10:40 -07:00
2026-09-27 01:10:56 +05:30
2026-09-21 18:39:24 -07:00
2026-09-26 22:26:05 +05:30
2026-09-27 01:10:56 +05:30
2026-09-24 15:58:26 +05:30
2026-09-16 16:59:03 -07:00
2026-09-16 16:42:47 -07:00
2026-09-21 10:40:03 -07:00
2026-09-16 17:21:14 -07:00
2026-09-19 10:44:26 -07:00
2026-09-26 11:16:45 -07:00
2026-09-23 10:07:51 -07:00
2026-09-23 06:46:02 -07:00
2026-09-21 10:04:32 +05:30
2026-09-22 17:54:42 +05:30
2026-09-20 18:22:18 -07:00
2026-09-25 14:27:51 +05:30
2026-09-23 11:41:01 -04:00
2026-09-21 19:08:19 -04:00
2026-09-23 15:43:51 -07:00
2026-09-22 22:00:24 +00:00
2026-09-25 18:31:02 -05:00
2026-09-23 06:46:02 -07:00
2026-09-20 10:07:26 -07:00
2026-09-22 17:54:42 +05:30
2026-09-17 19:06:29 -04:00
2026-09-23 10:13:26 -04:00
2026-09-26 22:40:54 +05:30
2026-09-18 19:31:50 -04:00
2026-09-21 13:14:22 -07:00
2026-09-26 22:40:54 +05:30
2026-09-26 22:40:54 +05:30
2026-09-26 22:40:54 +05:30
2026-09-24 15:38:22 +05:30
2026-09-24 15:38:22 +05:30
2026-09-23 06:46:02 -07:00
2026-09-25 14:58:09 -04:00
2026-09-20 10:57:35 -07:00
2026-09-20 11:49:00 -07:00
2026-09-21 00:58:39 -04:00
2026-09-21 15:02:49 -07:00
2026-09-17 13:52:05 -04:00
2026-09-25 13:49:31 -05:00
2026-09-24 03:52:03 -05:00
2026-09-19 22:57:07 -04:00
2026-09-25 12:10:14 -05:00
2026-09-23 15:26:34 -04:00
2026-09-19 10:16:59 -07:00
2026-09-23 18:52:49 -05:00
2026-09-21 19:08:19 -04:00
2026-09-20 11:12:48 -07:00
2026-09-23 18:29:35 -05:00
2026-09-18 09:35:16 -07:00
2026-09-22 07:05:11 -04:00
2026-09-22 05:16:50 -04:00
2026-09-24 16:49:18 +05:30
2026-09-24 07:39:33 -04:00
2026-09-25 14:24:56 -05:00
2026-09-21 00:58:39 -04:00
2026-09-22 15:59:17 +05:30
2026-09-22 07:05:11 -04:00
2026-09-20 16:00:26 -07:00
2026-09-22 07:05:11 -04:00
2026-09-17 13:52:05 -04:00
2026-09-22 15:59:17 +05:30
2026-09-20 12:58:32 -07:00
2026-09-22 09:28:52 -04:00
2026-09-25 14:24:56 -05:00
2026-09-16 17:23:44 -07:00
2026-09-15 18:33:15 -07:00
2026-09-22 09:55:47 -04:00
2026-09-19 01:29:03 -07:00
2026-09-22 16:15:34 +05:30
2026-09-18 17:26:10 -04:00
2026-09-25 13:49:31 -05:00
2026-09-26 06:20:21 +05:30
2026-09-18 12:49:13 -07:00
2026-09-23 17:09:54 -07:00
2026-09-17 13:52:05 -04:00
2026-09-26 23:44:55 +05:30
2026-09-26 06:20:21 +05:30
2026-09-20 11:30:03 -07:00
2026-09-24 14:23:47 -04:00
2026-09-20 10:17:04 -07:00
2026-09-22 13:57:51 +05:30
2026-09-27 00:56:31 +05:30
2026-09-22 17:54:42 +05:30
2026-09-19 10:03:11 -07:00
2026-09-23 11:54:30 +05:30
2026-09-22 05:16:50 -04:00
2026-09-19 22:57:07 -04:00
2026-09-19 22:57:07 -04:00
2026-09-17 13:52:05 -04:00
2026-09-22 05:16:50 -04:00
2026-09-26 06:19:34 +05:30
2026-09-23 18:30:12 -05:00
2026-09-24 03:48:31 -04:00
2026-09-19 10:10:29 -07:00
2026-09-26 06:19:34 +05:30
2026-09-20 10:25:30 -07:00
2026-09-21 19:08:19 -04:00
2026-09-20 15:28:59 -07:00
2026-09-19 12:22:44 -07:00
2026-09-19 09:52:18 -07:00
2026-09-19 22:57:07 -04:00
2026-09-21 00:58:39 -04:00
2026-09-19 10:54:38 -07:00
2026-09-26 06:19:34 +05:30
2026-09-21 19:08:19 -04:00
2026-09-15 18:42:38 -07:00
2026-09-24 16:17:16 -04:00
2026-09-19 03:07:47 -07:00
2026-09-24 16:17:16 -04:00
2026-09-18 17:26:10 -04:00
2026-09-23 11:41:01 -04:00
2026-09-19 12:22:44 -07:00