Files
specs/doc/tasks/012.3.2-verification-v1.md
T
2026-10-10 11:30:27 +00:00

3.4 KiB
Executable File
Raw Blame History

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

  1. Record pwd, Git branch, current commit, git status --short, git diff --stat, and the diff for app/routers/ui.py and tests/test_implementation.py. Also inspect any relevant untracked files without deleting or modifying them.
  2. 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.
  3. Run the four UI tests previously reported as failing:
    • tests/test_ui_routes.py::TestUIRoutes::test_system_detail
    • tests/test_ui_routes.py::TestUIRoutes::test_resource_detail
    • tests/test_ui_routes.py::TestUIRoutes::test_specification_detail
    • tests/test_ui_routes.py::TestUIRoutes::test_purchase_detail Run tests/test_ui_routes.py as a whole if safe.
  4. 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.
  5. Run the full python -m pytest -q suite. 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.
  6. Run python -c "from main import app; print('APP OK')" and read-only inspection of registered UI route names and relevant template url_for() references.
  7. 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.