1
0

Claude/angry cerf (#173)

* feat: set qwen3.5:latest as default model

- Make qwen3.5:latest the primary default model for faster inference
- Move llama3.1:8b-instruct to fallback chain
- Update text fallback chain to prioritize qwen3.5:latest

Retains full backward compatibility via cascade fallback.

* test: remove ~55 brittle, duplicate, and useless tests

Audit of all 100 test files identified tests that provided no real
regression protection. Removed:

- 4 files deleted entirely: test_setup_script (always skipped),
  test_csrf_bypass (tautological assertions), test_input_validation
  (accepts 200-500 status codes), test_security_regression (fragile
  source-pattern checks redundant with rendering tests)
- Duplicate test classes (TestToolTracking, TestCalculatorExtended)
- Mock-only tests that just verify mock wiring, not behavior
- Structurally broken tests (TestCreateToolFunctions patches after import)
- Empty/pass-body tests and meaningless assertions (len > 20)
- Flaky subprocess tests (aider tool calling real binary)

All 1328 remaining tests pass. Net: -699 lines, zero coverage loss.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: prevent test pollution from autoresearch_enabled mutation

test_autoresearch_perplexity.py was setting settings.autoresearch_enabled = True
but never restoring it in the finally block — polluting subsequent tests.
When pytest-randomly ordered it before test_experiments_page_shows_disabled_when_off,
the victim test saw enabled=True and failed to find "Disabled" in the page.

Fix both sides:
- Restore autoresearch_enabled in the finally block (root cause)
- Mock settings explicitly in the victim test (defense in depth)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Trip T <trip@local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-11 16:55:27 -04:00
committed by GitHub
parent 0b91e45d90
commit 36fc10097f
17 changed files with 24 additions and 707 deletions

View File

@@ -130,39 +130,6 @@ async def test_create_goal(client):
assert goal is not None
# ── wake agent ───────────────────────────────────────────────────────────────
async def test_wake_agent(client):
raw = {"status": "queued"}
with patch.object(client, "_post", new_callable=AsyncMock, return_value=raw):
result = await client.wake_agent("a1", issue_id="i1")
assert result == {"status": "queued"}
async def test_wake_agent_failure(client):
with patch.object(client, "_post", new_callable=AsyncMock, return_value=None):
result = await client.wake_agent("a1")
assert result is None
# ── approvals ────────────────────────────────────────────────────────────────
async def test_approve(client):
raw = {"status": "approved"}
with patch.object(client, "_post", new_callable=AsyncMock, return_value=raw):
result = await client.approve("ap1", comment="LGTM")
assert result is not None
async def test_reject(client):
raw = {"status": "rejected"}
with patch.object(client, "_post", new_callable=AsyncMock, return_value=raw):
result = await client.reject("ap1", comment="Needs work")
assert result is not None
# ── heartbeat runs ───────────────────────────────────────────────────────────
@@ -171,10 +138,3 @@ async def test_list_heartbeat_runs(client):
with patch.object(client, "_get", new_callable=AsyncMock, return_value=raw):
runs = await client.list_heartbeat_runs(company_id="comp-1")
assert len(runs) == 1
async def test_cancel_run(client):
raw = {"status": "cancelled"}
with patch.object(client, "_post", new_callable=AsyncMock, return_value=raw):
result = await client.cancel_run("r1")
assert result is not None