refactor: split always-on base topology from --subnet workload selection#64
Merged
lwshang merged 1 commit intoJun 2, 2026
Conversation
The --subnet enum conflated two kinds of subnet: always-on base topology
(NNS, fiduciary, test-threshold-keys) and user-selectable workload subnets.
This made the selection logic hard to reason about and produced contradictory
docs ("only explicitly specified subnets are added" vs. "nns/fiduciary/
test-threshold-keys are always implied").
Split them explicitly:
- Create NNS, fiduciary, and test-threshold-keys unconditionally up front as
base topology, independent of --subnet.
- Remove TestThresholdKeys from the --subnet enum (new in the parent change,
never shipped, so no back-compat burden).
- Keep nns and fiduciary as accepted-but-ignored --subnet values for backward
compatibility.
Behavior is unchanged at runtime; this is a clarity/API-surface refactor.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2c41bdf
into
feat/default-fiduciary-and-test-threshold-keys
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on top of #63.
Problem
The
--subnetenum conflates two different kinds of subnet:nns,fiduciary,test-threshold-keys. Created unconditionally to mirror mainnet / provide infrastructure.application,system,verified-application,bitcoin,sns.Mixing them makes the selection logic hard to reason about and produced contradictory docs: "only explicitly specified subnets are added" vs. "
nns/fiduciary/test-threshold-keysare always implied".(There's no correctness issue today — pocket-ic models
nns/fiduciary/test-threshold-keysas singletonOption<SubnetSpec>fields, so the repeatedwith_*_subnet()calls are idempotent. This is purely about a clean mental model.)Change
Split the two categories explicitly:
nns,fiduciary, andtest-threshold-keysunconditionally up front as base topology, independent of--subnet.TestThresholdKeysfrom the--subnetenum — it's new in feat: always-on fiduciary/test-threshold-keys subnets; split base topology from --subnet #63 and never shipped, so no back-compat burden.--subnet=test-threshold-keysis now rejected.nnsandfiduciaryas accepted-but-ignored--subnetvalues for backward compatibility.Runtime behavior is unchanged; this is a clarity / API-surface refactor.
🤖 Generated with Claude Code