docs(fern): restore Reference section, label v0.3.0, surface errors#284
Conversation
`docs/reference/node-labels.md` has been on main since PR NVIDIA#254 merged (2026-04-19) but is not listed in `docs/index.yml`, the Fern nav source-of-truth. The last successful Fern publish (2026-04-20T16:52Z) resolved 13 pages — exactly the count declared in the nav without a Reference section — confirming the page is invisible on the live site at https://topograph.docs.buildwithfern.com/topograph despite being on the filesystem. Add a Reference section listing `reference/node-labels.md`. This is the paired-file update that PR NVIDIA#254 should have included. Verified filesystem vs. nav discrepancy: | docs/ file | In index.yml? | |----------------------------------|---------------| | overview.md | yes | | architecture.md + api.md | yes | | providers/{aws,gcp,oci,nebius,...| yes (7) | | engines/{slurm,k8s,slinky}.md | yes (3) | | reference/node-labels.md | NO (fixed) | Signed-off-by: Rob Esker <resker@nvidia.com>
The published Fern site shows a version label of "dev" because `fern/docs.yml` declared the only version as `display-name: dev`. The repo is at tagged release v0.3.0 with no divergence between the released content and the in-flight docs, so "dev" is misleading: readers see "development docs" framing when what they're actually looking at corresponds to the v0.3.0 tag. Rename the version to `v0.3.0`. No content split yet — both versions would point at the same `docs/index.yml` anyway. When content actually diverges (post-v0.4.0 breaking doc changes, or a doc change that only applies to the future release), re-introduce a separate `dev` entry alongside v0.3.0 and repoint paths to differentiated content. Drop the pre-existing `/topograph/dev/index.html` -> `/topograph/dev/` redirect because the `/dev/` destination no longer exists after the rename. Not adding `/dev` -> new-version forwarding: site has only been live since 2026-04-17 (four days), so dev-URL bookmarks are unlikely; the Fern root redirect + sidebar navigation recovers any user who lands on a 404. If dead-bookmark complaints surface later, adding a one-line redirect is trivial. Verified: `fern check` reports 0 errors (1 pre-existing warning about the NVIDIA-green accent-color contrast ratio, unrelated to this PR). `fern docs dev` renders the sidebar with all five sections intact (Getting Started, Architecture, Providers, Engines, Reference) and the version label reads "v0.3.0". Signed-off-by: Rob Esker <resker@nvidia.com>
The publish step used `OUTPUT=$(fern generate --docs 2>&1)` to capture fern's output so the script could grep for the "Published docs to" URL and post it to the GitHub Actions step summary. Side effect: on non-zero exit from `fern generate`, `bash -e` aborted the step BEFORE the subsequent `echo "$OUTPUT"` ran, so fern's error output never reached the Actions log. All three failed publishes between 2026-04-17 and 2026-04-20 (plus the 2026-04-18 manual dispatches) logged only "Process completed with exit code 1" with no diagnostic context. Switch to `fern generate ... 2>&1 | tee /tmp/fern-output.log`. The `tee` streams fern's stdout/stderr to the Actions log in real time (visible in both success and failure cases) and mirrors to a file that the URL-extraction grep reads after. `set -o pipefail` is added so the step still fails on fern's non-zero exit (tee's own exit status would otherwise mask it). The `|| true` on grep ensures a missing URL in fern's output does not fail the step on its own. Net effect: future publish failures are diagnosable from the Actions log directly. No behavior change on the success path. No ability to test the failure path locally without reproducing a deliberate fern error; validated only that the happy-path shell snippet is syntactically valid. Future failures will surface the actual fern error, which is the whole point. Signed-off-by: Rob Esker <resker@nvidia.com>
|
@pdmack — would appreciate your review on this one since it touches |
Greptile SummaryThis PR makes three small, independent fixes to the Fern docs pipeline: restores the missing Reference nav entry for Confidence Score: 5/5Safe to merge — all three changes are low-risk doc/config fixes with clear rationale and no behavioral regression on the success path. No P0 or P1 findings. The workflow change correctly preserves failure behavior via pipefail and tee; the nav and version-label changes are straightforward YAML edits validated with No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[fern generate --docs] -->|stdout plus stderr| B[tee fern-output.log]
B -->|stream| C[Actions log visible on success AND failure]
B -->|write| D[fern-output.log on disk]
A -->|exit code via pipefail| E{Step exit check}
E -->|non-zero| F[Step fails - log already streamed]
E -->|zero| G[grep for Published URL]
D --> G
G -->|found| H[Write URL to GITHUB_STEP_SUMMARY]
G -->|not found via or true| I[Skip summary, step continues]
Reviews (1): Last reviewed commit: "chore(ci): surface fern errors in publis..." | Re-trigger Greptile |
|
@pdmack - please advise |
PR #268 removed the `branches: [main]` push filter from `publish-fern-docs.yml` while keeping the `tags: [docs/v*]` filter. With GitHub Actions, defining `tags:` without a corresponding `branches:` restricts push events to tag refs only — branch pushes (including main) no longer trigger the workflow even when their changed paths match the `paths:` filter. Symptom: the live Fern site at https://topograph.docs.buildwithfern.com/topograph has not been republished since the manual workflow_dispatch on 2026-04-20T16:51Z. PRs #284, #289, #290, #291, and #292 all touched docs/ but produced zero workflow runs. The Reference section restored by #284 (and the clique-semantics clarifications added by #289) are on main but invisible on the published site. Restore `branches: [main]` so push events to main with docs/ or fern/ changes resume triggering publishes. Tag pushes for `docs/v*` and manual `workflow_dispatch` continue to work unchanged. To clear the backlog after this PR merges, dispatch the workflow manually one time: gh workflow run publish-fern-docs.yml --repo NVIDIA/topograph --ref main Signed-off-by: Rob Esker <resker@nvidia.com>
Description
Three related fixes to the Fern docs pipeline, each a small independent concern but cheap to bundle for review.
1. Restore Reference section to Fern nav
docs/reference/node-labels.mdhas been onmainsince #254 merged (2026-04-19) but is not listed indocs/index.yml(the Fern nav source-of-truth). The last successful Fern publish resolved 13 pages — exactly the count the nav declares without a Reference section — confirming the page is invisible on the live site despite being on the filesystem. Add a Reference section listingreference/node-labels.md. This is the paired-file update #254 should have included.2. Label current version as v0.3.0
The published site shows a version label of
devbecausefern/docs.ymldeclared the only version asdisplay-name: dev. The repo is at tagged release v0.3.0 with no divergence between released and in-flight docs, sodevis misleading. Rename tov0.3.0. When content actually diverges later (post-v0.4.0 breaking doc changes, or a doc change that only applies to the future release), re-introduce a separatedeventry alongside v0.3.0 and repoint paths.Also drops the pre-existing
/topograph/dev/index.html→/topograph/dev/redirect since the/dev/destination no longer exists after the rename. Not adding/dev→ new-version forwarding: site has only been live since 2026-04-17 (four days), so dev-URL bookmarks are unlikely; the Fern root redirect + sidebar recover any user who lands on a 404. If dead-bookmark reports surface later, adding a one-line redirect is trivial.3. Surface fern errors in publish workflow
The publish step used
OUTPUT=$(fern generate --docs 2>&1)to capture fern's output for URL-extraction, but on non-zero exitbash -eaborted the step before the subsequentecho "$OUTPUT"ran. Every failed publish between 2026-04-17 and 2026-04-20 (three from PR merges, several manual dispatches) logged only "Process completed with exit code 1" — zero diagnostic context. Switch totee-based streaming so fern's stdout/stderr reaches the Actions log directly on both success and failure paths.set -o pipefailpreserves step-failure behavior;|| trueon grep ensures a missing URL in fern's output does not fail the step on its own.Net effect: future publish failures are diagnosable from the Actions log directly. No behavior change on the success path.
Validation
fern checkpasses (0 errors; 1 pre-existing NVIDIA-green-contrast warning unrelated to this PR)fern docs devrenders the sidebar with all five sections (Getting Started, Architecture, Providers, Engines, Reference)/topograph/reference/node-labels-and-annotationsserves HTTP 200 on the local dev serverv0.3.0in the rendered siteChecklist
fern check+ localfern docs dev; workflow fix is diagnostic plumbing with no behavioral change on the success path.)git commit -s).