BL-32: Contributor environment preflight check (dincli system doctor / scripts/preflight.sh)

Đang mở
#245 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Santiagocetran đang làm issue này rồi.

Từ ngày 29/10/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, python, solidity

Hướng nghiên cứu

Read dincli/cli/system.py, the onboarding guide, ci.yml, and CLAUDE.md to understand the existing command structure and checks. Implement the read-only preflight command or fallback script, then run it on a clean environment and verify each listed check, plain text output, and exit codes. Done when the command is referenced in Documentation/public/guides/getting-started.md.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Approved enhancement

Summary

There is no single command that checks a developer's machine before they start work. Each of the following has already caused lost time:

  1. Python < 3.12 installed (repo requires >=3.12).
  2. forge / anvil not installed, or the wrong solc version (0.8.28 required).
  3. foundry/node_modules absent — without npm ci, forge test's parallel jobs race to fetch @openzeppelin/upgrades-core over npx into a shared cache, causing both test flakiness and unnecessary supply-chain exposure at test time (documented in CLAUDE.md).
  4. eth-account or py-multibase not importable in the active venv.
  5. torch not importable (needed by tests/ full run and the reference service files).
  6. .env / .env.<network> missing, the configured RPC endpoint unreachable, or resolve_ipfs_config() unable to resolve.

Proposal

A read-only preflight check — dincli system doctor (preferred, fits the existing subcommand structure in dincli/cli/system.py) or scripts/preflight.sh as a fallback — that runs one check per line:

[OK]      Python 3.12.6
[OK]      forge 0.3.2 / anvil 0.3.2
[OK]      solc 0.8.28 (via solc-select)
[OK]      foundry/node_modules present
[OK]      eth-account 6.3.0
[OK]      py-multibase 2.0.1
[MISSING] torch — run: pip install torch
[OK]      .env.sepolia_op_devnet found
[OK]      RPC https://... → chainId 11155420
[MISSING] IPFS_API_URL not set and no Filebase credentials — see Documentation/public/guides/ipfs.md

Exits non-zero on any MISSING or ERROR row. Never installs anything itself — reports and exits.

Usage

  • Primary: first command in the onboarding docs (Documentation/public/guides/getting-started.md).
  • Secondary: first step in ci.yml's unit-test job (can replace the current ad-hoc pip install + forge --version calls).
  • Optional local alias: make doctor.

Acceptance

  • All six check categories above pass on a clean machine.
  • Exits 0 when everything is OK, non-zero when any check fails.
  • Output is plain text, one line per check, usable in CI without color codes (--no-color flag or auto-detect).
  • Documentation/public/guides/getting-started.md references the command.

References

  • Developer/BACK_LOG.md BL-32
  • CLAUDE.md — npm ci warning (§ Solidity)
  • Preflight pattern reviewed in Osomudeya/devops-scripting-labs (2026-10-02)
Ngôn ngữ chính
Python
Star
4
Fork
7
Merge trung bình
3 ngày 7 giờ
Pull request đã merge (30 ngày)
33

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InfiniteZeroFoundation/DevNet

Tất cả issue của InfiniteZeroFoundation/DevNet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.