Skip to content

[Docs]: Clarify bundle tests must mock network and model downloads in CI #170

Description

@rosspeili

What needs to be fixed?

Parent context: RFC #156 / #159 — bundle tests (skills/**/test_skill.py) now run in CI via pytest skills/. After merge, novelty_extractor failed because bundle tests called real fastembed, which tried to download from HuggingFace (429 rate limits). The hotfix mocks embeddings in bundle tests; docs should make the rule explicit so the next skill does not repeat this.

Problem: Docs already say bundle tests should be "offline" and "mock externals", but they do not spell out that model downloads (HuggingFace, Ollama, first-run embedding weights) count as network and must be mocked in bundle tests. TESTING.md also notes [all] includes fastembed, which contributors may read as "run real fastembed in CI".

Deliverables:

  1. docs/TESTING.md — In the Skill bundle test section, add bullets:

    • Bundle tests run in CI on every PR — no live HTTP, no API keys, no downloading models.
    • Mock HTTP, LLM clients, and embedding/model loaders (fastembed, etc.).
    • [all] satisfies imports; real inference belongs in maintainer tests (tests/skills/) or local runs, not bundle CI gates.
  2. CONTRIBUTING.md — Under test_skill.py (bundle test), add one line: mock network and first-run model downloads.

  3. templates/python_skill/README.md — Step 7: extend "mock externals" to include embedding/model loaders.

  4. docs/contributing/ai_native_workflow.md — Skill PR checklist: add item that bundle tests mock all network and model downloads (CI runs pytest skills/).

  5. Optional: docs/skills/novelty_extractor.md — One sentence under testing: bundle tests mock embeddings; real fastembed is for local use and examples.

Out of scope:

Acceptance criteria:

  • A new contributor reading only TESTING + CONTRIBUTING understands bundle tests must not download models in CI.
  • No stale wording implying bundle tests only run locally.
  • Wording stays concise; no issue/RFC links required in doc body (repo preference).

Affected Page

docs/TESTING.md, CONTRIBUTING.md, templates/python_skill/README.md, docs/contributing/ai_native_workflow.md (optional: docs/skills/novelty_extractor.md)

Metadata

Metadata

Labels

documentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No fields configured for Task.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions