Skip to content

test: cover repeated LLM span follow-ups - #90

Merged
adaamko merged 1 commit into
KRLabsOrg:mainfrom
kocaemre:followup/llm-repeated-span-instructions
Sep 7, 2026
Merged

adaamko merged 1 commit into
KRLabsOrg:mainfrom
kocaemre:followup/llm-repeated-span-instructions

Conversation

@kocaemre

Copy link
Copy Markdown
Contributor

Summary

Related issue

Follow-up to #85 after #87 was closed as superseded by #86.

Type of change

  • Bug fix
  • Feature
  • Documentation
  • Tests
  • Refactor or maintenance

Testing

  • ruff format --check lettucedetect/ lettucedetect_api/ tests/
  • ruff check lettucedetect/ lettucedetect_api/ tests/ --extend-exclude lettucedetect/integrations/
  • python -m pytest
  • Other: python -m pytest tests/test_llm_detector_pytest.py -q

Checklist

  • I kept the PR focused on one change.
  • I added or updated tests/docs when needed.
  • I checked that no secrets, API keys, or credentials are included.

Rights & sign-off (required)

  • I certify that I have the right to submit this code and that it may be
    distributed under the repository's MIT license
    (see CONTRIBUTING).

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>

@adaamko adaamko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for coming back with the follow-up — this is exactly the additive part from #87 that didn't land with #86, and it's green on top of current main (182 passed). The two new _to_spans tests pin the remaining #85 acceptance items (low-confidence reservation, single-item first-match fallback), and the response-format tests give _response_format_block its first coverage.

Two cosmetic notes, neither blocking: test_simple_response_format_requests_answer_order passes cache_file="unused" where the sibling test uses the cache_file fixture (harmless — nothing is written unless set() is called — but worth aligning in a follow-up); and since this changes the prompt text in llm.py (and so the generic judge's cache key), I'm squashing it as fix: rather than test:. Merging.

@adaamko
adaamko merged commit 4a6e758 into KRLabsOrg:main Sep 7, 2026
4 checks passed
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.

2 participants