Skip to content

[Feat]: CI smoke tests for local-execute examples (no live API keys) #237

Description

@rosspeili

Feature Description

Parent RFC: #234 — parallel; does not depend on taxonomy decisions.

Problem

~34 scripts under examples/ are not run in CI (docs/TESTING.md). Full provider agent loops need API keys and are flaky — but several scripts are local-execute or demo-style and could be smoke-tested cheaply.

Goal (direction open)

Add automated coverage for a curated subset that:

  • Imports without error
  • Loads the target skill via SkillLoader
  • Calls execute() on a mocked or offline path — no live HTTP, no API keys, no Ollama/Gemini/Claude calls

Likely candidates to discuss (not fixed list)

  • mental_coach_demo.py
  • pii_guardrail_flow.py (mock Ollama / mask path if needed)
  • Other *_demo.py or scripts marked local-execute in examples/README.md

Explicitly out of scope for v1

  • Running Gemini/Claude/OpenAI/Ollama loop examples in CI
  • Replacing manual example maintenance — this is regression net only

Related: #178 (tool-name audit in examples), #233 (helper rename)

Rationale

Provider examples drift silently today. A small smoke layer catches import breaks, loader regressions, and manifest dispatch mistakes after refactors — without the cost of live agent loops.

Align with existing CI rules: no hardcoded per-skill pip lines in .github/workflows/ci.yml; use pip install -e ".[dev,all]" like other jobs.

Affected paths (optional)

tests/test_examples_smoke.py (new, name TBD), examples/mental_coach_demo.py, examples/pii_guardrail_flow.py, examples/README.md, .github/workflows/ci.yml, docs/TESTING.md

Implementation Idea

Options (pick in PR):

  1. pytest module — subprocess or import-based smoke; @pytest.mark.network excluded; monkeypatch env/API clients where scripts touch network.
  2. Curated manifest — JSON or pytest param list of allowed scripts + skip reason for others; easier to extend than auto-discovering all 34.
  3. CI steppytest tests/test_examples_smoke.py after existing pytest tests/ (or merged into tests/ if preferred).

Acceptance (flexible)

  • At least 2 local-execute examples covered
  • CI passes with dummy/no keys (same pattern as bundle tests)
  • docs/TESTING.md notes the new layer (examples remain “not full tests”)
  • Clear skip policy documented for scripts that need live keys

Activity

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

Metadata

Metadata

Assignees

Labels

ciGitHub Actions workflows and CI configuration.enhancementNew feature or request.examplesRunnable scripts under examples/, agent loops, or examples index.testingpytest, doc-drift guards, or CI test coverage.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions