oliver-zehentleitner / maity
clean-up: G6 tools and scripts: measure_board.py and measure_wait.py still use the paths from before the project namespace (bug)
tsk-yajn11fymc0t Done Maity Coder Claude 004
From the clean-up audit tsk-hgnbapyw7hnh (uncovered files, G6: CLI leftovers, public-page leftovers, tools and scripts), read at 9dfd4b65.
Bug. Two of the hub's measuring scripts cannot run any more: they call project routes in the one-segment form /projects/{slug}/..., which the namespace (docs/api.md §6.25) removed and which answers 404 not_found (hub/tests/test_namespace.py:104-115). measure_arenas.py was updated (/projects/owner/measure, hub/scripts/measure_arenas.py:92); these two were not. No test runs them, so nobody noticed.
1. measure_board.py asks for /projects/measure/... (bug)
- Files: hub/scripts/measure_board.py:265-270 (the four paths), :57 (
factory.project(engine, "measure")), :218 (assert response.status_code == 200). hub/tests/factory.py:175-181: a factory project lives in the namespace of the humanmaintainer. - What is wrong: the project is
maintainer/measure, the script asks for/projects/measure/tasks.... The first request gets 404 and the assert stops the run. hub/README.md:398 still tells readers to use the script. - Proposal: build the paths from the project's full name (
/projects/maintainer/measure/..., or readnamespace.full_namefor the seeded project). - Effort: S. Risk: none (a script).
2. measure_wait.py posts to /projects/measure/joins (bug)
- Files: hub/scripts/measure_wait.py:148 (
/projects/measure/joins), :169 (/projects/measure/conversations/{agent_id}/messages). The project is created by the humanowner(:143), so its full name isowner/measure. - What is wrong: the join POST gets 404;
Human.callraises and no measurement runs. - Proposal:
/projects/owner/measure/..., as measure_arenas.py:92 does. - Effort: S. Risk: none.
3. measure_wait.py's docstring numbers the checks in another order than the code (docs drift)
- Files: hub/scripts/measure_wait.py:9-16 (2 = proxy idle cut, 3 = one long-poll per credential) against :197 and :221 and the printed lines (2 = superseded, 3 = proxy).
- Proposal: renumber the docstring to match the output.
- Effort: S. Risk: none.
Proposal for all three
A cheap guard: a test marked slow (or run in hub-sqlite) that runs measure_board.py with tiny arguments (--cards 5 --members 2 --events 10 --rounds 1), as hub/tests/test_measure_arenas.py does for measure_arenas.py. Then the next path change breaks a test, not the script.
Covered elsewhere
None. Searched: measure_board, measure_wait, namespace_codemod.
Effort: 3S.