tenseleyflow/sway / f230789

Browse files

core/golden: mask adapter_id + base_model_id — cross-platform path drift

Authored by espadonne
SHA
f230789114b7fa278df317d17a9253b39763e16e
Parents
a1f96b7
Tree
cc65f53

2 changed files

StatusFile+-
M src/dlm_sway/core/golden.py 8 0
M tests/unit/test_golden_comparator.py 3 0
src/dlm_sway/core/golden.pymodified
@@ -46,6 +46,14 @@ DEFAULT_VARIABLE_FIELDS: frozenset[str] = frozenset(
4646
         # that vary with load and cold/warm cache — not part of the
4747
         # determinism contract.
4848
         "backend_stats",
49
+        # ``adapter_id`` and ``base_model_id`` are absolute-path
50
+        # identifiers the spec loader resolves against cwd. Different
51
+        # cwds on different platforms (``/Users/.../`` on darwin vs
52
+        # ``/home/runner/...`` on ubuntu) surface as drift without
53
+        # any real numeric change. The numeric fields (``raw``,
54
+        # ``score``, etc.) are what the determinism contract covers.
55
+        "adapter_id",
56
+        "base_model_id",
4957
     }
5058
 )
5159
 
tests/unit/test_golden_comparator.pymodified
@@ -71,6 +71,9 @@ class TestMaskVariableFields:
7171
             "duration_s",
7272
             "sway_version",
7373
             "backend_stats",
74
+            # Platform-dependent path identifiers.
75
+            "adapter_id",
76
+            "base_model_id",
7477
         }
7578
         assert expected_members <= DEFAULT_VARIABLE_FIELDS
7679