Commit 74958a1
fix(provenance): record traced child's Python identity, not roar's host
Friction-journal feedback on #108: after the cross-Python fixes,
`roar show @N` reports `Environment: ... Python 3.13.x` for jobs whose
command was system `python3` (3.12). The Python identity in job
metadata was being captured from `platform.python_version()` in roar's
own host process (`runtime_collector.collect`), not from the traced
child. Right at the seam roar is selling reproducibility on.
Captures `python_version` + `python_implementation` from
`platform.{python_version,python_implementation}()` *inside* the traced
process in `tracker.write_log`, threads them through the
`PythonInjectData` model, and has `runtime_collector` prefer the
traced values (falling back to host values when the inject log is
missing the fields, e.g. older logs).
Also: stderr remediation in `sitecustomize.py` now suggests
`uv tool install --python pythonX.Y roar-cli --reinstall` instead of
`--force`. Same effect, accurate user-facing semantics, less alarming.
Tests:
- `test_runtime_tracker_writes_expected_log_payload` asserts
`python_version` (with at least 2 dots, e.g. "3.12.3") and a
non-empty `python_implementation`.
- 968 unit tests passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 23bf3c4 commit 74958a1
5 files changed
Lines changed: 19 additions & 3 deletions
File tree
- roar
- core/models
- execution
- provenance
- runtime/inject
- tests/execution/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
0 commit comments