Repository navigation
refactor(core): gather facts with cijoe.core.facts.gather() - #227
Merged
Merged
Conversation
Coverage Report for CI Build 40872661233Warning No base build found for commit Coverage: 62.623%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
safl
force-pushed
the
facts-module
branch
3 times, most recently
from
October 29, 2026 12:04
e013a7e to
b732176
Compare
safl
force-pushed
the
facts-module
branch
2 times, most recently
from
October 29, 2026 12:15
7797ea2 to
227f936
Compare
Gathering lived in the core.facts_gather script, so the CLI, which gathers the initiator's facts before a run's first step, and any script wanting to gather facts of its own imported from a script module. It now lives in cijoe.core.facts, beside the store the facts are written to, as cijoe.core.facts.gather() and SECTIONS. The OS-specific parsing is kept apart in cijoe.core.facts.gathering, so the store stays readable, and the script is left with its arguments and their checks. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Simon A. F. Lund <os@safl.dk>
The parsers of what each OS reports were tested on recorded output, but nothing ran gather_section() and gather() against a real machine, so the commands each section runs and the facts they end up as were not checked together. The test now gathers every section from the machine the tests run on and checks it against what Python says of that machine: on Linux every section, with the GPUs, NICs and NVMe controllers among its PCI functions, and on macOS its OS, kernel and system, with no PCI sections. FreeBSD and Windows are left to their parsers' tests, as CI has neither. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Simon A. F. Lund <os@safl.dk>
The facts were documented as giving each NVMe namespace an nsid, but on Linux it is recorded only where the kernel's sysfs or nvme-cli gives it, and otherwise a namespace has only its devices, paired by name. A GitHub runner's namespace was one of those, so a task reading the nsid would fail its step there. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Simon A. F. Lund <os@safl.dk>
Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Simon A. F. Lund <os@safl.dk>
Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Simon A. F. Lund <os@safl.dk>
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.
Stacked on #225: after #225 merges, delete its branch so GitHub retargets this to main, or retarget it by hand, and merging this then releases 0.9.67.
Fact gathering moves from the
core.facts_gatherscript intocijoe.core.facts, asgather()andSECTIONS, with the OS parsers moved unchanged intocijoe.core.facts.gathering. Importing the parsers from the script no longer works (#224); nothing that uses cijoe did.A test gathers every section from the machine running the tests, so CI checks Linux and macOS for real; FreeBSD and Windows are checked only through their parsers, on recorded output.