Skip to content

docs: add Fern documentation scaffolding#249

Merged
dmitsh merged 2 commits into
NVIDIA:mainfrom
pdmack:docs/fern-scaffolding
Apr 17, 2026
Merged

docs: add Fern documentation scaffolding#249
dmitsh merged 2 commits into
NVIDIA:mainfrom
pdmack:docs/fern-scaffolding

Conversation

@pdmack
Copy link
Copy Markdown
Contributor

@pdmack pdmack commented Apr 16, 2026

Summary

  • Add fern/ scaffold with NVIDIA theme to publish provider and engine docs via Fern
  • Add docs/index.yml navigation covering all 10 provider and engine pages
  • Add 4 CI workflows: fern check, PR preview comments, continuous staging publish, versioned tag publish
  • Fix 4 pre-existing broken links in slinky.md, slurm.md, infiniband.md, and netq.md

Test plan

  • fern check passes locally (0 errors)
  • All docs filenames are lowercase with hyphens
  • Broken cross-directory links resolved
  • DCO sign-off on commit
  • fern docs dev local preview (run HOST=0.0.0.0 fern docs dev and navigate to http://<host>:3000/topograph/dev)

Fixes #248

🤖 Generated with Claude Code

@pdmack pdmack requested a review from dmitsh as a code owner April 16, 2026 16:49
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.46%. Comparing base (549b9c2) to head (42f03c4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #249   +/-   ##
=======================================
  Coverage   68.46%   68.46%           
=======================================
  Files          82       82           
  Lines        4842     4842           
=======================================
  Hits         3315     3315           
  Misses       1395     1395           
  Partials      132      132           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 16, 2026

Greptile Summary

This PR adds Fern documentation scaffolding for the topograph project — including an NVIDIA-themed fern/ config, CI workflows for check/preview/publish, and fixes to four pre-existing broken links in the docs.

  • P1 (publish-fern-docs.yml): GitHub's paths filter applies to tag push events as well as branch pushes. Pushing a docs/v* tag to a commit that doesn't modify docs/** or fern/** will silently skip the publish workflow, making the documented versioned-release approach (git tag docs/v1.2.0 && git push) unreliable.
  • Two prior findings remain open: the docs/ directory is missing from the preview artifact, and fern/main.css carries a proprietary NVIDIA license identifier that conflicts with the repo's Apache-2.0 license.

Confidence Score: 4/5

Safe to merge after resolving the tag-triggered publish gap and the open prior findings (missing docs artifact, proprietary CSS license).

One new P1 (tag-paths filter interaction silently suppresses versioned doc releases) plus two unresolved P1s from prior review rounds keep this below 5.

publish-fern-docs.yml (tag trigger paths issue), fern-docs-preview-build.yml (missing docs/ artifact), fern/main.css (proprietary license header).

Important Files Changed

Filename Overview
.github/workflows/publish-fern-docs.yml Publish workflow with floating action tags; paths filter inadvertently applies to tag pushes, making documented versioned-release workflow unreliable.
.github/workflows/fern-docs-ci.yml CI workflow for fern check and link validation; uses unpinned action tags unlike the sibling preview-build workflow.
.github/workflows/fern-docs-preview-build.yml Build half of the two-step PR preview; properly commit-pinned actions, but docs/ directory is excluded from the uploaded artifact (flagged in prior review).
.github/workflows/fern-docs-preview-comment.yml Comment half of the two-step preview; correctly isolates secrets from untrusted PR code.
fern/docs.yml Main Fern configuration with NVIDIA theme, layout, logo, and navigation; references docs/index.yml correctly via relative path.
fern/main.css NVIDIA-themed CSS with LicenseRef-NvidiaProprietary SPDX identifier — conflicts with the repo's Apache-2.0 license (flagged in prior review).
docs/index.yml Fern navigation index covering all 10 provider and engine pages; paths look correct relative to the docs/ root.

Sequence Diagram

sequenceDiagram
    participant PR as Pull Request
    participant Build as Preview: Build<br/>(pull_request)
    participant Artifact as GitHub Artifact<br/>(fern/ + metadata)
    participant Comment as Preview: Comment<br/>(workflow_run)
    participant Fern as Fern Cloud

    PR->>Build: push to docs or fern files
    Build->>Build: Save PR metadata
    Build->>Artifact: Upload fern/ + preview-metadata/
    Artifact-->>Comment: workflow_run completed
    Comment->>Artifact: Download fern-preview artifact
    Comment->>Fern: fern generate --docs --preview --id HEAD_REF
    Fern-->>Comment: Preview URL
    Comment->>PR: Post/update preview comment

    note over PR, Fern: Publish path (main branch)
    PR->>Fern: push to main with docs/** or fern/**
    Fern-->>PR: Docs live at topograph.docs.buildwithfern.com

    note over PR, Fern: Versioned publish (tag) — broken
    PR->>Fern: git push docs/v* tag
    note right of Fern: ⚠️ silently skipped if tagged commit<br/>doesn't touch docs/ or fern/
Loading

Reviews (2): Last reviewed commit: "docs: fix MDX img tags, instances URL, a..." | Re-trigger Greptile

Comment on lines +57 to +64
- name: Upload fern sources and metadata
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fern-preview
path: |
fern/
preview-metadata/
retention-days: 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 docs/ directory missing from uploaded artifact

The artifact upload includes fern/ and preview-metadata/ but not docs/. The companion comment workflow runs fern generate --docs --preview from ./fern, which reads fern/docs.yml, and that file references path: ../docs/index.yml. Without the docs/ tree in the artifact, the path resolves to a non-existent location and fern generate will fail for every PR preview.

Suggested change
- name: Upload fern sources and metadata
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fern-preview
path: |
fern/
preview-metadata/
retention-days: 1
- name: Upload fern sources and metadata
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fern-preview
path: |
fern/
docs/
preview-metadata/
retention-days: 1

Comment thread fern/main.css
Comment on lines +1 to +6
/*!
* SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
*
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
* property and proprietary rights in and to this material, related
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Proprietary license in an Apache-2.0 repository

The SPDX identifier LicenseRef-NvidiaProprietary conflicts with the Apache-2.0 license used throughout the rest of this open-source repository. Including a proprietary-licensed file in an Apache-2.0 project may violate the repository's overall license terms and could block downstream users from distributing or modifying the CSS. Please confirm whether this file is cleared for Apache-2.0 relicensing, or update the header accordingly.

timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Unpinned action tags vs. commit-pinned in sibling workflows

fern-docs-ci.yml and publish-fern-docs.yml use floating tags (actions/checkout@v5, actions/setup-node@v4) while fern-docs-preview-build.yml pins both to full commit SHAs. Floating tags can silently pick up breaking changes or supply-chain attacks. Consider pinning to commit SHAs here for consistency:

Suggested change
uses: actions/checkout@v5
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

dmitsh
dmitsh previously approved these changes Apr 16, 2026
pdmack added 2 commits April 17, 2026 15:43
- Add fern/ scaffold with NVIDIA theme (assets, CSS, components)
- Add docs/index.yml navigation covering all provider and engine pages
- Fix broken cross-directory and image links in slinky, slurm, infiniband, and netq docs
- Add CI workflows: fern check, PR preview comments, and staging publish

Signed-off-by: Pete MacKinnon <pmackinnon@nvidia.com>
Signed-off-by: Pete MacKinnon <pmackinnon@nvidia.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 17, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment on lines +27 to +35
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'fern/**'
tags:
- 'docs/v*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 paths filter silently suppresses tag-triggered publishes

In GitHub Actions, the paths filter under push: applies to both branch pushes and tag pushes. When you push a docs/v* tag, GitHub evaluates the filter against the files changed in the commit the tag points to — so if that commit only modified Go source files (no docs/** or fern/**), the workflow never triggers and the versioned publish is silently skipped.

The workflow comment instructs git tag docs/v1.2.0 && git push origin docs/v1.2.0, which will commonly fail to fire this condition. The workflow_dispatch fallback mitigates this, but the documented tag-based release path is unreliable.

The idiomatic fix is to split the tag trigger into a separate workflow or use an if: condition — GitHub doesn't allow two push: keys in one on: block, but you can restructure as:

on:
  push:
    branches:
      - main
    paths:
      - 'docs/**'
      - 'fern/**'
  push:
    tags:
      - 'docs/v*'
  workflow_dispatch: {}

Or, more practically, move the versioned publish to a dedicated workflow file triggered only by push: tags: 'docs/v*' without a paths filter.

@dmitsh dmitsh merged commit 8106200 into NVIDIA:main Apr 17, 2026
3 checks passed
resker added a commit to resker/topograph that referenced this pull request Apr 18, 2026
Ports the Fern workflow guide that already exists in NVIDIA/NVSentinel
(also a Fern-based docs site), substituting topograph for nvsentinel in
paths and preview URLs. Covers:

- Source-of-truth rule: docs/ is authoritative, fern/ is site config and
  theme only
- Local preview commands (fern check, fern docs dev) with the correct
  topograph path prefix for the bound preview URL
- CI workflows table: what each of the four existing fern-* workflows
  does and when it fires
- Secret requirement: DOCS_FERN_TOKEN (matches topograph's
  publish-fern-docs.yml)
- Publishing trigger: docs/v* tag push or Actions dispatch

Closes a knowledge gap in how to work with the Fern scaffolding added
in NVIDIA#249. NVSentinel is used as the template because it is the only
NVIDIA OSS Fern-using repo that currently documents its Fern workflow.

Signed-off-by: Rob Esker <resker@nvidia.com>
dmitsh pushed a commit that referenced this pull request Apr 18, 2026
Ports the Fern workflow guide that already exists in NVIDIA/NVSentinel
(also a Fern-based docs site), substituting topograph for nvsentinel in
paths and preview URLs. Covers:

- Source-of-truth rule: docs/ is authoritative, fern/ is site config and
  theme only
- Local preview commands (fern check, fern docs dev) with the correct
  topograph path prefix for the bound preview URL
- CI workflows table: what each of the four existing fern-* workflows
  does and when it fires
- Secret requirement: DOCS_FERN_TOKEN (matches topograph's
  publish-fern-docs.yml)
- Publishing trigger: docs/v* tag push or Actions dispatch

Closes a knowledge gap in how to work with the Fern scaffolding added
in #249. NVSentinel is used as the template because it is the only
NVIDIA OSS Fern-using repo that currently documents its Fern workflow.

Signed-off-by: Rob Esker <resker@nvidia.com>
@pdmack pdmack deleted the docs/fern-scaffolding branch April 20, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC]: Add Fern documentation scaffolding

2 participants