Skip to content

Commit 4bb4dca

Browse files
dfinsterclaudewandb-docs-pr-writer[bot]
authored
feat: migrate knowledgebase nav to the docengine subsystem (#2795)
> **Draft — depends on coreweave/docengine#183.** Do not merge until #183 is merged and this repo's `docengine` submodule is bumped to include it (Dependabot bump). The workflow calls `docengine knowledgebase apply`, which only exists once the pinned submodule contains #183. ## Summary Replaces the bundled `scripts/knowledgebase-nav/` toolchain with the DocEngine `knowledgebase` subsystem. The Python that was byte-for-byte duplicated with `coreweave/docs` now lives once in the engine and reaches hosts via Dependabot. ## Changes - **`docengine-site/knowledgebase.yaml`** — the old `config.yaml` minus `mintlify_root` (the support root is resolved from `docengine.yaml` `output_subpath` = `.`). Products and allowed keywords are unchanged. - **`docengine-site/templates/`** — the two MDX templates moved here. W&B keeps its own product-index template variant (`title: "Support: …"`, no `sidebarTitle`); templates are per-host. - **Removed `scripts/knowledgebase-nav/`** — script, report, tests, README, `Architecture.md`, `requirements.txt`. The engine owns the logic and tests now. - **`.github/workflows/knowledgebase-nav.yml`** — slimmed to: authenticate + init the `docengine` submodule (`DOCENGINE_TOKEN`), `pip install -e ./docengine`, `docengine knowledgebase apply --report-file …`, upsert the PR comment (same `<!-- knowledgebase-nav-report -->` marker), and commit the support output back with the `wandb-docs-pr-writer` App token. The engine reports its exact changed files, so the old `git add --dry-run` candidate loop is gone. ## Behavior change (forks) Generation now needs the **private** `coreweave/docengine` submodule, which fork PRs cannot clone. The job runs for **same-repo PRs and manual dispatch only**; fork PRs are regenerated by a maintainer after merge (the former bundled script could generate but never push on forks). Workflow/job names are unchanged so any required-check names still match. ## Verification The engine change (#183) was proven behavior-preserving by a differential against this repo's real `scripts/knowledgebase-nav/generate_tags.py` over the live `support/` tree (this is the `output_subpath: "."` case): the generated trees are byte-identical except the intended `template:` provenance line (`scripts/knowledgebase-nav/templates/…` → `docengine-site/templates/…`); `support.mdx` and all article footers are byte-identical. Report markdown is byte-identical to the legacy `pr_report.py`. ## Merge order 1. Merge coreweave/docengine#183. 2. Bump this repo's `docengine` submodule to include it (Dependabot). 3. Mark this PR ready and merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: wandb-docs-pr-writer[bot] <wandb-docs-pr-writer[bot]@users.noreply.github.com>
1 parent 8b79de1 commit 4bb4dca

66 files changed

Lines changed: 168 additions & 6881 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/knowledgebase-nav.yml

Lines changed: 105 additions & 182 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
# ---------------------------------------------------------------------------
2-
# Knowledgebase Nav Configuration
2+
# Knowledgebase navigation configuration
33
# ---------------------------------------------------------------------------
4-
# This file defines the products and allowed keywords (tags) for the
5-
# knowledgebase nav generator. The generator reads this file to know which
6-
# products to crawl and which keywords are valid for each product.
4+
# Consumed by the DocEngine `knowledgebase` subsystem (`docengine knowledgebase
5+
# apply`). It defines the products and allowed keywords (tags) the subsystem
6+
# crawls under <output_subpath>/support/<slug>/articles/.
7+
#
8+
# There is no `mintlify_root` key: the support root is resolved from
9+
# docengine.yaml `output_subpath` (here, the repo root ".").
710
#
811
# To add a new product:
9-
# 1. Add a new entry under "products:" with slug, display_name, and
10-
# allowed_keywords.
11-
# 2. Create the directory support/<slug>/articles/ in the repo.
12+
# 1. Add an entry under "products:" with slug, display_name, allowed_keywords.
13+
# 2. Create support/<slug>/articles/ under the output_subpath.
1214
# 3. Add at least one article with keywords from the allowed list.
1315
#
14-
# To add a new keyword to an existing product:
15-
# 1. Add the keyword string to that product's allowed_keywords list,
16-
# in alphabetical order.
17-
# 2. Use the exact same string (case-sensitive) in article front matter.
18-
#
19-
# If an article uses a keyword not listed here, the generator still creates
20-
# the tag page but prints a warning. Resolve the warning by adding the
21-
# keyword to this file.
16+
# If an article uses a keyword not listed here, the subsystem still creates the
17+
# tag page but warns. Resolve the warning by adding the keyword here.
2218
# ---------------------------------------------------------------------------
2319

24-
# Project-specific settings
25-
# -------------------------
26-
# mintlify_root: Path from the GitHub repository root to the Mintlify root
27-
# (the directory containing support/ and support.mdx). Use "." when the
28-
# Mintlify root is the GitHub repo root, or a subdirectory name (for
29-
# example "public-docs") when the docs live in a subfolder.
3020
# badge_color: Mintlify <Badge> color used for tab and featured Badges.
31-
mintlify_root: "."
3221
badge_color: "orange"
3322

3423
products:

scripts/knowledgebase-nav/templates/support_product_index.mdx.j2 renamed to docengine-site/templates/support_product_index.mdx.j2

File renamed without changes.
File renamed without changes.

scripts/knowledgebase-nav/Architecture.md

Lines changed: 0 additions & 197 deletions
This file was deleted.

0 commit comments

Comments
 (0)