test_runtime_child_remap: inject remap body rejects through the boundary record

The removed _boundaries list made the two body-reject patches no-ops.
Inject them via _device_boundaries (level-2 record with foreign host
geometry; non-None level-1 record). set_jet_amplitude docstring names
the public jets view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-10-28 10:22:29 +00:00
co-authored by Claude Opus 5.5
parent ae766f7112
commit 65339ab54e
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -640,7 +640,7 @@ class FixedPatchStepper:
return candidate
def set_jet_amplitude(self, index, amplitude, *, level):
"""Replace Jet ``index`` of ``level_jets[level]`` between steps; no geometry/table rebuild.
"""Replace Jet ``index`` of level ``level`` (``jets[level]``) between steps; no table rebuild.
Invalid input raises before any change. A device/sync error marks the
instance failed (as step/initialize do); host state commits only after
+5 -3
View File
@@ -1,5 +1,6 @@
"""CPU mocks execute production remap lifecycle; no GPU numerical claim."""
from dataclasses import replace
from types import SimpleNamespace
import unittest
from unittest.mock import patch
@@ -69,10 +70,11 @@ class RuntimeChildRemap(unittest.TestCase):
run._status = 'ready'
for bad in ([], [(40,16,48,40)], [(16,16,32,24),(16,27,32,55)]):
with self.assertRaises(ValueError): run.remap_finest(bad)
hosts, pairs = run.boundaries, run.hierarchy.pairs
records, pairs = run._device_boundaries, run.hierarchy.pairs
for attribute, value in (('_wall_aware', True),
('_boundaries', [*hosts[:2], object()]), # child boundary
('_boundaries', [hosts[0], object(), hosts[2]]), # fine boundary
# level-2 record whose host geometry differs from objects=()
('_device_boundaries', [*records[:2], SimpleNamespace(host=object(), jets=())]),
('_device_boundaries', [records[0], object(), records[2]]), # level-1 body
('hierarchy', replace(run.hierarchy, pairs=(pairs[0], None)))):
with patch.object(run, attribute, value):
with self.assertRaises(ValueError): run.remap_finest(B)