From 1acdfe5a35a51ddba28e67470f9d49cdafad063d Mon Sep 17 00:00:00 2001 From: Delicious233 <101502465+DeliciousBuding@users.noreply.github.com> Date: Mon, 17 Aug 2026 20:17:22 +0800 Subject: [PATCH] =?UTF-8?q?ci(docs):=20=E6=89=A9=E5=B1=95=20doc-ssot=20?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E9=97=A8=E7=A6=81=E4=B8=8E=E5=86=85=E9=83=A8?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - check_max_lines:补齐 docs/architecture/*.md 全部子文档行数上限(01-09 + github-actions-ci-cd-policy + README),堵住未来巨石文档漂移 - check_doc_internal_links:除 4 个 docs/ 子目录外,遍历全部 is_active_doc() 文件,覆盖根级 README/CONTRIBUTING/AGENTS 与模块 README 的 markdown 链接目标存在性 Co-authored-by: Cursor --- scripts/verify/verify-doc-ssot.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/verify/verify-doc-ssot.py b/scripts/verify/verify-doc-ssot.py index 594584c8b..c643883a5 100644 --- a/scripts/verify/verify-doc-ssot.py +++ b/scripts/verify/verify-doc-ssot.py @@ -259,7 +259,17 @@ def check_max_lines() -> None: "docs/decisions.md": 80, "docs/developer-quickstart.md": 170, "docs/architecture.md": 170, + "docs/architecture/01-hub-server.md": 200, + "docs/architecture/02-edge-server.md": 200, + "docs/architecture/03-runtime-adapters.md": 200, "docs/architecture/04-frontend-data-flow.md": 150, + "docs/architecture/05-deployment.md": 200, + "docs/architecture/06-auth-identity.md": 200, + "docs/architecture/07-design-system-ssot.md": 150, + "docs/architecture/08-outbound-http.md": 150, + "docs/architecture/09-dev-server-topology.md": 80, + "docs/architecture/github-actions-ci-cd-policy.md": 120, + "docs/architecture/README.md": 40, "docs/api-reference.md": 80, "docs/reference/README.md": 80, "docs/reference/sdk-agent-strategy.md": 120, @@ -434,6 +444,12 @@ def check_doc_internal_links() -> None: for name in sorted(os.listdir(d_abs)): if name.endswith(".md"): active_files.append(os.path.join(d, name)) + # Also cover root-level and module README files that is_active_doc() tracks, + # so broken links in README.md / CONTRIBUTING.md / AGENTS.md markdown links + # are caught (previously only the 4 docs/ subdirectories were scanned). + for f in git_ls_files(): + if is_active_doc(f) and exists(f) and f not in active_files: + active_files.append(f) link_re = re.compile(r"\[[^\]]+\]\(([^)]+)\)") for doc_rel in active_files: text = read_text(doc_rel)