docs(validation): harden docs validation pipeline after Docusaurus migration (#1174)
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- bash, github-actions, python
- 领域
- ci-cd, documentation, tooling
调研方向
This is a multi-part tracker, so pick one item rather than the whole list. Start in tooling/docs-autogen/validate.py, at validate_anchor_collisions (which imports mintlify_anchor from test_mintlify_anchors.py) and validate_rst_docstrings, and check how overall_passed is computed. The docs-publish.yml workflow holds the continue-on-error flags. Maintainers have not chosen between the options in item 1, so confirm the direction in the thread before writing code.
由索引模型根据 Issue 内容生成。
描述
Context
PR #1174 (Docusaurus migration) is a good opportunity to audit the validation pipeline and close several gaps that exist across tiers — editor/pre-commit/CI scripts/Docusaurus build. This issue tracks follow-on hardening work once #1174 merges.
1. Fix validate_anchor_collisions algorithm (correctness bug)
validate_anchor_collisions in tooling/docs-autogen/validate.py currently imports mintlify_anchor from test_mintlify_anchors.py to generate anchor slugs for collision detection. After the Docusaurus migration this is the wrong algorithm — Docusaurus uses a different slug function — so the check will produce false positives and misses.
Since onBrokenAnchors: 'throw' in docusaurus.config.ts already catches real collisions at build time with the correct algorithm, the validate.py check is now both redundant and incorrect. Options:
- Update the slug function to match Docusaurus's algorithm, or
- Retire the check entirely in favour of the build gate
2. Extend RST docstring detection and promote to a hard fail
validate_rst_docstrings() currently only detects RST double-backtick notation (``Symbol``) and is warning-only (explicitly excluded from overall_passed). It misses the :param:, :type:, :returns:, :rtype:, .. note::, and .. deprecated:: constructs that are the more common RST style patterns in practice.
Two changes needed:
- Extend the detection patterns to cover the full set of RST constructs
- Promote the check to a hard fail by including it in
overall_passed
Additionally, add a pre-commit grep hook on mellea/**/*.py so contributors get fast local feedback before CI:
- id: no-rst-docstrings
name: "No RST-style docstrings"
entry: bash -c 'grep -rn ":param \|:type \|:returns:\|:rtype:\|^\s*\.\. note::\|^\s*\.\. deprecated::" "$@" && echo "RST docstring syntax found — use Google style (Args:/Returns:)" && exit 1 || exit 0'
language: system
types: [python]
files: ^mellea/
Note: ruff's D rules with convention = "google" enforce section structure (presence/absence of Args:, Returns:) but do not and cannot detect RST content markup — so this genuinely needs a separate check at every tier.
3. Harden CI soft gates in docs-publish.yml
All validate.py steps except the docstring quality gate use continue-on-error: true, meaning failures appear in the job summary but do not block deploy. With the Mintlify orphan-branch deployment complexity removed by #1174, there is less justification for soft gates.
Steps to harden (remove continue-on-error: true):
validate_api— source link staleness, import path drift, stale files, and examples catalogue errors all currently reach production silentlyaudit_coverage— below-threshold API coverage currently does not block deploy
markdownlint could also be hardened; this is lower priority since the Docusaurus build would still succeed even with markdown style issues.
4. Extend markdownlint to .mdx files
The markdownlint gate currently covers only docs/docs/**/*.md. Authored .mdx pages and the generated API docs (all .mdx) receive no markdown linting at any tier below the Docusaurus build compile step.
Pre-commit hook should include .mdx:
files: ^docs/docs/.*\.(md|mdx)$
CI should similarly update the glob:
npx markdownlint-cli "docs/docs/**/*.{md,mdx}" --config docs/docs/.markdownlint.json
Note: some markdownlint rules may need adjusting for .mdx (JSX syntax in inline components). The existing .markdownlint.json already disables MD033 (HTML) which covers most JSX cases.
6. External link rot detection
Neither onBrokenLinks: 'throw' nor any validate.py check covers external URLs. Dead external links are invisible until users report them.
Add a scheduled workflow (weekly) using a link checker (e.g. lychee) against the built site or the source .md/.mdx files, with results posted as a summary or issue. This is lower priority than items 1–4 and worth a separate implementation discussion.
Sequencing
Items 1–4 are all low-effort and could ship as a single follow-on PR after #1174 merges. Item 6 warrants its own scoped issue once the others are addressed.
- 主要语言
- Python
- 星标
- 1.8k
- 派生
- 161
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 45
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
generative-computing/mellea 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
generative-computing/mellea#1864 ·
维护者通常 3 天内回复
-
bug: instruct() and react() replay tool-call turns without tool_calls可能已有人在做 @simonyang08 于 21 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 85/100
generative-computing/mellea#1784 · 1 条评论 ·
维护者通常 3 天内回复
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examples可能已有人在做 @madhusudhan1260 于 18 天前认领。 未关闭good first issue p2
难度 2/5 1-3 小时 新手友好度 82/100
generative-computing/mellea#1780 · 2 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
area/telemetry enhancement p2
难度 2/5 1-3 小时 新手友好度 66/100
generative-computing/mellea#1210 ·
维护者通常 3 天内回复
-
area/requirement area/stdlib enhancement p2
难度 2/5 1-3 小时 新手友好度 62/100
generative-computing/mellea#31 · 2 条评论 ·
维护者通常 3 天内回复
查看 generative-computing/mellea 的全部 Issue
相似的 Issue
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shards未关闭status/accepted type/bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
bug vector-store
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
EverMind-AI/Raven#1413 ·
维护者通常 1 天内回复
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS pools可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
维护者通常 2 天内回复