Skip to content

Commit 6ebac23

Browse files
committed
fix: finish Windows runner compatibility
1 parent 7dc62b9 commit 6ebac23

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

paperforge/compute/ssh.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,13 @@ def _validate_windows_acl(path: Path, *, label: str, private: bool) -> None:
151151
throw "ACL target is unavailable"
152152
}
153153
$acl = Get-Acl -LiteralPath $target
154+
$sections = (
155+
[System.Security.AccessControl.AccessControlSections]::Access -bor
156+
[System.Security.AccessControl.AccessControlSections]::Owner -bor
157+
[System.Security.AccessControl.AccessControlSections]::Group
158+
)
154159
$sddl = $acl.GetSecurityDescriptorSddlForm(
155-
[System.Security.AccessControl.AccessControlSections]::All
160+
$sections
156161
)
157162
$descriptor = [System.Security.AccessControl.RawSecurityDescriptor]::new($sddl)
158163
$daclPresent = (

tests/test_compute_backends.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545

4646

4747
def _local_test_timeout(seconds: int = 5) -> int:
48-
return 20 if os.name == "nt" else seconds
48+
return 60 if os.name == "nt" else seconds
49+
50+
51+
def _local_process_timeout(seconds: int = 5) -> int:
52+
return 30 if os.name == "nt" else seconds
4953

5054

5155
def _secure_test_file(path: Path, *, mode: int) -> None:
@@ -1489,7 +1493,7 @@ def test_local_resume_uses_fresh_attempt_artifacts(tmp_path: Path) -> None:
14891493
command=[sys.executable, "-c", code],
14901494
workdir=workdir,
14911495
outputs=["result.txt"],
1492-
resources=ResourceSpec(timeout_seconds=_local_test_timeout()),
1496+
resources=ResourceSpec(timeout_seconds=_local_process_timeout()),
14931497
execute=True,
14941498
)
14951499
)

tests/test_v3_cli_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,9 @@ def test_docker_binding_mounts_approved_snapshot_read_only(
726726
if value == "--volume"
727727
]
728728
assert any(
729-
volume.endswith("/attempts/1/workspace:/workspace:ro")
729+
volume.replace("\\", "/").endswith(
730+
"/attempts/1/workspace:/workspace:ro"
731+
)
730732
for volume in volumes
731733
)
732734
assert "/paperforge-outputs:rw,noexec,nosuid,nodev,size=64m" in argv

0 commit comments

Comments
 (0)