feat(registry): ensure all elected versions can be parsed - #11249
feat(registry): ensure all elected versions can be parsed#11249pierugo-dfinity wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds registry invariants ensuring elected GuestOS and HostOS version IDs are parseable by their consumers.
Changes:
- Validate elected replica and HostOS version IDs.
- Add positive and negative invariant tests.
- Document the new invariant.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
rs/registry/canister/unreleased_changelog.md |
Documents version-ID validation. |
rs/registry/canister/src/invariants/replica_version.rs |
Validates elected replica versions and adds tests. |
rs/registry/canister/src/invariants/hostos_version.rs |
Validates registered HostOS versions and adds tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):
-
Update
unreleased_changelog.md(if there are behavior changes, even if they are
non-breaking). -
Are there BREAKING changes?
-
Is a data migration needed?
-
Security review?
How to Satisfy This Automatic Review
-
Go to the bottom of the pull request page.
-
Look for where it says this bot is requesting changes.
-
Click the three dots to the right.
-
Select "Dismiss review".
-
In the text entry box, respond to each of the numbered items in the previous
section, declare one of the following:
-
Done.
-
$REASON_WHY_NO_NEED. E.g. for
unreleased_changelog.md, "No
canister behavior changes.", or for item 2, "Existing APIs
behave as before.".
Brief Guide to "Externally Visible" Changes
"Externally visible behavior change" is very often due to some NEW canister API.
Changes to EXISTING APIs are more likely to be "breaking".
If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.
If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.
Reference(s)
For a more comprehensive checklist, see here.
GOVERNANCE_CHECKLIST_REMINDER_DEDUP
|
✅ No security or compliance issues detected. Reviewed everything up to bad42fe. Security Overview
Detected Code Changes
|
- Done.
- No, not really, all elected replica versions were already satisfying the introduced validation.
- No data migration needed. I just checked the set of elected replica versions and they all fit the format. Hopefully no bad version gets elected until this gets merged.
- No security review needed.
This PR adds a registry invariant that ensures all elected GuestOS and HostOS versions can be parsed by the replicas that will consume them.
Note the
here, which referred to validation when updating the
StandardEngineReplicaVersionin governance, but the registry itself did not validate them. In particular, versions were not validated neither at election nor at deployment to regular subnets.