Knowledge Base — DOCX/Google Drive Pipeline Retirement (2026-06)
TL;DR
The knowledge-base repo used to convert every markdown doc to DOCX and upload
it to Google Drive, driven by a husky pre-commit hook. That entire pipeline was
retired in June 2026 (knowledge-base PRs #246, #247). Markdown in src/ is
the single source of truth — the Relay Slack bot reads it directly via a
Bedrock Knowledge Base, and nobody consumed the Drive copies anymore.
If you find references to husky, pandoc, dist/docs, DOCX conversion, or
Google Drive upload in this repo’s docs or tooling, they are stale — fix them.
What the old pipeline was
Three overlapping mechanisms, all producing/uploading DOCX:
- husky pre-commit hook (
.husky/pre-commit) — on every local commit: generated PlantUML SVGs against a local Docker server atlocalhost:8080, converted staged markdown to DOCX with pandoc intodist/docs/, then rangit addon the entire repo root. build-docs.yml— on push tomain: regenerated all diagrams, converted all markdown to DOCX, uploaded DOCX to Google Drive, committed SVGs + a tracking CSV back.upload-docs-to-drive.yml— on pushes touchingdist/docs/**: re-uploaded DOCX to Drive and committed the tracking CSV back.
Why it was retired
- The consumer disappeared. The Drive DOCX copies existed for humans/an
older bot. The Relay Slack bot reads markdown directly:
.github/workflows/sync-to-bedrock-kb.ymlsyncssrc/**/*.mdto S3 (relay-kb-docs-prod-512438352490) and triggers Bedrock KB ingestion. DOCX was dead weight. - The hook made committing painful and unsafe. It required Docker +
PlantUML server + pandoc locally; when the server wasn’t running,
curl -swrote error output into the.svgfiles; and the finalgit add <repo root>staged unrelated/untracked files, making partial commits impossible. - Repo bloat. 903 generated
.docxbinaries (566 MB of working tree) were committed to git. - Race conditions. Both workflows committed the tracking CSV back to
mainindependently, causing recurring push conflicts.
What replaced it
| Concern | Now handled by |
|---|---|
| Slack bot document source | sync-to-bedrock-kb.yml (markdown → S3 → Bedrock KB ingestion) |
| PlantUML SVG generation | generate-diagrams.yml on push to main (CI commits SVGs back) |
| Markdown quality | pr-checks.yml on PRs — markdownlint + offline link check (blocking), SUMMARY.md / missing-H1 guards (warnings) |
| Local diagram preview (optional) | bin/run_plantuml_server_docker.sh — see bin/README.md |
Contributing now requires no local tooling: edit markdown, open a PR.
Deliberate decisions (don’t undo these casually)
- No git history rewrite. The old DOCX packs (~1 GB) remain in history; rewriting would invalidate every clone for marginal benefit. The bloat simply stops growing.
- External URLs are not link-checked in PRs. Only internal/relative links
are verified (
lychee --offline) — external checks make PRs flaky. - Lint rules are minimal on purpose. Several
src/directories are mirrored verbatim from other repos by thesync-*-docs.ymlworkflows; stylistic lint would fail PRs over content people didn’t write.
Cleanup checklist after PR #246
-
Delete repo secrets
GOOGLE_DRIVE_CREDENTIALSandGOOGLE_DRIVE_FOLDER_ID(Settings → Secrets — needs admin). Done 2026-07-01 — both secrets already absent fromgh secret list(current secrets:CLOUDFLARE_VENDOR_HUB_DEPLOY_HOOK_*,PAT_TOKEN,SLACK_WEBHOOK_DOCS_ALERTS). -
Existing clones:
git config --unset core.hooksPath(husky set it locally; harmless if left — the hooks no longer exist). Done 2026-07-01 — but the doc’s “harmless if left” line was wrong:.husky/_/still held 4 git-lfs hooks (post-checkout,post-commit,post-merge,pre-push). Naive unset would have broken LFS for the repo’s.mp4/.mov/.webmfiles. Proper migration:```bash git lfs install --local # writes LFS hooks into .git/hooks/ git config --unset core.hooksPath ``` After this, `core.hooksPath` is empty and LFS hooks run from the canonical `.git/hooks/` location. Per-clone housekeeping — each engineer's local clone runs this once. -
The Google Drive folder itself (
https://drive.google.com/drive/u/0/folders/0APjft64d1c58Uk9PVA) — deleted 2026-07-01 per team confirmation. Cleanup checklist complete.
Stale references fixed (2026-07-01)
The doc warned: “If you find references to husky, pandoc, dist/docs, DOCX
conversion, or Google Drive upload in this repo’s docs or tooling, they are
stale — fix them.” PR #246 cleaned the workflows and .husky/pre-commit but
missed these survivors. Removed in this commit:
.devcontainer/setup.sh— dropped the pandoc download/install block, thepandoc --versionverify line, and the post-setup banner lines advertisingconvert_md_to_docx.sh/convert_docs_precommit.sh..devcontainer/README.md:- Removed “Husky for Git hooks” and the dedicated Pandoc feature line from the “What’s Included” list.
- Dropped “Install Pandoc” and “Install Git hooks for automatic conversions” from the setup-script behaviour list.
- Rewrote the PlantUML section: SVG generation is CI-driven
(
generate-diagrams.ymlon push tomain); the local PlantUML server is for optional preview only. - Deleted the entire “Document Conversion” section (auto + manual
pandoc/
.docxinstructions,dist/docs/outputs, references to the since-removedbin/convert_*.shscripts). - Removed the
.husky/and stalebin/convert_*.shentries from the file-structure tree, and thedist/docs/line. - Removed the “Document conversion not working” troubleshooting block (pandoc install hint, pre-commit hook claim).
The devcontainer itself stays — devcontainer.json (Rust + mdBook +
PlantUML server + node + git-lfs + dind) is still the supported local
preview workflow per bin/README.md.
References
- knowledge-base PR #246 — pipeline removal
- knowledge-base PR #247 — PR quality checks
- Relay Bot — Architecture and Operations