fix(docker): make devnet cluster workflow reproducible - #827
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edac653ce6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # These disposable devnet configs are bind-mounted into a container running as | ||
| # uid 10001. Keep their existing documented world-readable behavior even when | ||
| # the caller has a restrictive umask; never use this renderer for mainnet keys. | ||
| umask 022 |
There was a problem hiding this comment.
Normalize copied artifact modes
When the documented workflow is run under a restrictive umask (for example, umask 077; make init && make genesis), genesis.json and waypoint.txt are created as mode 0600. Changing the renderer's umask does not widen those files because the later cp operations preserve their source mode; only identity.yaml is explicitly chmodded. Consequently, the bind-mounted artifacts remain unreadable by container uid 10001 and every node can fail during genesis/waypoint loading. This can be reproduced by checking the rendered files with stat; copy these artifacts with an explicit mode or chmod them after copying.
AGENTS.md reference: AGENTS.md:L8-L12
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb9e5e891f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| test -f genesis.toml || cp genesis.toml.example genesis.toml | ||
| test -f cluster.toml || cp cluster.toml.example cluster.toml |
There was a problem hiding this comment.
Require default configs before rendering hard-coded ports
When the checkout already contains ignored, customized cluster/genesis.toml or cluster/cluster.toml files, these guards preserve them even though the next step calls render-cluster-config.sh, whose set_ports table and node IDs are fixed to the example defaults. For example, changing node1's genesis validator port to 7180 makes make genesis embed 7180 in on-chain discovery while the rendered validator still listens on 6180, so the documented Compose cluster cannot reach consensus. Either render from the selected TOMLs or reject/non-destructively isolate non-default files; this can be validated by changing one example port, running steps 1–3, and comparing the genesis endpoint with config/node1/validator.yaml.
AGENTS.md reference: AGENTS.md:L8-L8
Useful? React with 👍 / 👎.
Summary
Problem
A clean run of docker/gravity_node/README.md had five independent blockers:
Independent clean-room validation
A context-free agent followed the README from a detached clean worktree and reproduced all five failures before applying the minimal fixes represented by this PR. It then:
The final validation cluster remains running for inspection.
Local checks
Nightly rustfmt compatibility
The repository uses a floating nightly formatter in CI. The current nightly wraps long comments in three Rust files already present on main, so commit edac653 applies exactly those mechanical comment-only changes. It contains no logic changes.