Skip to content

fix: root pytest failures#361

Open
namabeeru wants to merge 1 commit into
CraftOS-dev:devfrom
namabeeru:codex/fix-root-pytest-failures
Open

fix: root pytest failures#361
namabeeru wants to merge 1 commit into
CraftOS-dev:devfrom
namabeeru:codex/fix-root-pytest-failures

Conversation

@namabeeru

Copy link
Copy Markdown
Contributor

What

  • Limit default root pytest discovery to the maintained tests/ suite.
  • Update the router test fake LLM to accept the current generate_response_async(..., prompt_name=...) call shape.
  • Assert the session router passes ROUTE_TO_SESSION into the LLM call.

Why

Root pytest was collecting generated/template Living UI tests under app/data, which are not part of CraftBot's maintained root suite and can fail collection from the repository root. The router tests also had a stale fake LLM signature after router calls started passing prompt_name for prompt capture.

This replaces #360 with a clean branch based directly on dev; the old PR had the right file diff but included unrelated main merge commits in its PR commit list after retargeting.

How to test

  • /usr/local/bin/python3.10 -m pytest tests/test_trigger_router_and_parking.py -q -> 9 passed
  • /usr/local/bin/python3.10 -m pytest --collect-only -q -> 99/115 tests collected (16 deselected)
  • /usr/local/bin/python3.10 -m pytest -q -> 99 passed, 16 deselected
  • Root pytest loop: 20/20 successful runs, each 99 passed, 16 deselected
  • /usr/local/bin/python3.10 -m pytest app/data/living_ui_template/backend/tests -q -> 4 passed when invoked explicitly
  • /usr/local/bin/python3.10 -m ruff format --check . -> 588 files already formatted
  • /usr/local/bin/python3.10 -m ruff check . -> All checks passed!
  • /usr/local/bin/python3.10 -m compileall -q app agent_core agents decorators skills -> passed
  • /usr/local/bin/python3.10 -m py_compile tests/test_trigger_router_and_parking.py -> passed
  • git diff --check HEAD^..HEAD -> passed

Signed-off-by: namabeeru <github.body594@passmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant