[loop-generated] [bug] Pre-existing test failures block all commits via git hooks #1112

Closed
opened 2026-03-23 18:07:24 +00:00 by Timmy · 1 comment
Owner

What's happening

10 tests on main are failing, all with the same root cause:

TypeError: cannot use 'tuple' as a dict key (unhashable type: 'dict')

Affected tests:

  • tests/dashboard/test_calm.py (6 tests) — all calm task endpoints return 500
  • tests/dashboard/test_round4_fixes.py (2 tests) — /tools page returns 500
  • tests/test_smoke.py (2 tests) — /tools endpoint 500

Because the pre-commit hook runs tox -e unit and the pre-push hook runs tox -e pre-push, no commits or pushes can succeed on any branch. This blocks all development.

Root cause

Somewhere in the calm task routes or tools page, a tuple is being used as a dict key where a hashable type is expected. The error cannot use 'tuple' as a dict key (unhashable type: 'dict') suggests a dict is being used where a hashable value is needed.

Expected behavior

All tests on main should pass. Git hooks should not block unrelated work.

Suggested fix

  1. Fix the unhashable type error in the calm/tools routes
  2. OR: temporarily mark these 10 tests as xfail so hooks don't block all development

Acceptance criteria

  • tox -e unit passes on main with 0 failures
  • Git hooks (pre-commit, pre-push) complete successfully
## What's happening 10 tests on main are failing, all with the same root cause: ``` TypeError: cannot use 'tuple' as a dict key (unhashable type: 'dict') ``` Affected tests: - `tests/dashboard/test_calm.py` (6 tests) — all calm task endpoints return 500 - `tests/dashboard/test_round4_fixes.py` (2 tests) — /tools page returns 500 - `tests/test_smoke.py` (2 tests) — /tools endpoint 500 Because the pre-commit hook runs `tox -e unit` and the pre-push hook runs `tox -e pre-push`, **no commits or pushes can succeed** on any branch. This blocks all development. ## Root cause Somewhere in the calm task routes or tools page, a tuple is being used as a dict key where a hashable type is expected. The error `cannot use 'tuple' as a dict key (unhashable type: 'dict')` suggests a dict is being used where a hashable value is needed. ## Expected behavior All tests on main should pass. Git hooks should not block unrelated work. ## Suggested fix 1. Fix the unhashable type error in the calm/tools routes 2. OR: temporarily mark these 10 tests as `xfail` so hooks don't block all development ## Acceptance criteria - `tox -e unit` passes on main with 0 failures - Git hooks (pre-commit, pre-push) complete successfully
Timmy added the seed:serve-real label 2026-03-23 18:07:24 +00:00
claude self-assigned this 2026-03-23 18:07:56 +00:00
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1115

Root cause: Starlette 1.0.0 changed TemplateResponse signature from (name, context) to (request, name, context). Old-style calls passed the context dict as name, causing Jinja2 to wrap it in a tuple for its cache key, raising TypeError: cannot use 'tuple' as a dict key (unhashable type: 'dict') in Python 3.14.

Fix: Updated 7 TemplateResponse calls across calm.py (6 endpoints) and tools.py (1 endpoint) to use the new Starlette 1.0.0 API.

Result: tox -e unit passes with 3242 passed, 0 failed.

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/1115 **Root cause:** Starlette 1.0.0 changed `TemplateResponse` signature from `(name, context)` to `(request, name, context)`. Old-style calls passed the context dict as `name`, causing Jinja2 to wrap it in a tuple for its cache key, raising `TypeError: cannot use 'tuple' as a dict key (unhashable type: 'dict')` in Python 3.14. **Fix:** Updated 7 `TemplateResponse` calls across `calm.py` (6 endpoints) and `tools.py` (1 endpoint) to use the new Starlette 1.0.0 API. **Result:** `tox -e unit` passes with 3242 passed, 0 failed.
Sign in to join this conversation.
No Label seed:serve-real
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#1112