Skip to content

Commit f24621f

Browse files
authored
Merge pull request #4255 from ProvableHQ/build/agents
[Build] Add AGENTS.md file
2 parents 90f0951 + 7e0fddf commit f24621f

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Agent Guidelines
2+
3+
## Formatting and Lints
4+
5+
Always run the following after any code modification:
6+
7+
```bash
8+
cargo +nightly fmt
9+
cargo clippy --workspace --all-targets --all-features -- -D warnings
10+
```
11+
12+
## Modifying BFT Code
13+
14+
When making changes to BFT-related code (anything under `node/bft/`), run the following checks in order:
15+
16+
### 1. Unit tests
17+
18+
```bash
19+
cargo test -p snarkos-node-bft --lib
20+
```
21+
22+
### 2. Build with test features
23+
24+
The CI scripts invoke `snarkos` by name, so the binary must be on PATH. Build it with the
25+
`test_network` feature and prepend the output directory to PATH:
26+
27+
```bash
28+
cargo build --features test_network
29+
export PATH="$PWD/target/debug:$PATH"
30+
```
31+
32+
### 3. Devnet test
33+
34+
```bash
35+
.ci/test_devnet.sh
36+
```
37+
38+
### 4. Additional CI tests
39+
40+
Ask the user whether they want to run the following tests before merging. These cannot run
41+
concurrently and take significant time in total, so they are not always run on every change.
42+
43+
```bash
44+
.ci/test_partial_upgrade.sh
45+
.ci/test_full_upgrade.sh
46+
.ci/test_restart_majority.sh
47+
.ci/test_reset_minority.sh
48+
.ci/test_restart_all.sh
49+
```

0 commit comments

Comments
 (0)