2 Commits

Author SHA1 Message Date
Shxiao
9ce6fdcb22
test(skills): skip POSIX mode-bit assertions on Windows (#5244)
* test(skills): skip POSIX mode-bit assertions on Windows

Windows has no POSIX mode bits: st_mode always reports 0o777 and
Path.chmod only honors the read-only flag, so the readability
assertions in both skill-permissions tests cannot hold on Windows
hosts. Skip them there with an explicit reason; they still run on
POSIX where the chmod contract applies.

* test(skills): address review feedback on Windows skips

- correct the skip reason: Windows mode bits are observable; it is
  Path.chmod() that only toggles the read-only bit, so the asserted
  0o644/0o755 modes are never observable there;
- hoist the repeated skipif to a module-level requires_posix_mode_bits
  decorator so the reason stays single-sourced;
- keep test_written_path_readability_is_limited_to_written_path
  executing the resolve()/relative_to() traversal on Windows with
  content-intact smoke assertions, skipping only the mode-bit asserts.

* test(skills): single-source the skip reason string

Follow-up to the re-review: the reason text lived verbatim in both the
module-level skipif and the inline pytest.skip() call; promote it to a
_POSIX_MODE_BITS_REASON constant used by both call sites.
2026-09-08 09:21:38 +08:00
AochenShen99
8decfd327e
Fix custom skill install permissions (#3241)
* Fix custom skill install permissions

* Fix skill upload test portability

* Keep custom skill writes sandbox readable

* Clear sandbox write bits on skill permissions

* Limit custom skill write permission updates
2026-05-28 15:48:32 +08:00