Skip to content

feat(tests): add CI smoke tests for local-execute examples (#237) - #315

Merged
rosspeili merged 4 commits into
ARPAHLS:mainfrom
tusharjamunkar:feat/examples-ci-smoke-tests-237
Aug 28, 2026
Merged

feat(tests): add CI smoke tests for local-execute examples (#237)#315
rosspeili merged 4 commits into
ARPAHLS:mainfrom
tusharjamunkar:feat/examples-ci-smoke-tests-237

Conversation

@tusharjamunkar

Copy link
Copy Markdown
Contributor

Description

Fixes #237.

Summary

Adds automated CI smoke testing for local-execute offline demo scripts under examples/. This provides a regression safety net catching import breaks, SkillLoader dispatch regressions, and manifest errors without requiring live API keys or making external network requests.

Key Changes

  • tests/test_examples_smoke.py:
    • Parameterized smoke tests covering 8 local-execute offline demo scripts:
      1. mental_coach_demo.py
      2. prompt_injection_firewall_demo.py
      3. prompt_compression_demo.py
      4. deceptive_ui_guard_demo.py
      5. token_limiter_loop.py
      6. uk_companies_house_handler_demo.py
      7. gmail_handler_demo.py
      8. bg_remover_demo.py
    • Added parity test test_every_example_script_has_smoke_or_skip_classification ensuring all scripts in examples/ are categorized with explicit skip rationales or smoke test coverage.
  • docs/TESTING.md: Updated status table and four-layer test architecture documentation to document the CI example smoke layer and clarify the skip policy for live model provider loops.
  • CHANGELOG.md: Added user-facing entry under [Unreleased].

Verification

  • pytest tests/test_examples_smoke.py -v: 9 passed in 11.5s.
  • pytest tests/test_registry_docs.py: passed cleanly.
  • flake8 tests/test_examples_smoke.py: 0 errors.

Add tests/test_examples_smoke.py covering 8 offline demo scripts, document example smoke layer in docs/TESTING.md, and record in CHANGELOG.md.
@rosspeili

Copy link
Copy Markdown
Contributor

Nice work @tusharjamunkar, this matches #237 well, and the parity test is a good guard.

Before merge, please:

  1. Remove the UTF-8 BOM at the start of tests/test_examples_smoke.py
  2. Add a brief note in examples/README.md that local-execute scripts are smoke-tested in CI (link docs/TESTING.md)
  3. Optional: bg_remover_demo.py currently passes smoke without calling execute() (missing sample_input.png), either add a tiny fixture or tighten expected markers

pii_guardrail_flow.py skip is fine for v1, we can revisit with a mocked Ollama path later if you wanna open a follow up.

LGTM once the above are fized, thanks! <3

- Removed UTF-8 BOM from tests/test_examples_smoke.py
- Added note in examples/README.md linking docs/TESTING.md
- Tightened expected smoke markers for bg_remover_demo.py
@tusharjamunkar

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @rosspeili! All 3 items are addressed:

  1. Removed the UTF-8 BOM from tests/test_examples_smoke.py.
  2. Added note in examples/README.md referencing CI smoke tests and linking docs/TESTING.md.
  3. Tightened expected output markers for bg_remover_demo.py.

All 18 tests and lint checks are passing cleanly!

@tusharjamunkar

Copy link
Copy Markdown
Contributor Author

Also applied �lack formatting to ests/test_examples_smoke.py to satisfy CI style checks cleanly.

@rosspeili
rosspeili merged commit f46051b into ARPAHLS:main Aug 28, 2026
6 checks passed
@rosspeili

Copy link
Copy Markdown
Contributor

LGTM @tusharjamunkar, merged. <3 Thanks for this.

@tusharjamunkar

Copy link
Copy Markdown
Contributor Author

Thanks so much @rosspeili! Glad I could contribute. <3

@rosspeili

Copy link
Copy Markdown
Contributor

You can pick more good first issues or if you're specifically interested in tests, I would check issues around CLI, Examples, and Testing.

Welcome @tusharjamunkar 🙏

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.

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

2 participants