CI: auto-commit chatbot product map on docs-only drift#1352
Conversation
When validate regenerates chatbot-product-map.md from .qmd changes on same-repo PRs, commit and push the file instead of failing. Snapshot drift and fork PRs still require a local refresh.
Lighthouse check results✓ INFO: No site pages to audit in this PR. Commit SHA: eaa3cb7 |
PR SummaryThis PR improves the documentation validation workflow by enhancing the automation related to the chatbot product map generation. The main changes include:
These changes aim to streamline the CI process around documentation validation and ensure that the in-app chatbot assistant always has up-to-date mapping data. Test Suggestions
|
Validate docs site✓ INFO: A live preview of the docs site is available — Open the preview |
Lighthouse check results✓ INFO: No site pages to audit in this PR. Commit SHA: b63dd89 |
Pull Request Description
What and why?
This PR improves how the chatbot product map gets committed, removing the need for authors to manually do the commit after regeneration.
The problem
When you change documentation (for example FAQ wording or headings), CI rebuilds the
site/llm/chatbot-product-map.mdfile that the in-app assistant uses. This file maps product screens to docs and pulls section titles from our.qmdfiles.If you updated the docs but did not regenerate and commit that map, CI failed, even when the only difference was your doc edits. Contributors had to know to run
make generate-chatbot-product-mapand commit the result, which was easy to miss (cf. my Slack convo with Beck).Solution
CI still regenerates the map to check it is current. On pull requests from branches in this repo, if only
chatbot-product-map.mdis out of date, the workflow now commits and pushes the refreshed file for you.You still need to fix things locally when:
make refresh-chatbot-product-mapwith a local frontend checkout).README and
site/llm/README.mddescribe when to regenerate locally vs when to let CI handle it.Shortcut: https://app.shortcut.com/validmind/story/16405
How to test
Tested on this PR (end-to-end):
site/faq/faq-workflows.qmd(specific model→specific record (model)) without updatingchatbot-product-map.md, then pushed.site/llm/chatbot-product-map.md(chore: refresh chatbot product map, commit3747ed2b3).specific modeland pushed again.a2792941d). FAQ and map text matched after the run.Reviewer smoke test:
.qmdheading without refreshingchatbot-product-map.mdon a same-repo PR — validate should auto-commit the map and pass (may take ~20 minutes for the full job).refresh-chatbot-product-mapmessage (not exercised on this PR).python3 site/scripts/generate_chatbot_product_map.pyandpython3 -m unittest discover -s site/scripts -p 'test_generate_chatbot_product_map.py' -v(both pass).What needs special review?
Dependencies, breaking changes, and deployment notes
No breaking changes. CI-only; no deployment steps beyond the existing validate workflow.
Release notes
internal— no user-facing release notes.Checklist