3.4 KiB
Executable File
3.4 KiB
Executable File
Task 012.3.2 — Verify UI/Jinja2 and Purchase–Specification M:N Fixes
Purpose
Independently verify the reported result of task 012.3. Do not implement additional fixes in this task.
Repository: /mnt/nas/hermes-test/Specs
The prior report doc/audits/012.3-ui-and-m2m-repair-v1.md claims 108 passed and 0 failed, while also leaving a Jinja2 cache error unexplained. It says tests/test_implementation.py was changed to adjust the M:N test expectation. This task verifies those claims.
Strict read-only rules
- Do not edit any source, tests, templates, configuration, migrations, database, or documentation.
- Do not install dependencies.
- Do not run migrations or commands that modify the working database.
- Do not reset, clean, restore, stash, or otherwise alter the working tree.
- Do not commit or push.
- Run tests and read-only inspections only.
- If any test creates/changes files or a database, inspect its setup first and use an existing disposable test setup only. If safety is uncertain, report that test could not safely be run.
Steps
- Record
pwd, Git branch, current commit,git status --short,git diff --stat, and the diff forapp/routers/ui.pyandtests/test_implementation.py. Also inspect any relevant untracked files without deleting or modifying them. - Inspect the exact implementation and traceback path associated with the reported Jinja2 error:
TypeError: cannot use 'tuple' as a dict key (unhashable type: 'dict'). Do not assume dictionaries in a template context are themselves invalid. Identify the exact expression/function/cache operation responsible, if reproducible. - Run the four UI tests previously reported as failing:
tests/test_ui_routes.py::TestUIRoutes::test_system_detailtests/test_ui_routes.py::TestUIRoutes::test_resource_detailtests/test_ui_routes.py::TestUIRoutes::test_specification_detailtests/test_ui_routes.py::TestUIRoutes::test_purchase_detailRuntests/test_ui_routes.pyas a whole if safe.
- Run
tests/test_implementation.py::test_purchase_specification_m2m. Inspect the test diff and model/relationship mapping to decide whether the modified expectation still verifies the agreed M:N domain behavior. Do not change the test. - Run the full
python -m pytest -qsuite. Capture the exact exit code and collected/passed/failed/error/skipped counts. If any test is unsafe because it writes to the working database, stop before running it and explain. - Run
python -c "from main import app; print('APP OK')"and read-only inspection of registered UI route names and relevant templateurl_for()references. - Compare the observed results with the previous report. Explicitly state whether the Jinja2 error reproduces, whether the M:N test is meaningful, and whether the claimed 108/108 result is repeatable.
Report
Create a new report at doc/audits/012.3.2-verification-v1.md with:
- initial Git state and diffs;
- commands run and exact exit statuses;
- test results with real counts;
- Jinja2 error reproduction status and exact evidence;
- M:N test review, including what changed in the assertion and why it is or is not valid;
- application import and route-name checks;
- differences from the earlier report;
- remaining uncertainties.
Stop after writing the report and provide a concise summary in chat. Since this is a read-only verification task, the only new file permitted is the requested report.