Skip to content

Commit 6414e2f

Browse files
authored
Merge branch 'main' into main
2 parents cd29cc1 + 2113241 commit 6414e2f

646 files changed

Lines changed: 23092 additions & 40134 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.

.agents/contributor-skills/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repo contribution workflows.
1212
|---|---|
1313
| `build-and-dependency` | Container setup, uv package management, environment variables, CLI usage |
1414
| `cicd` | Commit/PR workflow, CI trigger mechanism, failure investigation |
15-
| `fern-docs` | Maintain the Fern docs site under `fern/`: pages, slugs, redirects, version aliases, library reference |
15+
| `fern-docs` | Maintain the Fern docs site under `docs/` (MDX content) + `docs/fern/` (infra): pages, slugs, redirects, version aliases, library reference |
1616
| `linting-and-formatting` | ruff rules, type hints, docstrings, copyright headers, code review checklist |
1717
| `parity-testing` | Verify numerical correctness against references |
1818
| `testing` | Unit and functional test layout, tier semantics (L0/L1/L2), adding tests |

.agents/contributor-skills/fern-docs/SKILL.md

Lines changed: 101 additions & 79 deletions
Large diffs are not rendered by default.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Restores frozen backward-version page trees into the working copy so the Fern
17+
# build sees every version train, even though only the nightly tree (top-level
18+
# docs/) is kept on main. Each archived version's pages/ tree lives on a separate
19+
# git ref (a long-lived archive branch by default, or a docs/v* tag for an
20+
# immutable snapshot) and is restored into docs/fern/versions/<vdir>/pages.
21+
#
22+
# Fern has no native cross-ref version sourcing: `fern generate --docs` reads the
23+
# single local working tree, so the archived pages must physically exist before
24+
# `fern check` / `fern generate` runs. This action provides that materialization.
25+
#
26+
# The archive ref is treated as an opaque git ref, so a branch and a tag flow
27+
# through the same code path -- only the registry value differs.
28+
29+
name: Stitch archived Fern version pages
30+
description: Restore frozen pages/ trees from an archive branch or docs/v* tag into docs/fern/versions/<vdir>/pages.
31+
32+
inputs:
33+
archived-versions:
34+
description: >-
35+
Newline-separated list of "<version-dir>=<git-ref>" pairs. <version-dir> is
36+
the directory under docs/fern/versions/ (e.g. "v0.4"); <git-ref> is the
37+
branch or tag holding that version's frozen pages (e.g. "docs-archive" or
38+
"docs/v0.4.0"). The `latest` train is an alias of an existing pages tree and
39+
needs no entry.
40+
required: true
41+
42+
runs:
43+
using: composite
44+
steps:
45+
- name: Restore archived version pages
46+
shell: bash
47+
env:
48+
ARCHIVED_VERSIONS: ${{ inputs.archived-versions }}
49+
run: |
50+
set -euo pipefail
51+
while IFS='=' read -r vdir ref; do
52+
vdir="$(echo "${vdir}" | xargs)" # trim surrounding whitespace
53+
ref="$(echo "${ref}" | xargs)"
54+
[ -z "${vdir}" ] && continue
55+
subtree="docs/fern/versions/${vdir}/pages"
56+
echo "::group::Stitch ${vdir} from ${ref}"
57+
# Shallow-fetch the ref. Works for a branch or a tag alike and does not
58+
# need a full-history (fetch-depth: 0) checkout. actions/checkout has
59+
# already configured the authenticated 'origin' remote, so fetching the
60+
# base repo's own ref needs no extra secret.
61+
git fetch --depth=1 origin "${ref}" --quiet
62+
# Hard-fail if the ref or the subtree is missing -- a silent miss would
63+
# otherwise drop the version from the published site (publish is a full
64+
# snapshot, not incremental).
65+
if [ -z "$(git ls-tree -r --name-only FETCH_HEAD -- "${subtree}")" ]; then
66+
echo "::error::archive ref '${ref}' does not contain '${subtree}'"
67+
exit 1
68+
fi
69+
# Restore ONLY the frozen pages subtree from the ref. docs.yml and the
70+
# nav YAMLs always come from the live checkout, never the archive ref,
71+
# so editorial changes on the current branch always win and the frozen
72+
# prose can never drift into the wrong train.
73+
git restore --source=FETCH_HEAD --worktree --no-overlay -- "${subtree}"
74+
echo " restored $(git ls-tree -r --name-only FETCH_HEAD -- "${subtree}" | wc -l | xargs) files into ${subtree}"
75+
echo "::endgroup::"
76+
done <<< "${ARCHIVED_VERSIONS}"

.github/workflows/config/.secrets.baseline

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
{
8787
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
8888
},
89+
{
90+
"path": "detect_secrets.filters.common.is_baseline_file",
91+
"filename": ".github/workflows/config/.secrets.baseline"
92+
},
8993
{
9094
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
9195
"min_level": 2
@@ -125,13 +129,22 @@
125129
}
126130
],
127131
"results": {
128-
"docs/guides/mlflow-logging.md": [
132+
"docs/fern/versions/v0.4/pages/guides/mlflow-logging.mdx": [
133+
{
134+
"type": "Basic Auth Credentials",
135+
"filename": "docs/fern/versions/v0.4/pages/guides/mlflow-logging.mdx",
136+
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
137+
"is_verified": false,
138+
"line_number": 65
139+
}
140+
],
141+
"docs/guides/mlflow-logging.mdx": [
129142
{
130143
"type": "Basic Auth Credentials",
131-
"filename": "docs/guides/mlflow-logging.md",
144+
"filename": "docs/guides/mlflow-logging.mdx",
132145
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
133146
"is_verified": false,
134-
"line_number": 62
147+
"line_number": 65
135148
}
136149
],
137150
"examples/llm_finetune/nemotron/nemotron_super_v3_hellaswag.yaml": [
@@ -152,24 +165,6 @@
152165
"line_number": 42
153166
}
154167
],
155-
"fern/versions/nightly/pages/guides/mlflow-logging.mdx": [
156-
{
157-
"type": "Basic Auth Credentials",
158-
"filename": "fern/versions/nightly/pages/guides/mlflow-logging.mdx",
159-
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
160-
"is_verified": false,
161-
"line_number": 65
162-
}
163-
],
164-
"fern/versions/v0.4/pages/guides/mlflow-logging.mdx": [
165-
{
166-
"type": "Basic Auth Credentials",
167-
"filename": "fern/versions/v0.4/pages/guides/mlflow-logging.mdx",
168-
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
169-
"is_verified": false,
170-
"line_number": 65
171-
}
172-
],
173168
"skills/nemo-automodel-distributed-training/skill.oms.sig": [
174169
{
175170
"type": "Base64 High Entropy String",
@@ -319,5 +314,5 @@
319314
}
320315
]
321316
},
322-
"generated_at": "2026-05-29T12:02:30Z"
317+
"generated_at": "2026-06-02T14:00:50Z"
323318
}

.github/workflows/fern-docs-ci.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,21 @@
1717

1818
name: Fern docs (check)
1919

20-
# Triggers on push to mirrored PR branches (`pull-request/<n>`) created by the
21-
# FW-CI mirror bot — same pattern as build-docs.yml. This runs in the trusted
22-
# base-repo context, so DOCS_FERN_TOKEN is available even for fork PRs.
20+
# Runs `fern check` on every push to a `pull-request/<n>` branch -- i.e. whenever
21+
# `/ok to test <sha>` is posted: copy-pr-bot copies the PR onto pull-request/<n>
22+
# and pushes it, which fires this (exactly like the main `CICD NeMo` pipeline).
23+
#
24+
# Deliberately NO `paths:` filter. GitHub evaluates a push `paths:` filter against
25+
# the branch-creation diff, which is unreliable for the first push copy-pr-bot
26+
# makes to a brand-new pull-request/<n> branch, so a docs-only PR can skip a
27+
# path-filtered check entirely -- that is how a malformed nightly.yml slipped past
28+
# CI and broke the publish on main. cicd-main.yml omits the filter for the same
29+
# reason. `fern check` is ~25s and needs no secrets, so running it on every mirror
30+
# push is cheap and safe.
2331
on:
2432
push:
2533
branches:
2634
- "pull-request/[0-9]+"
27-
paths:
28-
- 'fern/**'
29-
- '.github/workflows/fern-docs-ci.yml'
3035

3136
permissions:
3237
contents: read
@@ -38,14 +43,24 @@ jobs:
3843
- name: Checkout repository
3944
uses: actions/checkout@v6
4045

46+
# `fern check` validates that every path: referenced by docs.yml / the
47+
# version YAMLs exists on disk. The frozen v0.4 pages are archived off main,
48+
# so restore them before checking or the validation fatals on missing paths.
49+
- name: Stitch archived version pages
50+
uses: ./.github/actions/stitch-fern-versions
51+
with:
52+
archived-versions: |
53+
v0.4=docs-archive
54+
4155
- name: Setup Node.js
4256
uses: actions/setup-node@v6
4357
with:
4458
node-version: '20'
4559

46-
- name: Install Fern CLI
47-
run: npm install -g fern-api
48-
4960
- name: Validate Fern configuration
50-
working-directory: ./fern
51-
run: fern check
61+
working-directory: ./docs/fern
62+
run: |
63+
# Pin the Fern CLI to the version in fern.config.json so CI matches
64+
# local `make docs-check` (and the global-theme-capable 5.29.0+ pin).
65+
fern_version=$(jq -r .version fern.config.json)
66+
npx -y "fern-api@$fern_version" check

.github/workflows/fern-docs-preview-build.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515

1616
# Workflow 1 of 2 for Fern doc previews.
1717
#
18-
# Collects the fern/ sources and PR metadata from the (possibly untrusted) PR
19-
# branch and uploads them as an artifact. No secrets are used here, so this is
20-
# safe to run on fork PRs via the regular pull_request trigger.
18+
# Collects the docs/ sources (Fern config under docs/fern/ AND the nightly MDX
19+
# content at the docs/ top level, which nightly.yml references via ../../) plus
20+
# PR metadata from the (possibly untrusted) PR branch and uploads them as an
21+
# artifact. No secrets are used here, so this is safe to run on fork PRs via
22+
# the regular pull_request trigger.
2123
#
2224
# The companion workflow (fern-docs-preview-comment.yml) picks up the artifact,
2325
# builds the preview with DOCS_FERN_TOKEN, and posts the PR comment.
@@ -27,7 +29,7 @@ name: "Preview Fern Docs: Build"
2729
on:
2830
pull_request:
2931
paths:
30-
- 'fern/**'
32+
- 'docs/**'
3133
- '.github/workflows/fern-docs-preview-build.yml'
3234

3335
permissions:
@@ -42,6 +44,17 @@ jobs:
4244
with:
4345
fetch-depth: 0
4446

47+
# The frozen v0.4 pages are archived off main; restore them into the working
48+
# copy so the uploaded artifact carries every version train. The companion
49+
# comment workflow never checks out the repo -- it only consumes this
50+
# artifact -- so the stitch must happen here, before upload. Fetching the
51+
# base repo's own archive ref uses the checkout credentials, no extra secret.
52+
- name: Stitch archived version pages
53+
uses: ./.github/actions/stitch-fern-versions
54+
with:
55+
archived-versions: |
56+
v0.4=docs-archive
57+
4558
- name: Save PR metadata
4659
env:
4760
PR_NUMBER: ${{ github.event.pull_request.number }}
@@ -57,7 +70,10 @@ jobs:
5770
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5871
with:
5972
name: fern-preview
73+
# Upload the whole docs/ tree: the Fern build (run from docs/fern/)
74+
# resolves nightly page paths via ../../<rel>.mdx into docs/, so the
75+
# content pages must travel with the config.
6076
path: |
61-
fern/
77+
docs/
6278
preview-metadata/
6379
retention-days: 1

.github/workflows/fern-docs-preview-comment.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Workflow 2 of 2 for Fern doc previews.
1717
#
1818
# Triggered by workflow_run after "Preview Fern Docs: Build" completes.
19-
# Downloads the fern/ artifact, builds a preview with DOCS_FERN_TOKEN, and
19+
# Downloads the docs/fern/ artifact, builds a preview with DOCS_FERN_TOKEN, and
2020
# posts a stable :herb: comment on the PR. This workflow never checks out the
2121
# PR branch directly, keeping secrets isolated from untrusted code.
2222
#
@@ -57,17 +57,21 @@ jobs:
5757
with:
5858
node-version: '20'
5959

60-
- name: Install Fern CLI
61-
run: npm install -g fern-api
62-
6360
- name: Generate preview URL
6461
id: generate-docs
6562
env:
6663
FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
6764
HEAD_REF: ${{ steps.metadata.outputs.head_ref }}
68-
working-directory: ./fern
65+
working-directory: ./docs/fern
6966
run: |
70-
OUTPUT=$(fern generate --docs --preview --id "$HEAD_REF" 2>&1)
67+
# Pin the Fern CLI to the version in fern.config.json so CI matches
68+
# local `make docs-check` (and the global-theme-capable 5.29.0+ pin).
69+
fern_version=$(jq -r .version fern.config.json)
70+
# Generate the autodoc library reference (product-docs/, gitignored)
71+
# before the preview build; the version navs mount it via
72+
# `folder: ../product-docs/...` and `generate --docs` fatals without it.
73+
npx -y "fern-api@$fern_version" docs md generate
74+
OUTPUT=$(npx -y "fern-api@$fern_version" generate --docs --preview --id "$HEAD_REF" 2>&1)
7175
echo "$OUTPUT"
7276
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
7377
if [ -z "$URL" ]; then

.github/workflows/publish-fern-docs.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ on:
2929
- main
3030
paths:
3131
- 'docs/**'
32-
- 'fern/**'
3332
tags:
3433
- 'docs/v*'
3534
workflow_dispatch: {}
@@ -48,16 +47,32 @@ jobs:
4847
- name: Checkout repository
4948
uses: actions/checkout@v6
5049

50+
# Backward version trees (frozen GA snapshots) are not kept on main -- only
51+
# the nightly tree (top-level docs/) is. Restore them from their archive ref
52+
# so `fern generate --docs` (a full-site snapshot publish) sees every train.
53+
- name: Stitch archived version pages
54+
uses: ./.github/actions/stitch-fern-versions
55+
with:
56+
archived-versions: |
57+
v0.4=docs-archive
58+
5159
- name: Setup Node.js
5260
uses: actions/setup-node@v6
5361
with:
5462
node-version: '20'
5563

56-
- name: Install Fern CLI
57-
run: npm install -g fern-api
58-
5964
- name: Publish Docs
6065
env:
6166
FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
62-
working-directory: ./fern
63-
run: fern generate --docs
67+
working-directory: ./docs/fern
68+
run: |
69+
# Pin the Fern CLI to the version in fern.config.json so production
70+
# publishes use the same CLI as local dev and the global-theme pin.
71+
fern_version=$(jq -r .version fern.config.json)
72+
# Generate the autodoc library reference (product-docs/, gitignored)
73+
# that the version navs mount via `folder: ../product-docs/...`. The
74+
# `libraries:` input is a git source, so this self-clones -- no repo
75+
# prep needed. Without it, `generate --docs` fatals with "Folder not
76+
# found: ../product-docs/nemo-automodel/Full-Library-Reference".
77+
npx -y "fern-api@$fern_version" docs md generate
78+
npx -y "fern-api@$fern_version" generate --docs

0 commit comments

Comments
 (0)