Skip to content

ci: extend CodeQL to Rust, align Node 22, add docs index and link checking - #286

Merged
techAlhaji merged 7 commits into
SorobanForge:mainfrom
Oluwaferanmi18:ci/docs-link-check-node-align-codeql-rust
Oct 27, 2026
Merged

techAlhaji merged 7 commits into
SorobanForge:mainfrom
Oluwaferanmi18:ci/docs-link-check-node-align-codeql-rust

Conversation

@Oluwaferanmi18

Copy link
Copy Markdown
Contributor

Resolves four maintenance issues in one pass.

Closes #161
Closes #159
Closes #163
Closes #145

#163 — align the Node version (.nvmrc, engines, workflows)

One version is chosen — Node 22, what CI already ran — and wired everywhere:

  • .nvmrc: 20 → 22, and it is now the single source of truth: every setup-node step in ci.yml (4 jobs) and release.yml reads it via node-version-file: '.nvmrc', so local, CI, and release cannot drift again.
  • package.json engines.node: >=18.0.0 → >=22.0.0. .npmrc already sets engine-strict=true, so pnpm install now fails fast with a clear engine error on Node 18/20 instead of letting a locally-green change fail in CI.
  • No minimum-version CI matrix: Node 18 (EOL April 2025) and 20 (EOL April 2026) support was intentionally dropped; engines is raised and prerequisites are updated instead.
  • README prerequisites (Node.js 22 pinned in .nvmrc, pnpm ≥ 9) and CONTRIBUTING's Node.js >= 22.0.0 updated.
  • The decision is recorded in docs/development-guide.md ("Toolchain versions: Node & pnpm"), including how to move the floor later.

#161 — extend CodeQL to the Rust contracts

  • codeql.yml matrix is now include: entries: javascript-typescript (autobuild, unchanged) and rust with build-mode: manual.
  • The Rust leg installs dtolnay/rust-toolchain@stable with the wasm32v1-none target and caches cargo via Swatinem/rust-cache (workspaces: contracts), then builds the contracts workspace exactly as pnpm build:contracts does (cargo build --manifest-path contracts/Cargo.toml --target wasm32v1-none --release) between init and analyze.
  • Runtime stays small (the workspace is three crates; warm cache rebuilds are seconds), and per the AC the job is not added to scripts/setup-branch-protection.sh — it is not required for merge until it has proven stable on main.
  • Triage note: alert triage can only happen after the first successful run on main (CodeQL needs the default-branch baseline); any alerts found there will be triaged in a follow-up, as the AC allows.

#145 — check documentation links and formatting

  • New workflow .github/workflows/docs.yml runs lycheeverse/lychee-action over **/*.md with fail: true, backed by .lychee.toml.
  • The config fails on broken relative links, dead external URLs, and — with include_fragments = "full" — dead anchors (e.g. the docs/development-guide.md#test-snapshots link in CONTRIBUTING). A flaky-host allowlist (img.shields.io, contrib.rocks) and 429-accepted rate limits keep unrelated PRs green; node_modules is excluded.
  • Verified by running the exact same lychee config locally: 93 links, 0 errors.
  • .prettierignore confirmed to not ignore docs/ (a comment now records that it must stay that way); format:check in the existing "Lint Codebase" job covers all Markdown.
  • The job is added to scripts/setup-branch-protection.sh as the required context Check Documentation Links.
  • Note on the trigger: the workflow intentionally has no paths: filter on pull_request. A path-filtered workflow never reports on unrelated PRs, so as a required check it would block every non-docs merge; the job is a few seconds, so it reports on every PR instead.
  • Dead links found and fixed:
    • README.md → https://github.com/SorobanForge/stellar-streams/discussions returned 404 (Discussions is not enabled); now points to GitHub Issues.
    • CONTRIBUTING.md → https://pnpm.io/installation#using-corepack — the anchor no longer exists on pnpm's page; now links to the page itself.
  • This PR also lands the Prettier fixes that were sitting in the working tree for docs/contracts.md and packages/hooks/src/index.ts (whitespace/table alignment only). format:check on main currently fails on those two files plus docs/development-guide.md; with these commits it passes.

#159 — docs index page

  • New docs/README.md lists every page in docs/, grouped by getting started / protocol / contributing / operations, with a one-sentence audience description each, plus pointers to the top-level documents (README, ARCHITECTURE, CONTRIBUTING, ROADMAP, SECURITY).
  • The root README gained a Documentation section that links the index first, then the highlight pages (docs/contracts.md, docs/development-guide.md, docs/deployments.md).
  • Dead-link pass completed as part of the index work (see ci: check documentation links and formatting #145 above): no remaining broken relative links.

Verification

  • lychee --config .lychee.toml './**/*.md' → 93 links, 0 errors, 7 excluded (allowlist).
  • pnpm run format:check → passes (was failing on 3 files at main).
  • bash -n scripts/setup-branch-protection.sh → OK.
  • Workflow YAML re-formatted with the repo's Prettier config; pnpm run lint / typecheck / test unaffected (no source changes besides a whitespace-only diff in packages/hooks/src/index.ts).

🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com

…obanForge#163

- SorobanForge#163: pin Node 22 in .nvmrc as the single source of truth; every workflow's
  setup-node reads it via node-version-file; engines.node raised to >=22.0.0 so
  engine-strict fails fast on unsupported versions; decision recorded in
  docs/development-guide.md; README + CONTRIBUTING prerequisites updated
- SorobanForge#161: add rust to the CodeQL matrix with a manual wasm32v1-none build of the
  contracts workspace and Swatinem/rust-cache so the job does not rebuild
- SorobanForge#145: add a lychee Markdown link checker (docs.yml + .lychee.toml, flaky-host
  allowlist), fix two dead links (Discussions 404, pnpm.io corepack anchor),
  add "Check Documentation Links" to the branch-protection script, and land the
  pending Prettier fixes that were failing format:check on main
- SorobanForge#159: add docs/README.md index grouped by audience and link it from the root
  README's new Documentation section

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@Oluwaferanmi18 is attempting to deploy a commit to the techalhaji's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@Oluwaferanmi18 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@techAlhaji
techAlhaji self-requested a review October 21, 2026 13:46
techAlhaji
techAlhaji previously approved these changes Oct 21, 2026
@techAlhaji

Copy link
Copy Markdown
Collaborator

fix the failing ci please

Oluwaferanmi18 and others added 2 commits October 25, 2026 14:43
Root causes of the five failing jobs on this PR head:

- CodeQL (rust, javascript-typescript): `codeql database init` rejected
  `manual` for Rust and `autobuild` for JS/TS. Both languages only accept
  `none`, so the matrix now uses buildless mode and the manual cargo build
  and codeql-action/autobuild steps are removed.
- Check Documentation Links: five dead links — `#escrow`, `#security-model`
  and the development-guide walkthrough anchors, `packages/ARCHITECTURE.md`
  resolved from packages/hooks, and stellar.org/freighter (404) — plus an npm
  badge pointing at a package that is not published.
- Test Soroban Contracts: the tree used `StreamError::SameRecipient` without
  declaring the variant, and kept an unused `use std::format;` that clippy
  `-D warnings` rejects.
- cargo-deny: RUSTSEC-2026-0387 (crypto-bigint) had no ignore entry, matching
  the entry already on main.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@techAlhaji
techAlhaji merged commit 770a7dd into SorobanForge:main Oct 27, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants