Skip to content

Conversation

@gustavovalverde
Copy link
Member

Motivation

Improve documentation quality across the Zebra codebase by adding automated checks and fixing existing issues. This ensures consistent, well-formatted, and accurate documentation going forward.

Solution

New CI Workflow (docs-check.yml)

Adds automated documentation quality checks that run on PRs and pushes affecting markdown files:

  • Link checking (lychee): Validates all URLs in documentation are accessible
  • Spell checking (codespell): Catches common typos and spelling errors
  • Markdown linting (markdownlint): Enforces consistent formatting

The workflow follows project conventions:

  • Pinned action SHAs with version comments
  • Per-job permissions (least privilege)
  • Aggregator job pattern (docs-check-success)
  • Validated with actionlint and zizmor

Documentation Fixes

Fixed issues across ~100 files:

  • MD040: Added language specifiers to fenced code blocks
  • MD059: Replaced bare URLs with descriptive link text
  • Spelling corrections for domain-specific terminology
  • Updated outdated references and links

New Documentation

  • ARCHITECTURE.md: High-level codebase overview
  • book/src/dev/onboarding.md: Developer onboarding guide
  • book/src/dev/crates.md: Crate architecture documentation
  • book/src/user/ecosystem-integration.md: Integration guide for wallets/exchanges
  • ADRs for Tower service architecture, three-level verification, and RocksDB storage

Configuration Files

  • .lychee.toml: Link checker configuration with exclusion patterns
  • .codespellrc: Updated with Zcash-specific terminology
  • .gitignore: Added .lycheecache exclusion

URLs Excluded in Lychee (Require Review)

The following URL patterns are excluded and should be reviewed for potential fixes:

Pattern Reason Action Needed
zips.z.cash/protocol/*.pdf Returns 404 but linked from official Zcash site Check with Zcash team
doc.zebra.zfnd.org, doc-internal.zebra.zfnd.org Deprecated documentation sites Remove references or update URLs
github.com/zcash/zips/blob/master/ Pending master → main migration Update when zcash/zips migrates
zebra.zfnd.org/dev/crates.html (and others) New pages not yet deployed Will resolve after book deployment
www.zfnd.org/blog/futures-batch-verification/ Blog post removed/reorganized Find new URL or remove reference
github.com/nginxinc/docker-nginx/issues/490 Issue deleted or made private Remove or update reference

Tests

  • Ran codespell --config .codespellrc locally - passes
  • Ran markdownlint "**/*.md" --config .trunk/configs/.markdownlint.yaml locally - passes
  • Ran lychee --config .lychee.toml "**/*.md" locally - passes with exclusions
  • Validated workflow with actionlint and zizmor - no errors

Specifications & References

Follow-up Work

  • Review excluded URLs in .lychee.toml and fix where possible
  • Update links when zcash/zips completes master → main migration
  • New documentation pages will be live after book deployment

PR Checklist

  • The PR name is suitable for the release notes.
  • The PR follows the contribution guidelines.
  • The library crate changelogs are up to date.
  • The solution is tested.
  • The documentation is up to date.

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)
@gustavovalverde gustavovalverde added A-docs Area: Documentation C-tech-debt Category: Code maintainability issues P-Low ❄️ labels Dec 19, 2025
- Add .trunk/configs/.markdownlint.yaml to repo (was gitignored)
- Fix re-actors/alls-green SHA: use commit hash, not tag object hash
Disable MD001, MD028, MD036 rules that flag intentional formatting
patterns in existing RFC and book documentation.
@daira
Copy link
Contributor

daira commented Jan 14, 2026

zips.z.cash/protocol/*.pdf — Returns 404 but linked from official Zcash site

It's possible this 404 was during a short time when the protocol spec links were broken. The exclusion should be removed.

@conradoplg conradoplg added do-not-merge Tells Mergify not to merge this PR and removed do-not-merge Tells Mergify not to merge this PR labels Jan 20, 2026
@gustavovalverde gustavovalverde self-assigned this Jan 28, 2026
Copy link
Collaborator

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixing formatting changes with content changes and additions makes this PR very difficult to review since those require totally different levels of detail.

Would you mind splitting those up if possible? Thinking about it, I think it's easier to merge this soon and fix things later if needed

There are also conflicts - feel free to ping me when you solve them so I can approve this quickly and avoid more conflicts

Comment on lines +77 to +79
# Run on Testnet
cargo run --release -- --network testnet

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong

Suggested change
# Run on Testnet
cargo run --release -- --network testnet

@conradoplg
Copy link
Collaborator

Thinking about it, I think it's easier to merge this soon and fix things later if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Area: Documentation C-tech-debt Category: Code maintainability issues P-Low ❄️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants