commit 5f81e090dfcbf48d74454ce0e01b456dd67a11b0
parent 2df1e931c8d5c6653ecf13a458028a44ce7cee62
Author: triesap <tyson@radroots.org>
Date: Mon, 31 Aug 2026 22:41:21 +0000
test(ios): normalize simulator evidence
- preserve exact runtime and xcresult version agreement
- normalize omitted zero patch components for attempt binding
- retain explicit nonzero patch versions without rewriting
- cover both simulator version shapes in verifier tests
Diffstat:
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/scripts/local-social-fixture.py b/scripts/local-social-fixture.py
@@ -1554,7 +1554,12 @@ def simulator_metadata(udid: str, result_bundle: Path) -> dict[str, str]:
or architecture != "arm64"
):
raise ValueError("simulator does not satisfy the development platform contract")
- return {"udid": udid.upper(), "os": f"iOS {version}", "architecture": architecture}
+ canonical_version = version if version.count(".") == 2 else f"{version}.0"
+ return {
+ "udid": udid.upper(),
+ "os": f"iOS {canonical_version}",
+ "architecture": architecture,
+ }
def validate_persona_evidence(value: Any, suite: dict[str, Any]) -> dict[str, Any]:
diff --git a/scripts/test_local_social_fixture.py b/scripts/test_local_social_fixture.py
@@ -1012,13 +1012,35 @@ class LocalSocialFixtureTests(unittest.TestCase):
) as run_json:
self.assertEqual(
fixture.simulator_metadata(udid.lower(), result_bundle),
- {"udid": udid, "os": "iOS 26.5", "architecture": "arm64"},
+ {"udid": udid, "os": "iOS 26.5.0", "architecture": "arm64"},
)
commands = [call.args[0] for call in run_json.call_args_list]
self.assertEqual(commands[0][:3], ["xcrun", "simctl", "list"])
self.assertEqual(commands[1][:3], ["xcrun", "xcresulttool", "get"])
self.assertNotIn("spawn", commands[0] + commands[1])
+ patch_summary = copy.deepcopy(result_summary)
+ patch_summary["devicesAndConfigurations"][0]["device"]["osVersion"] = (
+ "26.5.1"
+ )
+ patch_devices = {
+ "devices": {
+ "com.apple.CoreSimulator.SimRuntime.iOS-26-5-1": [
+ simctl_devices["devices"][
+ "com.apple.CoreSimulator.SimRuntime.iOS-26-5"
+ ][0]
+ ]
+ }
+ }
+ with mock.patch.object(
+ fixture,
+ "run_json_command_bounded",
+ side_effect=[patch_devices, patch_summary],
+ ):
+ self.assertEqual(
+ fixture.simulator_metadata(udid, result_bundle)["os"], "iOS 26.5.1"
+ )
+
for mutation in (
lambda value: value["devicesAndConfigurations"][0]["device"].update(
{"architecture": "x86_64"}