Draft
Conversation
Adds 14 fields to the system block of info.json: 5 from platform.uname() (os_name, os_release, os_version, arch, processor) and 9 from platform.freedesktop_os_release() (distro_id, distro_id_like, distro_name, distro_version, distro_version_id, distro_codename, distro_variant_id, distro_pretty_name, distro_build_id). Bumps schema_version to 0.2.3. Distro fields fall back to empty strings on systems without /etc/os-release (e.g. macOS). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a 0.2.3 migration step to ensure_compliant_schema that fills the 14 new system.* provenance fields with empty strings when reading info.json files written by older duct versions, so ls and related consumers can rely on the fields being present. Updates test_ls fixtures to include a "system" block (which has existed in info.json since before MINIMUM_SCHEMA_VERSION) so the new migration can run against them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #425 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.02%
==========================================
Files 15 15
Lines 1120 1143 +23
Branches 139 141 +2
==========================================
+ Hits 1029 1050 +21
- Misses 69 70 +1
- Partials 22 23 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds OS and Linux-distribution provenance to the
systemblock ofinfo.json, so downstream consumers (plot, gallery, future tooling) can tell what host a run came from without parsing free-text strings.Schema bumped 0.2.2 → 0.2.3. Old logs read by
con-duct lsare backfilled with empty strings for the new fields, so consumers can rely on the fields being present.What's added (14 fields, all under
system)From
platform.uname():os_name,os_release,os_version,arch,processorFrom
platform.freedesktop_os_release()(Python 3.10+; reads/etc/os-release, falls back to""on systems without the file):distro_id,distro_id_like,distro_name,distro_version,distro_version_id,distro_codename,distro_variant_id,distro_pretty_name,distro_build_idSample
systemblock:Why so many fields?
The motivation here is provenance (because everything matters), not any single consumer's branching needs. Plot logic flagged the gap (it needs to branch between Linux and macOS for
pcpu), but capturing the standardos-releasefields now means future readers — gallery, repro tooling, archeology — can answer questions we haven't anticipated (variant, codename, build id) without us having to re-collect.Compatibility
0.2.3.ls.ensure_compliant_schemamigrates old logs by adding empty strings for all 14 fields, matching the convention set by the 0.2.1 (working_directory) and 0.2.2 (message) migrations.LS_FIELD_CHOICESextended so the new fields are queryable viacon-duct ls -Fand--eval-filter.os.sysconfcalls inget_system_info(). On systems without/etc/os-release(macOS), the ninedistro_*fields fall back to"".