feat(cli): add scaffold for setup_surfnet iac #373
Merged
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.
This pull request introduces support for handling genesis accounts defined in
Test.tomlandAnchor.tomlfiles for Anchor projects, and refactors the CLI to use a new--anchor-compatibilityflag instead of the previous--autopilotflag. The main changes improve the detection and scaffolding of infrastructure-as-code (IaC) for test suites, allowing for more flexible and accurate test environment setup, especially for Anchor-based projects.Anchor project genesis account discovery and propagation:
The Anchor project detection logic (
anchor.rsand related calls) now discovers and aggregates genesis accounts from bothAnchor.tomland anyTest.tomlfiles found in the workspace. These accounts are returned as part of the framework detection result and are used for scaffolding IaC. [1] [2] [3]New types and logic for reading, merging, and canonicalizing
Test.tomlfiles, including support for inheritance via theextendsfield and proper merging of genesis account entries.CLI flag and workflow refactor:
StartSimnetstruct replaces theautopilotflag with a more descriptiveanchor_compatflag (--anchor-compatibility), which is used to trigger Anchor test suite-compatible defaults for runbook generation and execution. All related logic and checks in the CLI workflow have been updated accordingly. [1] [2] [3]IaC scaffolding improvements:
Dependency updates:
walkdircrate is added to the workspace and relevant crates to support recursive discovery ofTest.tomlfiles. [1] [2]Type and import updates:
These changes together enable more robust and flexible test environment setup for Anchor projects, particularly when working with complex test suites and custom genesis accounts.