Repository navigation
fix(docs): run docs:validate under the engine's Python - #2384
Conversation
- `docs:validate` ran its two schema validators with a bare `python3`. On Windows this is usually the Microsoft Store stub, so the task failed with exit 9009 even when the engine was built. - Pick one interpreter for all three phases: the engine in `dist/server` when it is built, else the first of `python3`, `python` that runs and is Python 3.10+. Each candidate is run through `execCommand`, not just looked up, so the Store stubs are rejected. - Without the engine, run the validator's unit tests when that Python has `pytest`, and skip them otherwise. `docs-schemas.yml` installs `pytest`, so that doc-path gate now runs them instead of always skipping them. - Document the interpreter choice in `docs/development/ci-gates.md`. Fixes #2383
🤖 Internal: Discord sync markerAuto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete. |
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: rocketride-org/rocketride-server/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthrough
ChangesDocs validation interpreter
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Verdict: approve with nits. The fix does what #2383 asks, and I could not break it on Windows. Two low items below, neither blocking. I tested on Windows 11 with Node 22.17.0, on a machine that has no Baseline, develop at This PR at
The stand-in engine is a copied venv launcher, not a real engine build. I don't have one on this machine, but The CI side checks out too. In the Findings1. [low] The fallback does not try the 2. [low] The interpreter selection has no automated test Side note, not from this PR: the paragraph just above the new text in Metrics
Invariants checked
Things I tried that did not break it
Reviewed in an isolated worktree at |
Summary
docs:validatenow uses one interpreter for all three phases: the engine indist/serverwhen it is built, else the first ofpython3,pythonthat actually runs and is Python 3.10+. Before, phases 1–2 used a barepython3, which is the Microsoft Store stub on most Windows machines, so./builder testfailed there with exit 9009.tests/test_validate_node_readme.py) run when the chosen Python haspytest, and are skipped otherwise.docs-schemas.ymlalready installspytest, so that gate now really runs them. Before, it always skipped them because it has no engine.docs/development/ci-gates.mdnow says which Python the task uses.Type
fix
Testing
./builder testpasses (onlydocs:validateanddocs:checkwere run)Windows 11,
node scripts/build.js docs:validate:dist\server\engine.exe, 24 tests passedROCKETRIDE_DIST_ROOTset to an empty dir)python3stub rejected, realpython.exeused, 24 tests passedpytestPATHno Python 3.10+ found (tried …, python3, python)developNot tested locally on Linux or macOS. This PR touches
docs/**, sodocs-schemas.ymlruns on it and covers the Linux path with no engine.Checklist
docs/development/ci-gates.mdLinked Issue
Fixes #2383
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Bug Fixes
pytestis installed.