activator,sdk: add topology event handler and update Python/TypeScript SDKs for RFC-18#3514
Draft
ben-malbeclabs wants to merge 5 commits intobc/rfc18-pr2from
Draft
activator,sdk: add topology event handler and update Python/TypeScript SDKs
for RFC-18#3514ben-malbeclabs wants to merge 5 commits intobc/rfc18-pr2from
ben-malbeclabs wants to merge 5 commits intobc/rfc18-pr2from
Conversation
This was referenced Apr 10, 2026
Draft
compat test to use 120s request timeout
This was referenced Apr 10, 2026
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.
RFC-18 flex-algo · PR 4 of 5 · see
rfcs/rfc-0018-flex-algo.mdDepends on: #3512 (PR 2)
Series: #3497 · #3512 · #3513 · #3514 · #3515
Summary of Changes
process_topology_eventto the activator: when aTopologyInfoaccount is created or updated, the activator callsBackfillTopologyon all devices that have an activated VPNv4 loopback (idempotent — skips devices that already have a segment for this topology)--enable-flex-algoflag to the activator (default: off); topology events are ignored unless the flag is setTopologyConstraint,TopologyInfo, andFlexAlgoNodeSegment, and readsflex_algo_node_segmentsfrom V2 interface accountsFlexAlgoNodeSegmentfrom V2 interface accounts and adds a configurable request timeout to the RPC clientDiff Breakdown
Mostly core logic concentrated in the new topology event handler and Python SDK deserialization.
Key files (click to expand)
activator/src/process/topology.rs— new: topology event handler; lists all active devices, filters to those with activated VPNv4 loopbacks, batches BackfillTopology callsactivator/src/process/iface_mgr.rs— calls backfill after a VPNv4 loopback is activated, so newly provisioned devices immediately get node segments for existing topologiesactivator/src/process/device.rs— topology-aware device processingactivator/src/processor.rs— wires inprocess_topology_eventforAccountData::Topologyevents; addsenable_flex_algoguardsdk/serviceability/python/serviceability/state.py— addsTopologyConstraintenum,TopologyInfodataclass,FlexAlgoNodeSegmentdataclass; readsflex_algo_node_segmentsvec from V2 interface accountssdk/serviceability/typescript/serviceability/state.ts— addsFlexAlgoNodeSegmenttype; reads it from V2 interface accountssdk/serviceability/typescript/serviceability/rpc.ts— adds configurable request timeoutTesting Verification
cargo test -p doublezero-activator— 76 tests passcargo clippy -- -D warningsclean after fixingfor_kv_maplint intopology.rs