Skip to content

ci: make the unit workflow green (gate live-Ollama/Docker tests, fix two card-dependent assertions) - #15

Merged
araray merged 1 commit into
mainfrom
av/ci-green
Sep 19, 2026
Merged

araray merged 1 commit into
mainfrom
av/ci-green

Conversation

@araray

@araray araray commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

With grimoire now public, CI's dependency install passes and the unit test job ran for the first time on main. It failed for four reasons, none of them bugs in the code under test:

Failure Cause Fix
~48 tests in tests/api/test_context_info_introspection.py + test_external_rag_integration.py LLMCore.create() with the default Ollama provider; CI has no Ollama New requires_ollama marker on both modules; tests/conftest.py auto-skips them when no server answers (honours OLLAMA_HOST); CI -m selection excludes the marker explicitly
test_sandbox_integration::test_run_with_sandbox_creates_and_cleans_up SandboxIntegration.initialize() needs a Docker daemon Marked docker (already excluded in CI)
test_deepinfra_provider::test_get_max_context_length_from_registry Hard-coded 163840; the card refresh (#12) took DeepInfra's live value 128000 Asserts the provider returns the registry card's value
test_huggingface_provider::test_known_model_fallback_table Order-dependent: expected the static table (131072) but a builtin card (128000) wins once the registry singleton is loaded Registry lookup neutralised inside the test

Verification (local)

  • With OLLAMA_HOST pointing at a dead port: the two API modules report 48 skipped; with the CI -m string: 26 deselected / 0 collected for the marked module.
  • tests/test_huggingface_provider.py tests/providers/test_deepinfra_provider.py + the sandbox test (Docker present locally): 75 passed.
  • This PR's own CI run is the end-to-end check.

🤖 Generated with Claude Code

… fix two card-dependent assertions

With grimoire public, CI's install step finally passes and the test job
ran for the first time; it surfaced four kinds of failure, none caused by
the code under test:

- tests/api/test_context_info_introspection.py and
  tests/api/test_external_rag_integration.py create LLMCore with the
  default (Ollama) provider and need a live server. New `requires_ollama`
  marker on both modules; tests/conftest.py auto-skips marked tests when
  no Ollama answers (OLLAMA_HOST honoured); the CI `-m` selection excludes
  the marker explicitly.
- test_sandbox_integration::test_run_with_sandbox_creates_and_cleans_up
  needs a Docker daemon (SandboxIntegration.initialize()); marked `docker`,
  which CI already excludes.
- test_deepinfra_provider::test_get_max_context_length_from_registry
  hard-coded 163840 for deepseek-ai/DeepSeek-V3; the model-card refresh
  (#12) took DeepInfra's live value (128000). The test now asserts the
  provider returns whatever the registry card says.
- test_huggingface_provider::test_known_model_fallback_table was
  order-dependent: it expected the static fallback table (131072) but a
  builtin card (128000) wins whenever an earlier test has loaded the
  registry singleton. The registry lookup is now neutralised in the test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 19, 2026 05:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The Ollama marker does not consistently honor OLLAMA_HOST in the external RAG fixture.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates CI and tests to handle unavailable Ollama/Docker environments and avoid brittle model-card assertions.

Changes:

  • Adds Ollama availability detection and CI marker exclusion.
  • Marks Docker-dependent sandbox tests.
  • Makes provider assertions registry-aware and order-independent.
File Summary
tests/​test_huggingface_provider.py Isolates fallback-table testing from registry state.
tests/​providers/​test_deepinfra_provider.py Uses the registry card’s context value.
tests/​conftest.py Adds Ollama availability detection and skipping.
tests/​api/​test_external_rag_integration.py Marks tests as Ollama-dependent.
tests/​api/​test_context_info_introspection.py Marks tests as Ollama-dependent.
tests/​agents/​test_sandbox_integration.py Marks the test as Docker-dependent.
pyproject.toml Registers the Ollama marker.
.github/​workflows/​ci.yml Excludes Ollama tests from CI selection.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


import pytest

pytestmark = pytest.mark.requires_ollama # the llmcore_instance fixture needs a live Ollama
@araray araray self-assigned this Sep 19, 2026
@araray
araray merged commit 04274b6 into main Sep 19, 2026
4 checks passed
@araray
araray deleted the av/ci-green branch September 19, 2026 05:33
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.

2 participants