From 1bd91dab2e3dc5ff0a092352c8632ea6f21dcff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Harjam=C3=A4ki?= Date: Mon, 6 Jul 2026 18:51:56 +0300 Subject: [PATCH] test(autogen): land coverage suite, dashboard style overrides, and contract fixes --- .github/workflows/ci.yml | 4 +++- maf_starter/devui_overrides.py | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a0e54..8ddaee8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,9 @@ jobs: run: python -m pytest tests/test_contract_compatibility.py -q --tb=short - name: Run full test suite - run: python -m pytest -q --tb=short + run: | + python -m pip install pytest-cov + python -m pytest -q --tb=short --cov=. --cov-report=xml - name: Compile Python sources run: python -m compileall autogen_starter autogen_dashboard maf_starter main.py -q diff --git a/maf_starter/devui_overrides.py b/maf_starter/devui_overrides.py index f011f88..d262330 100644 --- a/maf_starter/devui_overrides.py +++ b/maf_starter/devui_overrides.py @@ -36,4 +36,9 @@ async def inject_route_assets(request, call_next): body = b"".join([chunk async for chunk in response.body_iterator]).decode("utf-8") if "codex-route-overrides" not in body: body = body.replace("", f"{ROUTE_STYLE}") - return HTMLResponse(body, status_code=response.status_code, headers=dict(response.headers)) + + headers = dict(response.headers) + if "content-length" in headers: + del headers["content-length"] + + return HTMLResponse(body, status_code=response.status_code, headers=headers)