core/golden: mask adapter_id + base_model_id — cross-platform path drift
- SHA
f230789114b7fa278df317d17a9253b39763e16e- Parents
-
a1f96b7 - Tree
cc65f53
f230789
f230789114b7fa278df317d17a9253b39763e16ea1f96b7
cc65f53| Status | File | + | - |
|---|---|---|---|
| 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( | ||
| 46 | 46 | # that vary with load and cold/warm cache — not part of the |
| 47 | 47 | # determinism contract. |
| 48 | 48 | "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", | |
| 49 | 57 | } |
| 50 | 58 | ) |
| 51 | 59 | |
tests/unit/test_golden_comparator.pymodified@@ -71,6 +71,9 @@ class TestMaskVariableFields: | ||
| 71 | 71 | "duration_s", |
| 72 | 72 | "sway_version", |
| 73 | 73 | "backend_stats", |
| 74 | + # Platform-dependent path identifiers. | |
| 75 | + "adapter_id", | |
| 76 | + "base_model_id", | |
| 74 | 77 | } |
| 75 | 78 | assert expected_members <= DEFAULT_VARIABLE_FIELDS |
| 76 | 79 | |