Skip to content

Commit 242ddfd

Browse files
committed
[ML] Address Copilot review on kill switch test
- Update stale branch references to generic requirements - Treat model generation failures as test failures, not skips — for security regression tests, silently skipping is unsafe Made-with: Cursor
1 parent 554bea8 commit 242ddfd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/test_pytorch_inference_evil_models.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
--binary PATH Explicit path to the pytorch_inference binary.
2222
If omitted, the script searches standard build locations.
2323
24-
Requires: torch, a built pytorch_inference binary with graph validation
25-
(feature/harden_pytorch_inference branch or later).
24+
Requires: torch, and a built pytorch_inference binary from this repository
25+
with graph validation enabled (i.e., including the
26+
CModelGraphValidator checks).
2627
"""
2728

2829
import argparse
@@ -215,7 +216,7 @@ def find_pytorch_inference() -> str:
215216

216217
raise FileNotFoundError(
217218
"Could not find pytorch_inference binary. "
218-
"Build from the feature/harden_pytorch_inference branch, or pass --binary."
219+
"Build the project with graph validation enabled, or pass --binary."
219220
)
220221

221222

@@ -315,7 +316,8 @@ def run_tests(binary: str) -> bool:
315316
generate_model(spec["class"], model_path)
316317
print(f" Model generated: {model_path.name} ({model_path.stat().st_size} bytes)")
317318
except Exception as e:
318-
print(f" SKIP: could not generate model: {e}")
319+
print(f" FAIL: could not generate model: {e}")
320+
all_passed = False
319321
print()
320322
continue
321323

0 commit comments

Comments
 (0)