Add scored conformance grading and --grade CLI#207
Merged
Conversation
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.
Motivation
Description
GradeComponentandGradeReportdataclasses and a newConformanceSuite.grade()method that computes an 8‑point grade (free‑threading, eBPF‑LSM, cgroup v2, Landlock fallback, no‑GIL extension safety, broker crypto, quota enforcement, crash isolation) with per‑component evidence and active/inactive lists.ebpf_lsm,landlock_fallback,no_gil_extension_safety,broker_crypto, andcrash_isolationand wire them into the grade computation.--gradeon the conformance CLI (python -m pyisolate.conformance --grade) andpyisolate-doctor --gradeto emit the scored JSON report viaGradeReport.to_json().README.mdand add unit tests for grade schema and CLI output intests/test_conformance.pyandtests/test_provenance.py.Testing
pytest tests/test_conformance.py tests/test_provenance.py, which passed (targeted tests succeeded).python -m pyisolate.conformance --gradeandpyisolate-doctor --grade, both produced valid JSON grade output although the environment logged expected warnings when BPF/cgroup tooling or writable sysfs is unavailable.pytest(full suite) and observed unrelated, pre‑existing failures caused by test-suite stubs that replacepyisolate.bpf.manager.BPFManagerwith a shim whoseload()signature does not accept the newmode=parameter; this is a test harness compatibility issue rather than a regression in the grading logic.black(configured target) and formatting succeeded for the edited files.Codex Task