Skip to content

chore(docs): add governance pilot fixtures to exercise lint rules#3576

Closed
morningman wants to merge 1 commit intoapache:masterfrom
morningman:opt_v20260424-4
Closed

chore(docs): add governance pilot fixtures to exercise lint rules#3576
morningman wants to merge 1 commit intoapache:masterfrom
morningman:opt_v20260424-4

Conversation

@morningman
Copy link
Copy Markdown
Contributor

Fixture PR to verify each docs governance check family end-to-end: front matter, markdown structure, sidebar orphan, link gate, SEO/GEO, SQL function doc quality, feature doc quality, and i18n/version sync.

Locally triggers 31 distinct rules, including the blocking changed-only internal link gate (link-missing-target and link-missing-anchor). Fixtures live under docs/_governance-pilot/ plus one SQL function fixture under docs/sql-manual/sql-functions/... A single-line fixture edit is added to an existing zh-CN FAQ to exercise i18n-sync-source-counterpart; that line is a marked HTML comment.

Not intended to merge as-is; the author will review before pushing.

@morningman
Copy link
Copy Markdown
Contributor Author

/review

@morningman
Copy link
Copy Markdown
Contributor Author

/review-docs

@morningman
Copy link
Copy Markdown
Contributor Author

/review-docs

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Docs AI Review

Changed-file docs review results for this PR.

Summary

  • Trigger: /review-docs
  • Changed files reviewed: 11
  • Findings: 82 (3 error, 58 warning, 21 info)
  • High-risk docs path matched: true
  • Review agents in packet: 5
  • Sync groups in packet: 11
  • Base SHA: d33f93bfcf07
  • Head SHA: 7a860861a34e

Findings to fix

  1. ERROR docs/_governance-pilot/links-broken.md:10 - link-missing-target
    • Problem: Internal link target does not exist: ./does-not-exist.md.
    • Fix: Fix the target path, heading anchor, inbound reference, or redirect so readers do not hit broken navigation.
    • Owner: @apache/doris-website-maintainers
  2. ERROR docs/_governance-pilot/links-broken.md:15 - link-missing-anchor
    • Problem: Anchor #this-anchor-does-not-exist does not exist in docs/gettingStarted/what-is-apache-doris.md.
    • Fix: Fix the target path, heading anchor, inbound reference, or redirect so readers do not hit broken navigation.
    • Related: docs/gettingStarted/what-is-apache-doris.md
    • Owner: @apache/doris-website-maintainers
  3. ERROR docs/_governance-pilot/links-broken.md:20 - link-missing-target
    • Problem: Internal link target does not exist: /docs/this-route-does-not-exist.
    • Fix: Fix the target path, heading anchor, inbound reference, or redirect so readers do not hit broken navigation.
    • Owner: @apache/doris-website-maintainers
  4. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Overview section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  5. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Quick Start section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  6. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Parameters/Options section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  7. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Examples section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  8. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Error handling section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  9. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - feature-doc-section-required
    • Problem: Feature docs should include a Best practices section.
    • Fix: Complete the feature page with overview, basic usage, options, realistic examples, caveats, and best practices where applicable.
    • Owner: @apache/doris-website-maintainers
  10. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - i18n-sync-version-missing
  • Problem: English current and 4.x docs are strongly synchronized, but the 4.x counterpart is missing. Add it or explain the version-specific exception in the PR description.
  • Fix: Update the current, versioned, and localized counterpart pages consistently, or document why this change is intentionally asymmetric.
  • Related: versioned_docs/version-4.x/_governance-pilot/feature-doc-bad.md
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/feature-doc-bad.md:1 - sidebar-orphan-doc
  • Problem: Document _governance-pilot/feature-doc-bad is not referenced by sidebars.ts.
  • Fix: Update the sidebar/navigation entry so it matches the actual document path and intended information architecture.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - frontmatter-description-required
  • Problem: Missing required front matter field: description.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - frontmatter-title-required
  • Problem: Missing required front matter field: title.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - i18n-sync-version-missing
  • Problem: English current and 4.x docs are strongly synchronized, but the 4.x counterpart is missing. Add it or explain the version-specific exception in the PR description.
  • Fix: Update the current, versioned, and localized counterpart pages consistently, or document why this change is intentionally asymmetric.
  • Related: versioned_docs/version-4.x/_governance-pilot/frontmatter-missing.md
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - seo-description-required
  • Problem: SEO description is required.
  • Fix: Improve the SEO/GEO metadata or search policy so users and AI answer engines get clear page context.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - seo-title-brand
  • Problem: Rendered page title should retain the Apache Doris brand.
  • Fix: Improve the SEO/GEO metadata or search policy so users and AI answer engines get clear page context.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-missing.md:1 - sidebar-orphan-doc
  • Problem: Document _governance-pilot/frontmatter-missing is not referenced by sidebars.ts.
  • Fix: Update the sidebar/navigation entry so it matches the actual document path and intended information architecture.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - frontmatter-keywords-type
  • Problem: Front matter field keywords must be a string or array.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - frontmatter-sidebar-position-type
  • Problem: Front matter field sidebar_position must be a number.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - frontmatter-slug-type
  • Problem: Front matter field slug must be a string.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - frontmatter-tags-type
  • Problem: Front matter field tags must be an array.
  • Fix: Correct the Docusaurus front matter metadata so the page renders, routes, and appears in search correctly.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - i18n-sync-version-missing
  • Problem: English current and 4.x docs are strongly synchronized, but the 4.x counterpart is missing. Add it or explain the version-specific exception in the PR description.
  • Fix: Update the current, versioned, and localized counterpart pages consistently, or document why this change is intentionally asymmetric.
  • Related: versioned_docs/version-4.x/_governance-pilot/frontmatter-type-errors.md
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/frontmatter-type-errors.md:1 - sidebar-orphan-doc
  • Problem: Document _governance-pilot/frontmatter-type-errors is not referenced by sidebars.ts.
  • Fix: Update the sidebar/navigation entry so it matches the actual document path and intended information architecture.
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/i18n-sync-only-en.md:1 - i18n-sync-version-missing
  • Problem: English current and 4.x docs are strongly synchronized, but the 4.x counterpart is missing. Add it or explain the version-specific exception in the PR description.
  • Fix: Update the current, versioned, and localized counterpart pages consistently, or document why this change is intentionally asymmetric.
  • Related: versioned_docs/version-4.x/_governance-pilot/i18n-sync-only-en.md
  • Owner: @apache/doris-website-maintainers
  1. WARNING docs/_governance-pilot/i18n-sync-only-en.md:1 - sidebar-orphan-doc
  • Problem: Document _governance-pilot/i18n-sync-only-en is not referenced by sidebars.ts.
  • Fix: Update the sidebar/navigation entry so it matches the actual document path and intended information architecture.
  • Owner: @apache/doris-website-maintainers

57 additional findings are not shown. Check the docs governance job output for the full list.

High-risk scope

  • docs/sql-manual/sql-functions/scalar-functions/string-functions/doris-governance-fixture-bad.md (docs/sql-manual/)
  • i18n/zh-CN/docusaurus-plugin-content-docs/current/faq/bi-faq.md (i18n/)

Sync groups to verify

  • main_docs:_governance-pilot/feature-doc-bad
  • main_docs:_governance-pilot/frontmatter-missing
  • main_docs:_governance-pilot/frontmatter-type-errors
  • main_docs:_governance-pilot/i18n-sync-only-en
  • main_docs:_governance-pilot/links-broken
  • main_docs:_governance-pilot/markdown-structure-bad
  • main_docs:_governance-pilot/seo-bad-a
  • main_docs:_governance-pilot/seo-bad-b
  • main_docs:_governance-pilot/sidebar-orphan
  • main_docs:sql-manual/sql-functions/scalar-functions/string-functions/doris-governance-fixture-bad
  • ... 1 more

Next steps

  • Fix the findings above, especially errors and warnings.
  • Confirm current, active versioned, and localized docs stay aligned when the same topic is changed.
  • Re-run /review-docs after updating the PR.

AI review output is advisory. Deterministic governance CI remains the blocking signal.

Fixture PR to verify each docs governance check family end-to-end:
front matter, markdown structure, sidebar orphan, link gate, SEO/GEO,
SQL function doc quality, feature doc quality, and i18n/version sync.

Locally triggers 31 distinct rules, including the blocking
changed-only internal link gate (link-missing-target and
link-missing-anchor). Fixtures live under docs/_governance-pilot/ plus
one SQL function fixture under docs/sql-manual/sql-functions/... A
single-line fixture edit is added to an existing zh-CN FAQ to exercise
i18n-sync-source-counterpart; that line is a marked HTML comment.

Not intended to merge as-is; the author will review before pushing.

fix(ci): post docs AI review comment via REST to avoid GraphQL permission

The first-time comment path used gh pr comment, which internally
issues the GraphQL addComment mutation and requires
pull-requests: write. The job only grants pull-requests: read (plus
issues: write for the existing update path), so the first comment
failed with "Resource not accessible by integration (addComment)".
Replace gh pr comment with gh api POST against the issues/{number}/comments
REST endpoint, which accepts the issues: write scope the job already
grants, and mirrors the PATCH path used when a previous comment exists.

fix(ci): split Docs AI Review comment into workflow_run workflow

Pull requests from forks run pull_request workflows with a read-only
GITHUB_TOKEN regardless of declared permissions, so the inline comment
step could never post on fork PRs and returned 403 on both GraphQL
and REST comment endpoints. Split the flow following the GitHub
workflow_run pattern:

- docs-ai-review.yml (pull_request trigger) now only prepares the
  packet and uploads it as an artifact, together with a pr-metadata
  JSON describing the PR number, head SHA, base SHA and trigger name.
  It no longer tries to comment.
- docs-ai-review-comment.yml (workflow_run trigger on the first
  workflow) downloads the artifact from the completed run, parses the
  metadata, and upserts the advisory comment via REST. Because
  workflow_run runs in the base-repo context, its GITHUB_TOKEN honors
  the declared issues: write permission even for fork-originated PRs.

The comment workflow does not check out or execute any code from the
fork. It only consumes the prebuilt packet and metadata JSON, which
avoids the security footgun usually associated with giving write
permissions to fork-triggered runs.
@morningman
Copy link
Copy Markdown
Contributor Author

/review-docs

@morningman morningman closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant