Skip to content

Commit 0ebaf6d

Browse files
docs: improve documentation quality and add CI checks (#10204)
* docs: improve documentation quality and add CI checks Add automated documentation quality checks and fix existing issues across the codebase documentation. Workflow changes: - Add `docs-check.yml` workflow with link checking (lychee), spell checking (codespell), and markdown linting (markdownlint) - Workflow follows project conventions: pinned action SHAs, per-job permissions, aggregator job pattern Documentation fixes: - Fix markdown linting issues (MD040 code block language specifiers, MD059 descriptive link text) - Fix spelling errors across documentation files - Add missing ARCHITECTURE.md for high-level codebase overview - Add new developer documentation: onboarding guide, crate architecture - Add ecosystem integration guide for users - Add architectural decision records (ADRs) for Tower, verification, RocksDB - Update CI/CD documentation with workflow diagram Configuration: - Add `.lychee.toml` for link checker configuration - Add `.lycheecache` to `.gitignore` - Update `.codespellrc` with domain-specific terminology Note: Some URLs are excluded in `.lychee.toml` that require review: - zips.z.cash PDF links (404 but linked from official Zcash site) - Deprecated doc sites (doc.zebra.zfnd.org, doc-internal.zebra.zfnd.org) - zcash/zips master branch links (pending main migration) - New zebra.zfnd.org pages (pending book deployment) * fix(ci): add markdownlint config and fix alls-green SHA - Add .trunk/configs/.markdownlint.yaml to repo (was gitignored) - Fix re-actors/alls-green SHA: use commit hash, not tag object hash * fix(ci): disable additional markdownlint rules for existing docs Disable MD001, MD028, MD036 rules that flag intentional formatting patterns in existing RFC and book documentation. * fix(docs): update stale URLs and remove RFC implementation notes - Fix nginx URL migration (nginxinc -> nginx organization) - Fix zcash/zips URLs (master -> main, new /zips/ directory structure) - Fix docs.rs URL (config/struct.Config -> config/rpc/struct.Config) - Fix internal docs URLs (doc-internal.zebra.zfnd.org -> zebra.zfnd.org/internal) - Fix zfnd.org blog URLs (removed /blog/ path segment) - Remove Implementation Notes from RFCs (RFCs should be static historical records) - Clean up lychee.toml exclusions for now-working URLs - Add CHANGELOG.md to exclude_path (contains historical dead links) * fix(docs): resolve markdownlint errors in observability docs and CHANGELOGs - Add language specifier to fenced code blocks (MD040) - Add blank lines around lists (MD032) - Add blank lines around fenced code blocks (MD031) - Remove multiple consecutive blank lines (MD012)
1 parent de9a52c commit 0ebaf6d

97 files changed

Lines changed: 2578 additions & 1793 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
2-
ignore-words-list = crate,Sur,inout,Groth,groth,re-use,abl,
2+
ignore-words-list = crate,Sur,inout,Groth,groth,re-use,abl,zcash,zcashd,zebrad,zebra,utxo,utxos,nullifier,nullifiers,sapling,orchard,sprout,backpressure,proptest,thiserror,rocksdb,libsecp,fullnode,peerset,threadsafe,unrepresentable,getblocktemplate,syncer,Actix,Akka,mermaid,println,eprintln,usize,nocapture,Parallelizable,invis,UTXO,Zcash,Zaino,Zallet,librustzcash,Mainnet,Testnet,mainnet,testnet,idents,reentrancy,serializable,deserializable,deserialization,zkSNARK,zkSNARKs,lightwalletd,statics,ser,endianity,aranges
33
exclude-file = book/mermaid.min.js
4-
skip = ./zebra-rpc/qa/rpc-tests,./supply-chain
4+
skip = ./zebra-rpc/qa/rpc-tests,./supply-chain,./target

.github/ISSUE_TEMPLATE/release.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: "🚀 Zebra Release"
3-
about: 'Zebra team use only'
4-
title: 'Publish next Zebra release: (version)'
5-
labels: 'A-release, C-exclude-from-changelog, P-Medium :zap:'
6-
assignees: ''
7-
3+
about: "Zebra team use only"
4+
title: "Publish next Zebra release: (version)"
5+
labels: "A-release, C-exclude-from-changelog, P-Medium :zap:"
6+
assignees: ""
87
---
98

109
# Prepare for the Release
@@ -19,14 +18,16 @@ To check consensus correctness, we want to test that the state format is valid a
1918
- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=event%3Aschedule) since the last state change, or
2019
- [ ] Start a manual workflow run with a Zebra and `lightwalletd` full sync.
2120

22-
State format changes can be made in `zebra-state` or `zebra-chain`. The state format can be changed by data that is sent to the state, data created within the state using `zebra-chain`, or serialization formats in `zebra-state` or `zebra-chain`.
21+
State format changes can be made in `zebra-state` or `zebra-chain`. The state format can be changed by data that is sent to the state, data created within the state using `zebra-chain`, or serialization formats in `zebra-state` or `zebra-chain`.
2322

2423
After the test has been started, or if it has finished already:
24+
2525
- [ ] Ask for a state code freeze in Slack. The freeze lasts until the release has been published.
2626

2727
## Checkpoints
2828

2929
For performance and security, we want to update the Zebra checkpoints in every release.
30+
3031
- [ ] You can copy the latest checkpoints from CI by following [the zebra-checkpoints README](https://github.com/ZcashFoundation/zebra/blob/main/zebra-utils/README.md#zebra-checkpoints).
3132

3233
## Missed Dependency Updates
@@ -36,6 +37,7 @@ Sometimes `dependabot` misses some dependency updates, or we accidentally turned
3637
This step can be skipped if there is a large pending dependency upgrade. (For example, shared ECC crates.)
3738

3839
Here's how we make sure we got everything:
40+
3941
- [ ] Run `cargo update` on the latest `main` branch, and keep the output
4042
- [ ] If needed, [add duplicate dependency exceptions to deny.toml](https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/continuous-integration.md#fixing-duplicate-dependencies-in-check-denytoml-bans)
4143
- [ ] If needed, remove resolved duplicate dependencies from `deny.toml`
@@ -47,12 +49,14 @@ Here's how we make sure we got everything:
4749
Follow the steps in the [release checklist](https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md) to prepare the release:
4850

4951
Release PR:
52+
5053
- [ ] Update Changelog
5154
- [ ] Update README
5255
- [ ] Update Zebra Versions
5356
- [ ] Update End of Support Height
5457

5558
Publish Release:
59+
5660
- [ ] Create & Test GitHub Pre-Release
5761
- [ ] Publish GitHub Release
5862
- [ ] Publish Rust Crates

.github/ISSUE_TEMPLATE/usability_testing_plan.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: "📋 Usability Testing Plan"
33
about: Create a Usability Testing Plan
4-
title: 'Usability Testing Plan'
4+
title: "Usability Testing Plan"
55
labels: C-research
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

109
# Usability Testing Plan
@@ -53,7 +52,6 @@ assignees: ''
5352

5453
<!-- What needs to happen for the participant to successfully complete the task -->
5554

56-
5755
## Session Outline and timing
5856

5957
<!-- The following sections provide some space to plan out the script and tasks for your participants -->
@@ -81,4 +79,3 @@ assignees: ''
8179
## Required documentation
8280

8381
<!-- List the documents you will need to produce and bring to the usability testing sessions, e.g consent forms, usability testing script, questionnaires, etc... -->
84-

.github/PULL_REQUEST_TEMPLATE/hotfix-release-checklist.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
name: 'Hotfix Release Checklist Template'
3-
about: 'Checklist to create and publish a hotfix Zebra release'
4-
title: 'Release Zebra (version)'
5-
labels: 'A-release, C-exclude-from-changelog, P-Critical :ambulance:'
6-
assignees: ''
7-
2+
name: "Hotfix Release Checklist Template"
3+
about: "Checklist to create and publish a hotfix Zebra release"
4+
title: "Release Zebra (version)"
5+
labels: "A-release, C-exclude-from-changelog, P-Critical :ambulance:"
6+
assignees: ""
87
---
98

109
A hotfix release should only be created when a bug or critical issue is discovered in an existing release, and waiting for the next scheduled release is impractical or unacceptable.
@@ -55,7 +54,7 @@ follow semver, depending on the thing being fixed.
5554
## Test the Pre-Release (if Zebra hotfix)
5655

5756
- [ ] Wait until the Docker binaries have been built on the hotfix release branch, and the quick tests have passed:
58-
- [ ] [ci-tests.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml)
57+
- [ ] [ci-tests.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml)
5958
- [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/zfnd-deploy-nodes-gcp.yml?query=event%3Arelease)
6059

6160
## Publish Release (if Zebra hotfix)

.github/PULL_REQUEST_TEMPLATE/release-checklist.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
name: 'Release Checklist Template'
3-
about: 'Checklist to create and publish a Zebra release'
4-
title: 'Release Zebra (version)'
5-
labels: 'A-release, C-exclude-from-changelog, P-Critical :ambulance:'
6-
assignees: ''
7-
2+
name: "Release Checklist Template"
3+
about: "Checklist to create and publish a Zebra release"
4+
title: "Release Zebra (version)"
5+
labels: "A-release, C-exclude-from-changelog, P-Critical :ambulance:"
6+
assignees: ""
87
---
98

109
# Prepare for the Release
@@ -14,6 +13,7 @@ assignees: ''
1413
# Checkpoints
1514

1615
For performance and security, we want to update the Zebra checkpoints in every release.
16+
1717
- [ ] You can copy the latest checkpoints from CI by following [the zebra-checkpoints README](https://github.com/ZcashFoundation/zebra/blob/main/zebra-utils/README.md#zebra-checkpoints).
1818

1919
# Missed Dependency Updates
@@ -23,6 +23,7 @@ Sometimes `dependabot` misses some dependency updates, or we accidentally turned
2323
This step can be skipped if there is a large pending dependency upgrade. (For example, shared ECC crates.)
2424

2525
Here's how we make sure we got everything:
26+
2627
- [ ] Run `cargo update` on the latest `main` branch, and keep the output
2728
- [ ] If needed, [add duplicate dependency exceptions to deny.toml](https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/continuous-integration.md#fixing-duplicate-dependencies-in-check-denytoml-bans)
2829
- [ ] If needed, remove resolved duplicate dependencies from `deny.toml`
@@ -41,11 +42,12 @@ Once you are ready to tag a release, copy the draft changelog into `CHANGELOG.md
4142
We use [the Release Drafter workflow](https://github.com/marketplace/actions/release-drafter) to automatically create a [draft changelog](https://github.com/ZcashFoundation/zebra/releases). We follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
4243

4344
To create the final change log:
45+
4446
- [ ] Copy the [**latest** draft
45-
changelog](https://github.com/ZcashFoundation/zebra/releases) into
46-
`CHANGELOG.md` (there can be multiple draft releases)
47+
changelog](https://github.com/ZcashFoundation/zebra/releases) into
48+
`CHANGELOG.md` (there can be multiple draft releases)
4749
- [ ] Delete any trivial changes
48-
- [ ] Put the list of deleted changelog entries in a PR comment to make reviewing easier
50+
- [ ] Put the list of deleted changelog entries in a PR comment to make reviewing easier
4951
- [ ] Combine duplicate changes
5052
- [ ] Edit change descriptions so they will make sense to Zebra users
5153
- [ ] Check the category for each change
@@ -56,12 +58,14 @@ To create the final change log:
5658
README updates can be skipped for urgent releases.
5759

5860
Update the README to:
61+
5962
- [ ] Remove any "Known Issues" that have been fixed since the last release.
6063
- [ ] Update the "Build and Run Instructions" with any new dependencies.
6164
Check for changes in the `Dockerfile` since the last tag: `git diff <previous-release-tag> docker/Dockerfile`.
6265
- [ ] If Zebra has started using newer Rust language features or standard library APIs, update the known working Rust version in the README, book, and `Cargo.toml`s
6366

6467
You can use a command like:
68+
6569
```sh
6670
fastmod --fixed-strings '1.58' '1.65'
6771
```
@@ -88,20 +92,11 @@ This check runs automatically on pull requests with the `A-release` label. It mu
8892

8993
Zebra follows [semantic versioning](https://semver.org). Semantic versions look like: MAJOR.MINOR.PATCH[-TAG.PRE-RELEASE]
9094

91-
Choose a release level for `zebrad`. Release levels are based on user-visible changes:
95+
Choose a release level for `zebrad`. Release levels are based on user-visible changes from the changelog:
9296

93-
- Major release: breaking changes to RPCs (fields changed or removed), config files (fields
94-
changed or removed), command line (arguments changed or removed), features
95-
(features changed or removed), environment variables (changed or removed)
96-
or any other external interface of Zebra
97-
- Minor release: new features are `minor` releases
98-
- Patch release: otherwise
99-
100-
Update the version using:
101-
102-
```
103-
cargo release version --verbose --execute --allow-branch '*' -p zebrad patch # [ major | minor ]
104-
```
97+
- Mainnet Network Upgrades are `major` releases
98+
- significant new features or behaviour changes; changes to RPCs, command-line, or configs; and deprecations or removals are `minor` releases
99+
- otherwise, it is a `patch` release
105100

106101
## Update Crate Versions and Crate Change Logs
107102

@@ -144,6 +139,7 @@ cargo release replace --verbose --execute --allow-branch '*' -p <crate>
144139

145140
The end of support height is calculated from the current blockchain height:
146141

142+
- [ ] Find where the Zcash blockchain tip is now by using a [Zcash Block Explorer](https://mainnet.zcashexplorer.app/) or other tool.
147143
- [ ] Replace `ESTIMATED_RELEASE_HEIGHT` in [`end_of_support.rs`](https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/sync/end_of_support.rs) with the height you estimate the release will be tagged.
148144

149145
<details>
@@ -160,7 +156,6 @@ The end of support height is calculated from the current blockchain height:
160156

161157
- [ ] Push the version increments and the release constants to the release branch.
162158

163-
164159
# Publish the Zebra Release
165160

166161
## Create the GitHub Pre-Release
@@ -182,7 +177,7 @@ The end of support height is calculated from the current blockchain height:
182177
## Test the Pre-Release
183178

184179
- [ ] Wait until the Docker binaries have been built on `main`, and the quick tests have passed:
185-
- [ ] [zfnd-ci-integration-tests-gcp.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/zfnd-ci-integration-tests-gcp.yml?query=branch%3Amain)
180+
- [ ] [zfnd-ci-integration-tests-gcp.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/zfnd-ci-integration-tests-gcp.yml?query=branch%3Amain)
186181
- [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/zfnd-deploy-nodes-gcp.yml?query=event%3Arelease)
187182

188183
## Publish Release

.github/workflows/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ graph TB
7373
class PR,Push,Schedule,Manual trigger
7474
```
7575

76-
*The diagram above illustrates the parallel execution patterns in our CI/CD system. All triggers can initiate the pipeline concurrently, unit tests run in parallel after the Docker image build, and integration tests follow a mix of parallel and sequential steps. The infrastructure components support their respective workflow parts concurrently.*
76+
_The diagram above illustrates the parallel execution patterns in our CI/CD system. All triggers can initiate the pipeline concurrently, unit tests run in parallel after the Docker image build, and integration tests follow a mix of parallel and sequential steps. The infrastructure components support their respective workflow parts concurrently._
7777

7878
## Core Infrastructure
7979

@@ -93,8 +93,8 @@ graph TB
9393

9494
#### Docker-based Testing
9595

96-
- Most tests run in containers defined by our [Dockerfile](http://../../docker/Dockerfile)
97-
- The [entrypoint script](http://../../docker/entrypoint.sh) manages:
96+
- Most tests run in containers defined by our [Dockerfile](../../docker/Dockerfile)
97+
- The [entrypoint script](../../docker/entrypoint.sh) manages:
9898
- Test execution
9999
- Environment configuration
100100
- Resource cleanup
@@ -130,12 +130,12 @@ graph TB
130130

131131
### 5. Queue Management
132132

133-
[Mergify](https://mergify.yml)
133+
[Mergify](https://mergify.com)
134134

135135
- Automated PR merging and queue-based testing
136136
- Priority management
137137
- Ensures code quality before merge
138-
- See our [`.mergify.yml`](http://../../.mergify.yml) for configuration
138+
- See our [`.mergify.yml`](../../.mergify.yml) for configuration
139139

140140
## Workflow Organization
141141

@@ -165,7 +165,7 @@ graph TB
165165

166166
### Test Orchestration with Nextest
167167

168-
Our test execution is centralized through our Docker [entrypoint script](http://../../docker/entrypoint.sh) and orchestrated by `cargo nextest`. This provides a unified and efficient way to run tests both in CI and locally.
168+
Our test execution is centralized through our Docker [entrypoint script](../../docker/entrypoint.sh) and orchestrated by `cargo nextest`. This provides a unified and efficient way to run tests both in CI and locally.
169169

170170
#### Nextest Profile-driven Testing
171171

@@ -191,7 +191,6 @@ Our tests are organized into different categories:
191191

192192
Each test category has specific profiles that can be run individually using the `NEXTEST_PROFILE` environment variable.
193193

194-
195194
### Pull Request Testing
196195

197196
#### Continuous Validation

0 commit comments

Comments
 (0)