Semantic validation of an extracted staging tree. More...
#include <profile_registry.hpp>
Public Member Functions | |
| virtual | ~ProfileValidator ()=default |
| virtual std::string_view | profile_id () const noexcept=0 |
| The profile this validator answers for, e.g. | |
| virtual std::uint32_t | max_profile_version () const noexcept=0 |
| Highest profile version understood. | |
| virtual std::vector< std::string > | required_roles () const =0 |
| Roles this profile requires. | |
| virtual bool | supports_capability (std::string_view name) const noexcept=0 |
| Capabilities this profile can satisfy locally. | |
| virtual runtime::Result< void, CapsuleError > | check_compatibility (const Manifest &manifest) const =0 |
| Is the local runtime new enough for this capsule? | |
| virtual runtime::Result< void, CapsuleError > | validate_staged (const Manifest &manifest, const std::filesystem::path &staging_root) const =0 |
| Validate the extracted staging tree without executing it. | |
Semantic validation of an extracted staging tree.
Runs after admission and before publication, and must not execute any capsule content.
|
virtualdefault |
|
pure virtual |
Is the local runtime new enough for this capsule?
|
pure virtualnoexcept |
Highest profile version understood.
A capsule above it is unsupported_profile_version; the caller reports the exact numbers so the user learns which update they need.
|
pure virtualnoexcept |
The profile this validator answers for, e.g.
"com.generous.forge.instrument".
|
pure virtual |
Roles this profile requires.
The substrate enforces this; a consumer must not repeat the check. preview_capsule() calls this and reports every role absent from the manifest's files[] and dependencies[] as missing_required_role, which lands as CompatibilityVerdict::unsupported in the preview rather than as an immediate error — the preview exists to tell a person what is missing. admit_to_staging() is where that verdict bites: it refuses before extracting anything, so nothing reaches validate_staged() with a required role missing.
Only the missing direction is checked. A role this list does not name is not rejected: unknown optional metadata must round-trip, and which unrecognized roles matter is this profile's own judgment, in validate_staged().
|
pure virtualnoexcept |
Capabilities this profile can satisfy locally.
|
pure virtual |
Validate the extracted staging tree without executing it.