Skip to content

Feat/1759 doc codeblocks ci#1884

Merged
leshy merged 19 commits into
dimensionalOS:mainfrom
bogwi:feat/1759-doc-codeblocks-ci
May 9, 2026
Merged

Feat/1759 doc codeblocks ci#1884
leshy merged 19 commits into
dimensionalOS:mainfrom
bogwi:feat/1759-doc-codeblocks-ci

Conversation

@bogwi
Copy link
Copy Markdown
Collaborator

@bogwi bogwi commented Apr 20, 2026

Problem

Hi, everyone.

This closes Execute documentation codeblocks in CI #1759 opened by @leshy .

Solution

Two strategies. First introduced the mechanism, workflow and a script. The second - improves present doc codeblocks for: missing imports, modules resolution, some blocks are wrapped to be run-able, those that did not mean to be run are skipped like illustrative one-liners or very heavy blocks, etc. This workflow is disabled for macos. This is a version 1 of the #1759 solution.

Breaking Changes

None

Contributor License Agreement

  • I have read and approved the CLA.

@greptile-apps

This comment was marked as spam.

Comment thread .github/workflows/doc-codeblocks.yml
Comment thread .github/workflows/doc-codeblocks.yml Outdated
Comment thread bin/run-doc-codeblocks
Comment thread bin/run-doc-codeblocks Outdated
@bogwi
Copy link
Copy Markdown
Collaborator Author

bogwi commented Apr 21, 2026

The last commit, 3be2ad5, addresses two previous minor ci run failures:
(a) trailing-whitespace, and
(b) astral's new "No more major and minor tags" policy from 8.0.0, use only immutable tags as versions.

The full ci should be green now and is safe to re-run.

If @paul-nechifor insists on "if" change - please say a word.

@leshy
Copy link
Copy Markdown
Contributor

leshy commented Apr 21, 2026

https://github.com/dimensionalOS/dimos/actions/runs/24695981801/job/72277385519?pr=1884

didn't investigate in detail, approved workflow run, currently fails in some weird way, is this related to it being an external PR?

@bogwi
Copy link
Copy Markdown
Collaborator Author

bogwi commented Apr 21, 2026

Tracing this: https://github.com/dimensionalOS/dimos/actions/runs/24711607201/job/72278865724?pr=1884.

What is actually failing

The job name is md-babel but the failure happens before ./bin/run-doc-codeblocks even runs. It fails on:

uv sync --extra dev --frozen --no-extra dds

That installs the project in editable mode which runs setuptools -> build_ext for the pybind11 extensions in setup.py. Pybind11’s auto_cpp_level() compiles a tiny probe (flagcheck.cpp) with c++ and -std=c++17 / 14 / 11. When all of those probes fail it gets:

RuntimeError: Unsupported compiler -- at least C++11 support is needed!

So this looks as a native C++ build environment problem on the runner not md-babel or markdown execution at all.

Two plausible ways to fix it:

  1. use an environment known to compile dimos (as in ci.yml), or
  2. to fix c++ / build tools on the self-hosted host.

The above last commit uses the same ci as in ci.yml. Also updated some docs to have no manipulation imports in CI.

@bogwi
Copy link
Copy Markdown
Collaborator Author

bogwi commented Apr 21, 2026

Updated workflow compiles dimos OK.

New commit addresses these that erred:
a) Marked the YOLO snippet as ```python skip.

b) Marked all replay and asset-dependent session=qb blocks in both quality_filter.md files as skip session=qb (left the two synthetic rx / quality_barrier examples runnable).

c) Marked all session=align Python blocks in both temporal_alignment.md files as skip session=align (embedded stays as documentation).

@bogwi bogwi force-pushed the feat/1759-doc-codeblocks-ci branch from cd334bf to addb6c9 Compare April 24, 2026 12:44
Comment thread .github/workflows/doc-codeblocks.yml
@bogwi
Copy link
Copy Markdown
Collaborator Author

bogwi commented Apr 24, 2026

md-babel-py is 1.1.4 now, supports --execution-timeout flag which I authored exactly for the purpose: https://github.com/leshy/md-babel-py/releases/tag/v1.1.4. Giving the recent > 60s (md-babe-py default) runs, timeout was increased to 120s. Done in 0707499

On the local machine, the current state of the docs fluctuates between 8 and 33 seconds, and not every block runs. The Golden Rule in codeblocks.md, as stated now, is: "All code blocks must be executable. Never write illustrative/pseudo code blocks. If you're showing an API usage pattern, create a minimal working example that actually runs. This ensures the documentation stays correct as the codebase evolves." However, this might not be possible to achieve.

Update in: 30a12a3

Greptile might flag this as Arbitrary code execution from fork PRs on self-hosted runner: github.event_name != 'pull_request' || github.event.pull_request.draft == false. To silence the bot - 0707499 was created, but it will not run on forks. @leshy, this needs your clarification as per #1759.

@bogwi bogwi force-pushed the feat/1759-doc-codeblocks-ci branch from d4bb976 to 1655268 Compare May 3, 2026 10:07
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Want your agent to iterate on Greptile's feedback? Try greploops.

@bogwi bogwi marked this pull request as draft May 3, 2026 17:14
@bogwi bogwi marked this pull request as ready for review May 4, 2026 07:22
@leshy leshy added the PlzReview label May 5, 2026
Comment thread bin/run-doc-codeblocks
Comment thread .github/workflows/doc-codeblocks.yml
Comment thread docs/usage/transports/index.md Outdated
Comment thread docs/agents/style.md
Comment thread docs/agents/testing.md Outdated
Comment thread .github/workflows/doc-codeblocks.yml
Comment thread docs/usage/transports/index.md Outdated
Comment thread docs/agents/testing.md Outdated
Comment thread .github/workflows/doc-codeblocks.yml
Comment thread .github/workflows/doc-codeblocks.yml
bogwi added 7 commits May 7, 2026 17:34
The runner is a no-op on Darwin so local work does not require Linux/GPU deps; set RUN_DOC_CODEBLOCKS_FORCE=1 or call md-babel-py directly to run on a Mac. Documented in the script --help.

Also: doc-codeblocks workflow sync excludes unitree-dds; fix modules and python-api examples for md-babel (session/skip and runnable fragments).
@bogwi bogwi force-pushed the feat/1759-doc-codeblocks-ci branch from 1f28685 to 8db0e17 Compare May 7, 2026 08:39
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

leshy
leshy previously approved these changes May 7, 2026
@bogwi bogwi changed the base branch from dev to main May 9, 2026 01:55
@bogwi bogwi dismissed leshy’s stale review May 9, 2026 01:55

The base branch was changed.

@leshy leshy enabled auto-merge (squash) May 9, 2026 13:39
@leshy leshy merged commit 3eb2592 into dimensionalOS:main May 9, 2026
5 checks passed
mustafab0 pushed a commit that referenced this pull request May 13, 2026
jiangtao129 added a commit to jiangtao129/dimos that referenced this pull request May 14, 2026
* perf(rerun): render voxel maps as Points3D spheres instead of Boxes3D (dimensionalOS#1793)

* feat(api): add porcelain api with connect (dimensionalOS#1779)

* fix(rerun): dimos-viewer version upgrade (dimensionalOS#1785)

* Task: Add meaningful manipulation tests (dimensionalOS#1765)

* feat: never leave child processes alive after the parent (dimensionalOS#1886)

* Fix mac UDP (dimensionalOS#1789)

* Remove sim from base install (dimensionalOS#1878)

* fix(tests): fix flakey porcelain test (dimensionalOS#1900)

* feat(go2): rage mode via webrtc (dimensionalOS#1903)

* feat:rust native modules (dimensionalOS#1794)

Co-authored-by: leshy <lesh@sysphere.org>

* Feat/memory2 - plotting, examples, recorder module, semantic search (dimensionalOS#1769)

Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com>

* fix attributes (dimensionalOS#1918)

* Jeff/fix/rconnect2 (dimensionalOS#1784)

* fix(types): resolve mypy 3.10 errors (dimensionalOS#1921)

* feat(go2):  go2 SDK adapter + nix cyclonedds setup (dimensionalOS#1885)

Co-authored-by: Mustafa Bhadsorawala <39084056+mustafab0@users.noreply.github.com>

* Revert "Jeff/fix/rconnect2" (dimensionalOS#1924)

* feat(modules): async modules (dimensionalOS#1920)

* chore(logging): enforce usage of setup_logger (dimensionalOS#1895)

* feat(api): peek_stream (dimensionalOS#1909)

* CI/macos: skip failing tests (dimensionalOS#1944)

* fix(ci): restrict code-cleanup workflow to Linux runners only (dimensionalOS#1948)

* Fix/memory2 go2 autorecorder (dimensionalOS#1925)

* Convert patrol module to be an async module (dimensionalOS#1939)

* feat(tool-streams): add tool streams (dimensionalOS#1713)

* G1 Low level connection module coordinator integration (dimensionalOS#1954)

* feat(sim): MuJoCo sim teleop for xarm + piper (dimensionalOS#1958)

* Show child process cpu usage in dtop (dimensionalOS#1880)

Co-authored-by: leshy <lesh@sysphere.org>

* Task: OpenArm Integration with DimOS (dimensionalOS#1897)

Co-authored-by: Paul Nechifor <paul@nechifor.net>
Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com>
Co-authored-by: Andrew Lauer <69774903+aclauer@users.noreply.github.com>
Co-authored-by: leshy <lesh@sysphere.org>
Co-authored-by: Jeff Hykin <jeff.hykin@gmail.com>

* md-babel-py bump (dimensionalOS#1994)

* new hong kong office recording (dimensionalOS#1991)

* chore(security): update packages with issues (dimensionalOS#1989)

* Make whisper an optional extra with faster-whisper by default (dimensionalOS#1877)

* Drop perception. Update docs. (dimensionalOS#1888)

* Add codecov (dimensionalOS#1889)

* go2 lidar timestamps bugfix (dimensionalOS#1992)

* go2 cli (dimensionalOS#1990)

* refactor(core): memory2 for dtop (dimensionalOS#2004)

* fix: adaptive timestamp correction (dimensionalOS#2021)

Co-authored-by: Ivan Nikolic <lesh@sysphere.org>

* Disable codecov status check (dimensionalOS#2026)

* fixes replay mem leak (dimensionalOS#2025)

* fix: launch arm blueprints with --simulation flag (dimensionalOS#2027)

* small fixes for release (dimensionalOS#2019)

* chore: add problems back

* Change Codecov branch from 'dev' to 'main'

* docs: remove mentions of dev

* Ivan/fix/go2recording2 (dimensionalOS#2034)

* mapper memory leak fix, measurement transforms (dimensionalOS#2031)

* Feat/1759 doc codeblocks ci (dimensionalOS#1884)

* Nav Stack 0.1

* fix(security): upgrade some packages (dimensionalOS#2040)

* go2 apriltag recordings (dimensionalOS#2044)

* Ivan/fix/doc codeblocks added skip2 (dimensionalOS#2052)

* feat Aruco/Apriltag generator (dimensionalOS#2037)

* Split tests off of self hosted runner (dimensionalOS#1901)

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(verify): exclude unitree-dds extra to avoid cyclonedds C lib

Upstream introduced `dimos[unitree-dds]` which depends on
`cyclonedds==0.10.5`. The Python binding tries to compile against the
CycloneDDS C library, which is not installed on the fork's
ubuntu-latest runner. This makes verify fail with:
  Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH

Upstream's own `ci.yml` (line 36) already passes
`--no-extra dds --no-extra unitree-dds`; align the fork's verify with it.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com>
Co-authored-by: Paul Nechifor <paul@nechifor.net>
Co-authored-by: Mustafa Bhadsorawala <39084056+mustafab0@users.noreply.github.com>
Co-authored-by: Sam Bull <git@sambull.org>
Co-authored-by: Andrew Lauer <69774903+aclauer@users.noreply.github.com>
Co-authored-by: leshy <lesh@sysphere.org>
Co-authored-by: Jeff Hykin <jeff.hykin@gmail.com>
Co-authored-by: stash <pomichterstash@gmail.com>
Co-authored-by: Dan Vi <bogwi@tutamail.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: jiangtao-huazhijian <jiang.tao@topsunpower.cc>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

3 participants