Skip to content

test: skip dimsim path-replanning e2e when OPENAI_API_KEY unset#2632

Merged
paul-nechifor merged 2 commits into
release/0.0.13from
chore/mark-dimsim-replanning-skipif-no-openai
Jun 26, 2026
Merged

test: skip dimsim path-replanning e2e when OPENAI_API_KEY unset#2632
paul-nechifor merged 2 commits into
release/0.0.13from
chore/mark-dimsim-replanning-skipif-no-openai

Conversation

@spomichter

Copy link
Copy Markdown
Contributor

What

Adds @pytest.mark.skipif_no_openai to test_path_replanning in dimos/e2e_tests/test_dimsim_path_replaning.py.

Why

test_path_replanning runs the unitree-go2-agentic blueprint, which deploys SpeakSkillOpenAITTSNode plus the agentic stack. Those construct an OpenAI client at module start() and hard-require OPENAI_API_KEY. Without the key the blueprint fails to start and the test errors rather than skipping:

RemoteError: [Remote openai.OpenAIError] The api_key client option must be set ...
  speak_skill.py:41 → OpenAITTSNode(...) → OpenAI(api_key=...)

Every other test under dimos/e2e_tests/ already carries @pytest.mark.skipif_no_openai (test_patrol_and_follow, test_spatial_memory, test_person_follow, test_dimos_cli_e2e, test_scan_and_follow_person, test_security_module). This one was the lone holdout.

The marker is registered in conftest.py and converts to a real skip when OPENAI_API_KEY is absent. The self_hosted_large marker is unchanged, so it still runs on the self-hosted-large runner (which has the secret).

Test

$ env -u OPENAI_API_KEY pytest dimos/e2e_tests/test_dimsim_path_replaning.py -m self_hosted_large -rs
SKIPPED [1] dimos/e2e_tests/test_dimsim_path_replaning.py:18: OPENAI_API_KEY not set

(Previously this errored at blueprint startup.)

test_path_replanning drives the unitree-go2-agentic blueprint, which
deploys SpeakSkill -> OpenAITTSNode and the agentic stack, both of which
require OPENAI_API_KEY at module start. Without the key the blueprint
fails to start and the test errors out instead of skipping.

Add @pytest.mark.skipif_no_openai (already used by every other
dimos/e2e_tests test) so it skips cleanly when the key is absent, while
still running on the self-hosted-large runner where the secret is set.
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds @pytest.mark.skipif_no_openai to three dimsim e2e tests (test_path_replanning, test_go_to_the_bed, test_walk_forward) so they skip cleanly when OPENAI_API_KEY is absent rather than crashing at blueprint startup. The marker is already registered in dimos/conftest.py and applied by pytest_collection_modifyitems, matching the pattern used by every other OpenAI-dependent e2e test in the suite.

  • test_dimsim_path_replaning.py — the primary fix; unitree-go2-agentic deploys SpeakSkill → OpenAITTSNode which hard-requires the key at start().
  • test_dimsim_spatial_memory.py and test_dimsim_walk_forward.py — two additional tests that had the same gap; the PR description only calls out the first file but all three fixes are correct and consistent with the rest of the suite.

Confidence Score: 5/5

Safe to merge — each change is a one-line marker addition that mirrors the established pattern in every other OpenAI-dependent e2e test.

All three changes are additive-only: they add a well-understood skip marker that is already registered in conftest.py and used correctly across the rest of the suite. No test logic, fixtures, or blueprints are modified. The marker correctly converts to a skip when the key is absent and is a no-op when the key is present, so there is no regression risk for the self-hosted runner that carries the secret.

No files require special attention.

Important Files Changed

Filename Overview
dimos/e2e_tests/test_dimsim_path_replaning.py Adds @pytest.mark.skipif_no_openai so the test skips gracefully instead of erroring when OPENAI_API_KEY is absent — the primary fix described in the PR.
dimos/e2e_tests/test_dimsim_spatial_memory.py Also adds @pytest.mark.skipif_no_openai to test_go_to_the_bed, which runs the same unitree-go2-agentic blueprint and has the same hard dependency on OPENAI_API_KEY. Not mentioned in the PR description but correct.
dimos/e2e_tests/test_dimsim_walk_forward.py Adds @pytest.mark.skipif_no_openai to test_walk_forward; disables spatial-memory and security-module but SpeakSkill/OpenAITTSNode remain active in the unitree-go2-agentic blueprint, so the key is still required.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant pytest
    participant conftest as conftest.py (pytest_collection_modifyitems)
    participant env as Environment
    participant test as test_*

    pytest->>conftest: collect items
    conftest->>env: os.getenv("OPENAI_API_KEY")
    alt key absent
        env-->>conftest: None / empty
        conftest->>test: "add pytest.mark.skip(reason="OPENAI_API_KEY not set")"
        test-->>pytest: SKIPPED
    else key present
        env-->>conftest: key value
        test-->>pytest: RUN → start_blueprint("unitree-go2-agentic") → OpenAITTSNode
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant pytest
    participant conftest as conftest.py (pytest_collection_modifyitems)
    participant env as Environment
    participant test as test_*

    pytest->>conftest: collect items
    conftest->>env: os.getenv("OPENAI_API_KEY")
    alt key absent
        env-->>conftest: None / empty
        conftest->>test: "add pytest.mark.skip(reason="OPENAI_API_KEY not set")"
        test-->>pytest: SKIPPED
    else key present
        env-->>conftest: key value
        test-->>pytest: RUN → start_blueprint("unitree-go2-agentic") → OpenAITTSNode
    end
Loading

Reviews (2): Last reviewed commit: "test: skip remaining dimsim e2e tests wh..." | Re-trigger Greptile

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

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

@@                Coverage Diff                @@
##             release/0.0.13    #2632   +/-   ##
=================================================
  Coverage                  ?   71.00%           
=================================================
  Files                     ?      892           
  Lines                     ?    79237           
  Branches                  ?     7081           
=================================================
  Hits                      ?    56266           
  Misses                    ?    21131           
  Partials                  ?     1840           
Flag Coverage Δ
OS-ubuntu-24.04-arm 63.31% <100.00%> (?)
OS-ubuntu-latest 66.07% <100.00%> (?)
Py-3.10 66.06% <100.00%> (?)
Py-3.11 66.06% <100.00%> (?)
Py-3.12 66.06% <100.00%> (?)
Py-3.13 66.06% <100.00%> (?)
Py-3.14 66.08% <100.00%> (?)
Py-3.14t 66.06% <100.00%> (?)
SelfHosted-Large 30.03% <100.00%> (?)
SelfHosted-Linux 37.59% <100.00%> (?)
SelfHosted-macOS 36.45% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/e2e_tests/test_dimsim_path_replaning.py 100.00% <100.00%> (ø)
dimos/e2e_tests/test_dimsim_spatial_memory.py 100.00% <100.00%> (ø)
dimos/e2e_tests/test_dimsim_walk_forward.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

test_walk_forward and test_go_to_the_bed both drive the
unitree-go2-agentic blueprint (same OpenAI-backed agentic stack +
SpeakSkill as test_path_replanning), so they also error at blueprint
startup without OPENAI_API_KEY. Add @pytest.mark.skipif_no_openai to
both, matching every other agentic e2e test.

This covers all three dimos/e2e_tests/test_dimsim_*.py tests.
@paul-nechifor paul-nechifor enabled auto-merge (squash) June 26, 2026 20:03
@paul-nechifor paul-nechifor merged commit 9610600 into release/0.0.13 Jun 26, 2026
28 checks passed
@paul-nechifor paul-nechifor deleted the chore/mark-dimsim-replanning-skipif-no-openai branch June 26, 2026 20:26
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants