feat: add max_certification_level manifest field#256
Conversation
Add optional max_certification_level top-level field to TOML manifests. Tests above the max still run and report results, but do not affect the final certified level. This change allows tests to be grouped under a certification level without too much coordination. Currently will cap the 3.0 manifest at 3.0.0-0. Signed-off-by: Amanda Liem <aliem@amd.com>
There was a problem hiding this comment.
Pull request overview
Adds an optional max_certification_level field to certification TOML manifests and propagates it through the model, CLI execution summary, and report outputs so that certification results are capped (without skipping higher-level test execution).
Changes:
- Add
max_certification_leveltoCertificationDefinitionand validate it against manifest levels. - Parse
max_certification_levelfrom TOML manifests, preserve it through test filtering, and clamp computed certified level to the cap. - Surface
max_certification_levelin JSON and Markdown outputs, and set a cap for the 3.0 manifest.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sev_verify/output.py | Include max_certification_level in JSON output and display it in Markdown when set. |
| sev_verify/models.py | Add max_certification_level to the certification model with validation logic. |
| sev_verify/cli.py | Parse the new manifest field, preserve it through filtering, and clamp the computed certified level. |
| sev_verify/cert_tests/c3_0/manifest.toml | Define max_certification_level = "3.0.0-0" for the 3.0 test suite manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
LGTM |
|
Automated review notes (post-merge, for the record) The feature is well-scoped and the full parse → model → filter → execute → output chain is correctly updated. A few things worth noting: [MEDIUM] JSON schema change without version bump (
[LOW] if all_levels.index(cap) < all_levels.index(highest):
highest = capBoth calls raise [LOW] Validation silently skips for zero-test manifests ( if self.max_certification_level is not None:
if self.all_levels and self.max_certification_level not in self.all_levels:
raise ValueError(...)The inner UX gap: silent clamping When the cap actually fires (a higher level passes but gets clamped), there's no runtime indication. The cap is announced at execution start, but a user who sees level Open questions
|
Add optional max_certification_level top-level field to TOML manifests. Tests above the max still run and report results, but do not affect the final certified level.
This change allows tests to be grouped under a certification level without too much coordination.
Currently will cap the 3.0 manifest at 3.0.0-0.