From 89ea9c9c4a9053f5b7bad5998a7d3416735c566f Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Wed, 11 Feb 2026 08:27:08 -0700 Subject: [PATCH 1/5] test: Always sandbox home to avoid contamination with global state https://github.com/contextforge-org/contextforge-cli/issues/9 Branch: ServeNoAuthFlag-9 Signed-off-by: Gabe Goodhart --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 21db999..ed8f8c8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -280,7 +280,7 @@ def authorized_mock_client(mock_client) -> Generator[None, None, None]: yield mock_client -@pytest.fixture +@pytest.fixture(autouse=True) def mock_settings() -> Generator[CLISettings, None, None]: """Provide a context manager for mocking settings.""" with tempfile.TemporaryDirectory(prefix="cforge_") as tmpdir: From 443653b863b403cdef6667e54bd1e9a5a2d74948 Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Wed, 11 Feb 2026 08:28:48 -0700 Subject: [PATCH 2/5] chore: Re-enable test failures for CI https://github.com/contextforge-org/contextforge-cli/issues/20 Branch: FixCI-20 Signed-off-by: Gabe Goodhart --- .github/workflows/test.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ec18f9..3dee0f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,9 +27,4 @@ jobs: python -m pip install --upgrade pip python -m pip install -e ".[dev]" - name: Build and test - # TEMPORARY: There are bugs in the upstream that cause the tests to fail - # so for now, this step will always succeed. This should be removed - # as soon as the tests can pass against a stable version of the - # upstream! - # run: pytest - run: pytest || true + run: pytest From 601c7bd8d4e84467ecdff99806001f225b2dbde5 Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Wed, 11 Feb 2026 08:41:29 -0700 Subject: [PATCH 3/5] build: Fail pytest under 100 coverage https://github.com/contextforge-org/contextforge-cli/issues/20 Branch: FixCI-20 Signed-off-by: Gabe Goodhart AI-usage: none --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 34ef139..db259b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -342,7 +342,7 @@ plugins = ["pydantic.mypy"] # Enable mypy plugin for Pydantic model [tool.pytest.ini_options] minversion = "6.0" -addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term" +addopts = "-ra --cov=cforge --cov-report=html:htmlcov --cov-report=term --cov-fail-under=100" testpaths = [ "tests",] filterwarnings = [ "error", # Turn ALL warnings into errors by default From 4605c2a73229c2138e5a40ccd602ff187ad3d877 Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Wed, 11 Feb 2026 09:23:45 -0700 Subject: [PATCH 4/5] test: Ignore new deprecation warnings https://github.com/contextforge-org/contextforge-cli/issues/20 Branch: FixCI-20 Signed-off-by: Gabe Goodhart --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index db259b9..390db86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -353,6 +353,8 @@ filterwarnings = [ "ignore: `regex` has been deprecated, please use `pattern` instead", # FastAPI upgraded needed upstream "ignore: Extra environment options are deprecated. Use a preconfigured jinja2.Environment instead.", # Jinja2 deprecation upstream "ignore:websockets.*is deprecated.*:DeprecationWarning", # websockets library upgrade needed upstream + "ignore: SADeprecationWarning. The argument signature for the .*", # sqlalchemy deprecation + "ignore: The HMAC key is 11 bytes long.*", # security warning from jwt ] # ── fawltydeps ───────────────────────────────────────────────────── From aece488938e02b3d34d30a5efa83f0b10c985101 Mon Sep 17 00:00:00 2001 From: Gabe Goodhart Date: Wed, 11 Feb 2026 11:23:17 -0700 Subject: [PATCH 5/5] chore: Better warning ignores https://github.com/contextforge-org/contextforge-cli/issues/20 Branch: FixCI-20 Signed-off-by: Gabe Goodhart AI-usage: full --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 390db86..58422d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -353,8 +353,10 @@ filterwarnings = [ "ignore: `regex` has been deprecated, please use `pattern` instead", # FastAPI upgraded needed upstream "ignore: Extra environment options are deprecated. Use a preconfigured jinja2.Environment instead.", # Jinja2 deprecation upstream "ignore:websockets.*is deprecated.*:DeprecationWarning", # websockets library upgrade needed upstream - "ignore: SADeprecationWarning. The argument signature for the .*", # sqlalchemy deprecation + "ignore:The argument signature for the.*PoolEvents.reset:sqlalchemy.exc.SADeprecationWarning", # sqlalchemy deprecation, fixed upstream in mcpgateway "ignore: The HMAC key is 11 bytes long.*", # security warning from jwt + "ignore:unclosed database in.*:ResourceWarning", # sqlite3 connection leaked during mcpgateway import-time bootstrap + "ignore:Exception ignored in.*sqlite3.Connection.*:pytest.PytestUnraisableExceptionWarning", # same root cause as above ] # ── fawltydeps ─────────────────────────────────────────────────────