Skip to content

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Feb 11, 2026

This pull request introduces major improvements to the CRE environment's topology management and documentation. It adds a new CLI for inspecting and generating topology configurations, generates detailed capability matrix documentation for each topology, and enhances the startup experience with a compact topology summary. Additionally, it refactors capability configuration for clarity and introduces tests for topology config validation.

CLI and User Experience Improvements:

  • Introduced a new topology CLI (topology list, topology show, topology generate) to inspect, compare, and document DON topology configurations, with guidance added to the README.md. The CLI is now registered in the main command.
  • On environment startup, a compact ASCII topology summary with a capability matrix is printed, replacing the previous per-node set summary for better clarity.

Documentation Generation:

  • Automatically generates a top-level CRE Topologies overview (docs/TOPOLOGIES.md) and detailed per-topology capability matrix docs (e.g., docs/topologies/workflow-gateway-don.md) for all supported configs. These matrices show which DONs provide which capabilities.
    Configuration Refactor:

  • Refactored capability configuration in workflow-gateway-don-grpc-source.toml to use explicit per-chain capability names (e.g., write-evm-1337) instead of a nested chain_capabilities section, improving clarity and aligning with new topology tooling.

Testing and Code Quality:

  • Added unit tests for topology config detection to ensure only valid topology TOML files are accepted, improving robustness.

Internal Codebase Changes:

  • Integrated the new topologyviz package for topology visualization and summary rendering in the CLI.

Example:

DONs
+-------------------+-------------------+-------+------------+---------------------+
| DON               | Types             | Nodes | EVM Chains | Attributes          |
+-------------------+-------------------+-------+------------+---------------------+
| bootstrap-gateway | bootstrap,gateway | 1     | 1337, 2337 | -                   |
| capabilities      | capabilities      | 4     | 1337, 2337 | remote-capabilities |
| workflow          | workflow          | 4     | 1337, 2337 | -                   |
+-------------------+-------------------+-------+------------+---------------------+

Capability Matrix
+-----------------+-------------------+-----------------------+--------------+
| Capability      | bootstrap-gateway | capabilities          | workflow     |
+-----------------+-------------------+-----------------------+--------------+
| consensus       | -                 | -                     | local        |
| cron            | -                 | -                     | local        |
| custom-compute  | -                 | -                     | local        |
| don-time        | -                 | -                     | local        |
| evm             | -                 | remote-exposed (2337) | local (1337) |
| http-action     | -                 | -                     | local        |
| http-trigger    | -                 | -                     | local        |
| ocr3            | -                 | -                     | local        |
| read-contract   | -                 | remote-exposed (2337) | local (1337) |
| vault           | -                 | remote-exposed        | -            |
| web-api-target  | -                 | remote-exposed        | -            |
| web-api-trigger | -                 | -                     | local        |
| write-evm       | -                 | remote-exposed (2337) | local (1337) |
+-----------------+-------------------+-----------------------+--------------+

@Tofel Tofel changed the title [DX-2836] add topology CLI and capability-matrix visualization for CRE configs [DX-2836] add topology CLI and capability-matrix visualization for local CRE configs Feb 11, 2026
@github-actions
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@Tofel Tofel force-pushed the dx-2836-visualize-topologies branch from 3e9c831 to 1e6eeb0 Compare February 11, 2026 16:04
@Tofel Tofel force-pushed the dx-2836-visualize-topologies branch from 1e6eeb0 to 121c1b9 Compare February 11, 2026 16:17
@Tofel Tofel marked this pull request as ready for review February 11, 2026 17:38
@Tofel Tofel requested review from a team as code owners February 11, 2026 17:38
Copilot AI review requested due to automatic review settings February 11, 2026 17:38
Copy link
Contributor

Copilot AI left a comment

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 “topology” CLI to discover CRE topology TOML configs and generate human-readable visualizations (ASCII + Markdown), plus integrates a compact topology/capability matrix summary into env start.

Changes:

  • Introduces topology CLI commands: list/show/generate, including doc/index generation.
  • Adds topologyviz package to build topology summaries and render ASCII/Markdown capability matrices.
  • Updates configs/docs and prints a compact topology summary during environment startup.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
core/scripts/cre/environment/topologyviz/topologyviz.go Implements topology summary building and ASCII/Markdown rendering + artifact writing
core/scripts/cre/environment/topologyviz/topologyviz_test.go Adds a unit test for ASCII capability matrix border rendering
core/scripts/cre/environment/main.go Registers the new topology command in the root CLI
core/scripts/cre/environment/environment/topology.go Implements topology subcommands (list/show/generate), discovery, and doc generation
core/scripts/cre/environment/environment/environment.go Prints compact topology summary during env start and removes legacy printout
core/scripts/cre/environment/configs/workflow-gateway-don-grpc-source.toml Converts chain capability table into explicit per-chain capability flags
core/scripts/cre/environment/README.md Documents topology CLI usage and notes env start now prints topology summary
core/scripts/cre/environment/docs/TOPOLOGIES.md Adds generated index of available topology configs
core/scripts/cre/environment/docs/topologies/workflow-gateway-sharded-don.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-gateway-mock-don.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-gateway-legacy-vault-don.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-gateway-don.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-gateway-don-grpc-source.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-gateway-capabilities-don.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-don-tron.md Adds generated topology doc (capability matrix + DONs section)
core/scripts/cre/environment/docs/topologies/workflow-don-solana.md Adds generated topology doc (capability matrix + DONs section)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tofel Tofel enabled auto-merge February 12, 2026 10:05
@trunk-io
Copy link

trunk-io bot commented Feb 12, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants