Skip to content

Commit d5c62f9

Browse files
Merge pull request #2 from rainlanguage/2026-07-25-docs-accuracy-post-split
docs: correct the build commands, CI description and release model
2 parents 2045df6 + 4ab44b0 commit d5c62f9

2 files changed

Lines changed: 75 additions & 33 deletions

File tree

‎CLAUDE.md‎

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,46 @@ SPDX headers.
1616

1717
## Build & Test Commands
1818

19-
This project uses **Nix + Foundry (Forge)**. Enter the dev shell first:
19+
This project uses **Nix + Foundry (Forge)**. Everything runs in the rainix
20+
`sol-shell`, the same shell CI uses:
2021

2122
```bash
22-
nix develop
23+
nix develop .#sol-shell
2324
```
2425

25-
Then use rainix tasks:
26+
Soldeer dependencies are not committed (`dependencies/` is gitignored), so
27+
install them before the first build:
2628

2729
```bash
28-
# Run all tests
29-
nix develop -c rainix-sol-test
30+
nix develop .#sol-shell -c forge soldeer install
31+
```
3032

31-
# Static analysis (Slither)
32-
nix develop -c rainix-sol-static
33+
Each command below has a matching CI job:
3334

34-
# License/legal checks (REUSE compliance)
35-
nix develop -c rainix-sol-legal
35+
```bash
36+
# Build
37+
nix develop .#sol-shell -c forge build
3638

37-
# Prelude (dependency setup, run before other tasks)
38-
nix develop -c rainix-sol-prelude
39-
```
39+
# Run all tests. The five LibCloneFactoryDeployProdTest fork tests read the
40+
# live chains and need ARBITRUM_RPC_URL, BASE_RPC_URL, BASE_SEPOLIA_RPC_URL,
41+
# FLARE_RPC_URL and POLYGON_RPC_URL; without them only those five fail.
42+
nix develop .#sol-shell -c forge test
4043

41-
Direct Forge commands also work inside the nix shell:
44+
# Run a specific test, or a specific file
45+
nix develop .#sol-shell -c forge test --match-test testCloneDeterministic
46+
nix develop .#sol-shell -c forge test --match-path test/src/concrete/CloneFactoryCloneDeterministic.t.sol
4247

43-
```bash
44-
# Run all tests
45-
forge test
48+
# Formatting (CI runs `forge fmt --check`)
49+
nix develop .#sol-shell -c forge fmt
4650

47-
# Run a specific test
48-
forge test --match-test testCloneDeterministic
51+
# Static analysis
52+
nix develop .#sol-shell -c slither .
4953

50-
# Run tests in a specific file
51-
forge test --match-path test/src/concrete/CloneFactoryCloneDeterministic.t.sol
54+
# License/legal checks (REUSE compliance)
55+
nix develop .#sol-shell -c reuse lint
5256

53-
# Build
54-
forge build
57+
# Regenerate the deploy pins for the current [package].version
58+
nix develop .#sol-shell -c bash -c 'forge script ./script/BuildPointers.sol && forge fmt'
5559
```
5660

5761
## Architecture
@@ -89,12 +93,45 @@ as the `rain-factory` Soldeer dependency, so they are read under
8993

9094
## Deployment
9195

92-
Deployed via deterministic Zoltu deployer (from `rain.deploy`). The canonical
93-
deployment address and codehash are committed in `LibCloneFactoryDeploy.sol`.
94-
Deployment scripts are in `script/Deploy.sol` targeting Arbitrum, Base, Base
95-
Sepolia, Flare, and Polygon.
96+
Deployed via the deterministic Zoltu deployer (from `rain.deploy`), so the
97+
address is a pure function of the bytecode. The canonical address and codehash
98+
are committed in `LibCloneFactoryDeploy.sol`. `script/Deploy.sol` deploys the
99+
`clone-factory` suite to the five networks `LibRainDeploy.supportedNetworks()`
100+
returns: Arbitrum One, Base, Base Sepolia, Flare and Polygon.
101+
102+
A deploy is a human-dispatched run of the `Manual sol artifacts` workflow
103+
(`workflow_dispatch` → `rainix-manual-sol-artifacts`), never a merge and never
104+
part of the release workflow.
105+
106+
## Releases and versioning
107+
108+
This is a **deploy repo**, not a library repo, so nothing publishes on merge:
109+
110+
- `[package].version` in `foundry.toml` is the **last released** version (it
111+
names the current `src/generated/<tag>/` snapshot), not a next-version slot. A
112+
normal PR does not bump it; only a release moves it.
113+
- A human pushes a `sol-v<version>` tag, which runs `rainix-tag-release`: it
114+
writes the version from the tag into `foundry.toml`, regenerates the snapshot
115+
(`forge script ./script/BuildPointers.sol && forge fmt`), verifies the live
116+
chains match the fresh pins with `forge test`, publishes `rain-factory-deploy`
117+
to Soldeer, and commits the new snapshot back to `main`.
118+
- The on-chain deploy happens **before** tagging, via the manual dispatch above;
119+
`rainix-tag-release` never broadcasts, it only attests.
120+
- Existing `src/generated/<tag>/` snapshots are frozen: a release adds a new tag
121+
directory, it never edits or deletes an existing one. CI enforces this.
96122

97123
## CI
98124

99-
GitHub Actions runs three parallel jobs on every push: `rainix-sol-test`,
100-
`rainix-sol-static`, `rainix-sol-legal`. Fork tests require RPC URL secrets.
125+
`.github/workflows/rainix-sol.yaml` calls the rainix `rainix-sol` reusable on
126+
every push, which runs three parallel jobs:
127+
128+
- `test` — `forge test -vvv`. The `LibCloneFactoryDeployProdTest` fork tests
129+
need the `RPC_URL_*_FORK` secrets.
130+
- `static` — `slither .`, `forge fmt --check`, `rainix-sol-single-contract` (one
131+
contract per `.sol` file), plus the org-wide gates: no ignored tests, no git
132+
submodules, no `@custom:` NatSpec, and append-only `src/generated/<tag>/`
133+
snapshots.
134+
- `legal` — `reuse lint`.
135+
136+
The other two workflows never run on push: `package-release.yaml` fires only on
137+
a `sol-v*` tag, and `manual-sol-artifacts.yaml` only on `workflow_dispatch`.

‎README.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ address/codehash pins depend on `rain-factory-deploy`.
1414
## Releases
1515

1616
This is a deploy repo: releases are **manual `sol-v*` tags**, not merges.
17-
Tagging runs `rainix-tag-release`, which deploys the `clone-factory` suite,
18-
regenerates and verifies the snapshot against the live chain, publishes
19-
`rain-factory-deploy` to Soldeer, and commits the frozen snapshot back to `main`.
20-
Nothing publishes on merge, so `[package].version` and the generated `DEPLOY_TAG`
21-
only ever move together.
17+
18+
The on-chain deploy is a separate, human-dispatched step, run **before**
19+
tagging: the `Manual sol artifacts` workflow runs `script/Deploy.sol` for the
20+
`clone-factory` suite. Tagging then runs `rainix-tag-release`, which regenerates
21+
the snapshot for the tagged version, verifies the live chains match those fresh
22+
pins, publishes `rain-factory-deploy` to Soldeer, and commits the frozen
23+
snapshot back to `main`. It never broadcasts a deploy itself.
24+
25+
Nothing publishes on merge, so `[package].version` and the frozen
26+
`src/generated/<tag>/` snapshot it names only ever move together.
2227

2328
See rainlanguage/rain.factory#46 for the split rationale.

0 commit comments

Comments
 (0)