feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. - #10884
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 72fc571. Security Overview
Detected Code Changes
|
- Done.
- Existing functionality continues to work as before.
- Existing data is fine.
- Low risk.
There was a problem hiding this comment.
Pull request overview
Adds a new Governance proposal action (UpdateStandardEngineReplicaVersion) that allows the NNS to instruct the Registry to update which replica version(s) Cloud Engines should run, including validation, dispatch wiring, and API/schema exposure.
Changes:
- Introduces the
UpdateStandardEngineReplicaVersionproposal implementation (validation + registry canister call payload encoding) and unit tests. - Wires the new action through governance proposal validation/execution, self-describing action output, and protobuf/API conversions.
- Updates the public schemas/interfaces (protobuf, generated Rust, candid DID) and governance unreleased changelog.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rs/nns/governance/unreleased_changelog.md | Documents the newly added proposal type in the governance changelog. |
| rs/nns/governance/src/proposals/update_standard_engine_replica_version.rs | Implements validation, topic selection, registry call dispatch, and self-describing formatting for the new action. |
| rs/nns/governance/src/proposals/update_standard_engine_replica_version_tests.rs | Adds unit tests covering validation, dispatch/payload encoding, self-describing output, and action conversion. |
| rs/nns/governance/src/proposals/mod.rs | Registers the new proposals module and plumbs the action into ValidProposalAction routing and self-describing conversion. |
| rs/nns/governance/src/pb/proposal_conversions.rs | Adds pb→api conversion for the new proposal action. |
| rs/nns/governance/src/pb/conversions/mod.rs | Adds api↔pb conversions for the new action and request type. |
| rs/nns/governance/src/governance.rs | Wires the action into action-string mapping, execution dispatch, and proposal validation. |
| rs/nns/governance/src/gen/ic_nns_governance.pb.v1.rs | Updates generated protobuf Rust types to include the new action + message. |
| rs/nns/governance/proto/ic_nns_governance/pb/v1/governance.proto | Adds the new UpdateStandardEngineReplicaVersion message and proposal oneof variant. |
| rs/nns/governance/canister/governance.did | Exposes the new action and request variant in the public Candid interface. |
| rs/nns/governance/api/src/types.rs | Adds the new action/request variants and the API struct type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Because the api type makes all three fields
So a proposer who forgets (or typos) |
|
Good point. Claude thought of an interesting way to address that: instead of unwrap_or_default, he changed it to unwrap_or(-1.0). This leads to proposal with no explicit deployment_progress being not being created. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
514aa8c to
72fc571
Compare
|
Now that the previous PR has gone in, I rebased+force pushed (and stripped the DO NOT MERGE from the title). Getting ready to merge... |
…ion` subcommand. (dfinity#10885) [👈 Previous PR][prev] [prev]: dfinity#10884 --------- Co-authored-by: Daniel Wong <daniel.wong@dfinity.org>
👈 Previous PR | Next PR 👉