Simulate the impact of code changes
The arc sim
command allows you to simulate the potential impact of code changes before merging them. It analyzes your changes, runs tests in a sandbox environment, and provides insights into how they might affect your system.
run
Run a simulation on the current changes.
history
Show the history of previous simulations.
show
Show details of a specific simulation.
run
Option | Description |
---|---|
--scenario <scenario> | Simulation scenario to run (default: all) |
--diff <diff_path> | Path to a diff file to simulate (default: current changes) |
--branch <branch> | Branch to compare against (default: main) |
--sandbox <type> | Sandbox type: local, docker, e2b (default: local) |
--memory | Use memory from previous simulations to improve results |
--output <format> | Output format: text, json, markdown (default: text) |
--save <path> | Save simulation results to a file |
--debug | Enable debug mode |
history
Option | Description |
---|---|
--limit <n> | Limit the number of results (default: 10) |
--format <format> | Output format: text, json, table (default: table) |
--service <service> | Filter by affected service |
--scenario <scenario> | Filter by scenario |
--risk <min>..<max> | Filter by risk score range |
Arc Memory supports the following simulation scenarios:
Scenario | Description |
---|---|
network_latency | Simulates the impact on network latency |
memory_usage | Simulates the impact on memory usage |
cpu_usage | Simulates the impact on CPU usage |
disk_io | Simulates the impact on disk I/O |
error_rates | Simulates the impact on error rates |
security | Analyzes potential security implications |
dependencies | Analyzes impact on dependencies |
all | Runs all available scenarios |
This will run a simulation on your current changes against the main branch.
This will run only the network latency simulation.
This will compare your changes against the develop branch.
This will use insights from previous simulations to improve the results.
This will show a table of your recent simulations.
This will show only simulations that affected the auth-service and ran the network_latency scenario.
This will show detailed results for the simulation with ID sim_abc123.
The simulation results include:
Example output:
Arc Memory supports different sandbox environments for running simulations:
Environment | Description |
---|---|
local | Runs in a local sandbox with limited isolation |
docker | Runs in a Docker container for better isolation |
e2b | Runs in an E2B cloud sandbox for maximum isolation and reproducibility |
If the simulation fails to start:
--debug
for more detailed error informationIf you believe the simulation results are inaccurate:
--memory
to leverage insights from previous simulationsSimulate the impact of code changes
The arc sim
command allows you to simulate the potential impact of code changes before merging them. It analyzes your changes, runs tests in a sandbox environment, and provides insights into how they might affect your system.
run
Run a simulation on the current changes.
history
Show the history of previous simulations.
show
Show details of a specific simulation.
run
Option | Description |
---|---|
--scenario <scenario> | Simulation scenario to run (default: all) |
--diff <diff_path> | Path to a diff file to simulate (default: current changes) |
--branch <branch> | Branch to compare against (default: main) |
--sandbox <type> | Sandbox type: local, docker, e2b (default: local) |
--memory | Use memory from previous simulations to improve results |
--output <format> | Output format: text, json, markdown (default: text) |
--save <path> | Save simulation results to a file |
--debug | Enable debug mode |
history
Option | Description |
---|---|
--limit <n> | Limit the number of results (default: 10) |
--format <format> | Output format: text, json, table (default: table) |
--service <service> | Filter by affected service |
--scenario <scenario> | Filter by scenario |
--risk <min>..<max> | Filter by risk score range |
Arc Memory supports the following simulation scenarios:
Scenario | Description |
---|---|
network_latency | Simulates the impact on network latency |
memory_usage | Simulates the impact on memory usage |
cpu_usage | Simulates the impact on CPU usage |
disk_io | Simulates the impact on disk I/O |
error_rates | Simulates the impact on error rates |
security | Analyzes potential security implications |
dependencies | Analyzes impact on dependencies |
all | Runs all available scenarios |
This will run a simulation on your current changes against the main branch.
This will run only the network latency simulation.
This will compare your changes against the develop branch.
This will use insights from previous simulations to improve the results.
This will show a table of your recent simulations.
This will show only simulations that affected the auth-service and ran the network_latency scenario.
This will show detailed results for the simulation with ID sim_abc123.
The simulation results include:
Example output:
Arc Memory supports different sandbox environments for running simulations:
Environment | Description |
---|---|
local | Runs in a local sandbox with limited isolation |
docker | Runs in a Docker container for better isolation |
e2b | Runs in an E2B cloud sandbox for maximum isolation and reproducibility |
If the simulation fails to start:
--debug
for more detailed error informationIf you believe the simulation results are inaccurate:
--memory
to leverage insights from previous simulations