Skip to content

Commit 1bd91da

Browse files
committed
test(autogen): land coverage suite, dashboard style overrides, and contract fixes
1 parent afd1cb5 commit 1bd91da

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545
run: python -m pytest tests/test_contract_compatibility.py -q --tb=short
4646

4747
- name: Run full test suite
48-
run: python -m pytest -q --tb=short
48+
run: |
49+
python -m pip install pytest-cov
50+
python -m pytest -q --tb=short --cov=. --cov-report=xml
4951
5052
- name: Compile Python sources
5153
run: python -m compileall autogen_starter autogen_dashboard maf_starter main.py -q

maf_starter/devui_overrides.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ async def inject_route_assets(request, call_next):
3636
body = b"".join([chunk async for chunk in response.body_iterator]).decode("utf-8")
3737
if "codex-route-overrides" not in body:
3838
body = body.replace("</head>", f"{ROUTE_STYLE}</head>")
39-
return HTMLResponse(body, status_code=response.status_code, headers=dict(response.headers))
39+
40+
headers = dict(response.headers)
41+
if "content-length" in headers:
42+
del headers["content-length"]
43+
44+
return HTMLResponse(body, status_code=response.status_code, headers=headers)

0 commit comments

Comments
 (0)