Skip to content

fix(ci): extend MDX img check to fern/ and .mdx files#283

Merged
dmitsh merged 1 commit into
NVIDIA:mainfrom
pdmack:fix/mdx-img-self-closing
Apr 20, 2026
Merged

fix(ci): extend MDX img check to fern/ and .mdx files#283
dmitsh merged 1 commit into
NVIDIA:mainfrom
pdmack:fix/mdx-img-self-closing

Conversation

@pdmack

@pdmack pdmack commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Description

Extends the Check MDX safety grep step added in #282 to also cover fern/ and *.mdx files, not just docs/*.md. Adds comments explaining the intentionally inline and single-line design choices.

Matches the pattern settled on in NVIDIA/NVSentinel#1215 and NVIDIA/aicr#620.

Fixes #281

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • All commits are signed off per DCO (git commit -s).

@pdmack pdmack requested a review from dmitsh as a code owner April 20, 2026 19:22
@copy-pr-bot

copy-pr-bot Bot commented Apr 20, 2026

Copy link
Copy Markdown

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.

Extend the grep to cover fern/ and *.mdx in addition to docs/*.md.
Add comments explaining the inline and single-line choices.

Matches the pattern settled on in NVIDIA/NVSentinel#1215 and NVIDIA/aicr#620.

Signed-off-by: Pete MacKinnon <[email protected]>
@pdmack pdmack force-pushed the fix/mdx-img-self-closing branch from 54c9986 to 77bf17c Compare April 20, 2026 19:24
@greptile-apps

greptile-apps Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends the Check MDX safety CI step (introduced in #282) to also scan the fern/ directory and *.mdx files for non-self-closing <img> tags, alongside the existing docs/*.md coverage. It also adds inline comments explaining the intentional design choices (single-step, single-line grep).

Confidence Score: 5/5

Safe to merge — a minimal, focused CI improvement with no production impact.

The only finding is a P2 style suggestion about || true masking grep errors, which does not affect correctness in practice since fern/ is always present in the repo. All logic (regex, --include flags, directory arguments) is correct.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/fern-docs-ci.yml Extends the MDX img-tag safety check to cover fern/ directory and *.mdx files; adds explanatory comments. Regex and grep flags are correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[fern-docs-ci workflow triggered] --> B[Checkout repository]
    B --> C[Check markdown filename conventions\ndocs/ lowercase+hyphens]
    C --> D[Setup Node.js]
    D --> E[Install Fern CLI]
    E --> F{Check MDX safety\ngrep non-self-closing img tags}
    F -->|Found in docs/*.md fern/*.md fern/*.mdx docs/*.mdx| G[Fail: print error exit 1]
    F -->|None found| H[Fern check]
    H --> I[Check links lychee offline]
    I --> J[CI passes]
Loading

Comments Outside Diff (1)

  1. .github/workflows/fern-docs-ci.yml, line 54 (link)

    P2 || true suppresses grep errors silently

    grep exits with code 2 on errors (e.g., a missing directory or a bad pattern), and || true converts that into a silent pass. If fern/ were absent or unreadable, the step would produce no output and $BAD would be empty, letting a broken invocation appear to succeed. Since fern/ is part of the repo it's unlikely in practice, but consider using || [ $? -eq 1 ] to allow only "no matches" (exit 1) without masking real errors (exit 2+).

Reviews (1): Last reviewed commit: "fix(ci): extend MDX img check to fern/ a..." | Re-trigger Greptile

@dmitsh

dmitsh commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator

/ok-to-test 77bf17c

@dmitsh dmitsh merged commit 4594df4 into NVIDIA:main Apr 20, 2026
2 of 5 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

Development

Successfully merging this pull request may close these issues.

[BUG]: non-self-closing <img> tags in docs cause MDX parse errors

2 participants