Skip to content

chore: audit Markdown components#742

Merged
brendanjryan merged 3 commits into
mainfrom
chore/vocs-markdown-audit
Jul 24, 2026
Merged

chore: audit Markdown components#742
brendanjryan merged 3 commits into
mainfrom
chore/vocs-markdown-audit

Conversation

@brendanjryan

Copy link
Copy Markdown
Contributor

Motivation

Vocs PR #595 adds a Markdown component audit. Keep AI-facing Markdown from gaining new unresolved components.

Summary

Key design considerations

  • Existing unresolved components remain explicitly allowlisted; new names fail CI.
  • Changelog disclosure content is preserved in Markdown output.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tempo-docs Ready Ready Preview, Comment Jul 24, 2026 3:38am

Request Review

@brendanjryan
brendanjryan marked this pull request as ready for review July 23, 2026 22:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d93ee6288b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

])

const command = process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm'
const audit = spawnSync(command, ['exec', 'vocs', 'markdown-audit', '--json'], {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Audit generated OpenAPI Markdown too

This check invokes the preview vocs markdown-audit command, but that command only audits filesystem pages and does not add generated OpenAPI pages; this repo generates API Markdown from the OpenAPI config in vocs.config.ts (/docs/api, https://api.tempo.xyz/openapi.json). When the hosted OpenAPI descriptions include a PascalCase MDX tag, CI still passes here while the later build publishes that unresolved tag in the AI-facing Markdown, so the audit needs to include generated OpenAPI pages or add a separate check for them.

Useful? React with 👍 / 👎.

process.exit(audit.status ?? 1)
}

const unexpected = report.components.filter(({ name }) => !allowedComponents.has(name))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enforce the allowlisted component counts

Because the audit allowlist is checked only by component name, any new unresolved use of an already-allowlisted component still passes CI; for example, adding another <Tabs> or guide-step component to a new MDX page increases the surviving AI-facing tags reported by vocs markdown-audit, but unexpected remains empty. To actually prevent new unresolved Markdown components while grandfathering existing debt, record the expected pages/counts instead of allowing every future occurrence of the same names.

Useful? React with 👍 / 👎.

Comment thread package.json
"unplugin-icons": "^23.0.1",
"viem": "^2.54.6",
"vocs": "^2.6.0",
"vocs": "https://pkg.pr.new/wevm/vocs/vocs@595",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pin Vocs to a released package

This makes every clean install pull the production docs framework from the PR-preview registry for Vocs PR #595 instead of a released npm version. In CI and Vercel deploys, pnpm install --frozen-lockfile now depends on that preview artifact continuing to exist and remain byte-for-byte identical; if the preview is pruned or republished, installs fail or the lockfile integrity no longer matches. Once the audit command is available upstream, switch this back to a normal released vocs version before merging to main.

Useful? React with 👍 / 👎.

@brendanjryan
brendanjryan merged commit 3bd3a80 into main Jul 24, 2026
11 checks passed
@brendanjryan
brendanjryan deleted the chore/vocs-markdown-audit branch July 24, 2026 03:42
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.

1 participant