Skip to content

Feat/1759 doc codeblocks ci#1884

Open
bogwi wants to merge 8 commits intodimensionalOS:devfrom
bogwi:feat/1759-doc-codeblocks-ci
Open

Feat/1759 doc codeblocks ci#1884
bogwi wants to merge 8 commits intodimensionalOS:devfrom
bogwi:feat/1759-doc-codeblocks-ci

Conversation

@bogwi
Copy link
Copy Markdown

@bogwi bogwi commented Apr 20, 2026

Problem

Hi, everyone.

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

Solution

Two commits were added. First introduced the mechanism, workflow and a script. The second - fixes documentation code blocks; those that did not mean to be run are skipped. My local CI, ./bin/run-doc-codeblocks --ci, is green. Total: 48 files, 139/139 blocks executed successfully. Artifacts were not committed, went lean.

Breaking Changes

None

Contributor License Agreement

  • I have read and approved the CLA.

@greptile-apps

This comment was marked as spam.

Comment on lines +29 to +30
jobs:
md-babel:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing job-level timeout-minutes

The md-babel job has no timeout-minutes, so a hung or misbehaving code block can hold the self-hosted runner for GitHub's default 6-hour limit. All other jobs in this repo (e.g., ci.yml sets 60 minutes) have explicit timeouts.

Suggested change
jobs:
md-babel:
md-babel:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: self-hosted
timeout-minutes: 30

Comment thread .github/workflows/doc-codeblocks.yml Outdated
Comment thread bin/run-doc-codeblocks
Comment on lines +9 to +16
LANG_FILTER="python,sh,node"
declare -a USER_PATHS=()

usage() {
cat >&2 <<'EOF'
Usage: bin/run-doc-codeblocks [options] [path ...]

--ci Same as --lang python,sh,node (default; for CI runners).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 --ci flag is a no-op relative to the default

LANG_FILTER is already initialised to "python,sh,node" on line 9, and --ci sets it to the exact same value. The help text calls --ci "default; for CI runners", which is technically accurate but slightly confusing since invoking the script with no flags produces identical behaviour. The flag is harmless, but consider removing the redundant initialisation or having --ci be the only place this default is set to make the intent clearer.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread bin/run-doc-codeblocks
Comment on lines +99 to +104
if [[ -d ./docs ]]; then
run_one_target ./docs
fi
if [[ -f README.md ]]; then
run_one_target README.md
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the ifs? docs and README.md should always exist.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if here is a harmless and defensive measure, but I can see it can look redundant.

@bogwi
Copy link
Copy Markdown
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
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
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants