text
stringlengths
0
1.9k
PASSED ::test_frozen_inputs_untampered
PASSED ::test_series_bright_and_dark_rates_match_truth
PASSED ::test_series_spin_flip_probability_matches_truth
PASSED ::test_series_populations_match_truth
PASSED ::test_series_threshold_and_full_window_fidelity_match_reference
PASSED ::test_series_fidelity_curve_matches_reference
PASSED ::test_series_leak_time_posterior_matches_reference
PASSED ::test_series_optimal_integration_time_is_near_optimal
PASSED ::test_series_internal_consistency
PASSED ::test_physics_invariants
PASSED ::test_independent_mle_recovers_injected_truth_from_frozen_data
PASSED ::test_real_anchor_two_poisson_recovery
PASSED ::test_no_leaked_reference_artifacts
============================= 14 passed in 50.58s ==============================
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-8.4.1, pluggy-1.6.0 -- /usr/local/bin/python3
rootdir: /app
configfile: ../dev/null
plugins: json-ctrf-0.3.5
collecting ... collected 17 items
::test_results_present_and_complete PASSED [ 5%]
::test_frozen_inputs_untampered PASSED [ 11%]
::test_series_bright_and_dark_rates_match_truth PASSED [ 17%]
::test_series_spin_flip_probability_matches_truth PASSED [ 23%]
::test_series_populations_match_truth PASSED [ 29%]
::test_series_threshold_and_full_window_fidelity_match_reference PASSED [ 35%]
::test_series_fidelity_curve_matches_reference PASSED [ 41%]
::test_series_leak_time_posterior_matches_reference PASSED [ 47%]
::test_series_uncertainties_match_reference PASSED [ 52%]
::test_profile_spin_flip_intervals_match_reference PASSED [ 58%]
::test_series_optimal_integration_time_is_near_optimal PASSED [ 64%]
::test_series_internal_consistency PASSED [ 70%]
::test_physics_invariants PASSED [ 76%]
::test_independent_mle_recovers_injected_truth_from_frozen_data PASSED [ 82%]
::test_real_anchor_two_poisson_recovery PASSED [ 88%]
::test_reusable_solver_handles_heldout_configuration FAILED [ 94%]
::test_no_leaked_reference_artifacts PASSED [100%]
=================================== FAILURES ===================================
______________ test_reusable_solver_handles_heldout_configuration ______________
def test_reusable_solver_handles_heldout_configuration():
solver = OUT / "solve.py"
assert solver.is_file(), "Missing reusable /root/output/solve.py"
solver_text = solver.read_text(errors="replace")
forbidden = ("/verifier", "test_outputs.py", "WITHHELD_TRUTH", "/oracle")
assert not any(token in solver_text for token in forbidden), (
"solve.py must not reference verifier/oracle internals")
heldout = LOGS / "heldout_data"
heldout_out = LOGS / "heldout_output"
heldout.mkdir(parents=True, exist_ok=True)
heldout_out.mkdir(parents=True, exist_ok=True)
truth = {
"readout_series_01.h5": (47.0, 2.7, 0.09, 0.56, 101),
"readout_series_02.h5": (31.0, 4.6, 0.24, 0.44, 202),
}
for name, (lb, ld, fp, pb, seed) in truth.items():
write_h5_series(heldout / name, lb, ld, fp, pb, seed=seed)
write_reference_histogram(heldout / "readout_reference_bimodal.h5")
files = {}
for path in sorted(heldout.glob("*.h5")):
files[path.name] = {"sha256": sha256(path)}
(heldout / "provenance.json").write_text(json.dumps({"files": files}, indent=2))
# The submitted reusable solver is agent-controlled code. Run it as an
# unprivileged user with verifier/oracle directories unreadable so the
# held-out check grades generalization, not verifier introspection.
for directory in (heldout, heldout_out):
os.chmod(directory, 0o777)
for path in directory.iterdir():
os.chmod(path, 0o666 if path.is_file() else 0o777)
protected_dirs = [Path("/verifier"), Path("/oracle")]
original_modes = {}
for directory in protected_dirs:
if directory.exists():
original_modes[directory] = directory.stat().st_mode & 0o777
os.chmod(directory, 0o700)
cmd = ["python3", str(solver), "--data-dir", str(heldout), "--output-dir", str(heldout_out)]
if shutil.which("setpriv"):
cmd = ["setpriv", "--reuid=nobody", "--regid=nogroup", "--init-groups", "--"] + cmd
elif shutil.which("su"):
cmd = ["su", "-s", "/bin/sh", "nobody", "-c", " ".join(shlex.quote(part) for part in cmd)]
else:
raise AssertionError("No setpriv/su available for unprivileged held-out solver run")
proc = subprocess.run(
cmd,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
timeout=360,
)
for directory, mode in original_modes.items():
os.chmod(directory, mode)
> assert proc.returncode == 0, f"held-out solve.py failed\nSTDOUT:\n{proc.stdout}\nSTDERR:\n{proc.stderr}"
E AssertionError: held-out solve.py failed
E STDOUT: