Skip to content

feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. - #10884

Merged
daniel-wong-dfinity-org-twin merged 3 commits into
masterfrom
new-proposal-type-update-standard-engine-replica-version-daniel-wong
Jul 24, 2026
Merged

feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion.#10884
daniel-wong-dfinity-org-twin merged 3 commits into
masterfrom
new-proposal-type-update-standard-engine-replica-version-daniel-wong

Conversation

@daniel-wong-dfinity-org-twin

@daniel-wong-dfinity-org-twin daniel-wong-dfinity-org-twin commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin requested a review from a team as a code owner July 23, 2026 15:37
@github-actions github-actions Bot added the feat label Jul 23, 2026
github-actions[bot]

This comment was marked as resolved.

@zeropath-ai

zeropath-ai Bot commented Jul 23, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 72fc571.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► rs/nns/governance/api/src/types.rs
    Add UpdateStandardEngineReplicaVersion message field to ProposalAction and related enums
► rs/nns/governance/canister/governance.did
    Declare UpdateStandardEngineReplicaVersion action in Action and ProposalActionRequest
► rs/nns/governance/proto/ic_nns_governance/pb/v1/governance.proto
    Add UpdateStandardEngineReplicaVersion to Proposal and UpdateStandardEngineReplicaVersion message
► rs/nns/governance/src/gen/ic_nns_governance.pb.v1.rs
    Update generated Rust protobuf definitions to include UpdateStandardEngineReplicaVersion with proper tags and struct
► rs/nns/governance/src/governance.rs
    Handle UpdateStandardEngineReplicaVersion in governance actions and proposal execution paths
► rs/nns/governance/src/pb/conversions/mod.rs
    Convert between api::proposal::Action and pb::proposal::Action for UpdateStandardEngineReplicaVersion
► rs/nns/governance/src/pb/proposal_conversions.rs
    Convert pb::proposal::Action::UpdateStandardEngineReplicaVersion to api::proposal::Action::UpdateStandardEngineReplicaVersion
► rs/nns/governance/src/proposals/mod.rs
    Include UpdateStandardEngineReplicaVersion in ValidProposalAction and module declarations
► rs/nns/governance/src/proposals/update_standard_engine_replica_version.rs
    New proposal implementation: validation, topic, canister dispatch, payload encoding, and JSON-like self-describing value generation
► rs/nns/governance/src/proposals/update_standard_engine_replica_version_tests.rs
    New tests for UpdateStandardEngineReplicaVersion functionality
► rs/nns/governance/unreleased_changelog.md
    Note added documenting new proposal type: UpdateStandardEngineReplicaVersion
Bug Fix N/A
Refactor N/A
Configuration changes N/A

@daniel-wong-dfinity-org-twin daniel-wong-dfinity-org-twin changed the title feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. DO NOT MERGE builds on not yet merged PR 10883 feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. Jul 23, 2026
@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin dismissed github-actions[bot]’s stale review July 23, 2026 15:45
  1. Done.
  2. Existing functionality continues to work as before.
  3. Existing data is fine.
  4. Low risk.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 UpdateStandardEngineReplicaVersion proposal 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.

@bjoernek

Copy link
Copy Markdown
Contributor

validate() on update_standard_engine_replica_version.rs (or the api→pb conversion)

Because the api type makes all three fields opt, the two version IDs and deployment_progress behave differently when omitted:

  • Omitting new_/old_replica_version_idunwrap_or_default() yields ""is_potential_full_git_commit_id rejects it. Good, effectively required.
  • Omitting deployment_progressunwrap_or_default() yields 0.0, which is inside [0.0, 1.0] and passes validation silently.

So a proposer who forgets (or typos) deployment_progress gets an accepted proposal that deploys to 0% rather than an error. Is 0.0-on-omission intended, or should a missing deployment_progress be rejected the way a missing version ID effectively is? If it's meant to be required, validating on the Option before defaulting (e.g. None => invalid_proposal_error("deployment_progress is required")) would make the two behaviors consistent. If 0.0 is a deliberate, safe default, a one-line comment saying so would save the next reader this same question.

Base automatically changed from spin-out-is_potential_full_git_commit_id-daniel-wong to master July 23, 2026 16:54
@daniel-wong-dfinity-org-twin

Copy link
Copy Markdown
Contributor Author

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.

@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin force-pushed the new-proposal-type-update-standard-engine-replica-version-daniel-wong branch from 514aa8c to 72fc571 Compare July 24, 2026 14:01
@daniel-wong-dfinity-org-twin daniel-wong-dfinity-org-twin changed the title DO NOT MERGE builds on not yet merged PR 10883 feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. feat(governance): Added a new NNS proposal type: UpdateStandardEngineReplicaVersion. Jul 24, 2026
@daniel-wong-dfinity-org-twin

Copy link
Copy Markdown
Contributor Author

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...

@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin added this pull request to the merge queue Jul 24, 2026
Merged via the queue into master with commit 295226f Jul 24, 2026
38 of 39 checks passed
@daniel-wong-dfinity-org-twin
daniel-wong-dfinity-org-twin deleted the new-proposal-type-update-standard-engine-replica-version-daniel-wong branch July 24, 2026 14:59
pull Bot pushed a commit to bit-cook/ic that referenced this pull request Jul 24, 2026
…ion` subcommand. (dfinity#10885)

[👈 Previous PR][prev]

[prev]: dfinity#10884

---------

Co-authored-by: Daniel Wong <daniel.wong@dfinity.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants