Skip to content

test: type-check agent state tests - #12327

Draft
KXHXK wants to merge 1 commit into
deepset-ai:mainfrom
KXHXK:test/type-check-agent-state
Draft

test: type-check agent state tests#12327
KXHXK wants to merge 1 commit into
deepset-ai:mainfrom
KXHXK:test/type-check-agent-state

Conversation

@KXHXK

@KXHXK KXHXK commented Aug 12, 2026

Copy link
Copy Markdown

Why:

Continue #10396 with a small, reviewable increment by adding the Agent state tests to the repository's mypy target.

The file had three related errors because mypy inferred the generic type parameter of merge_lists() as Never when both arguments were lists. An explicit result type supplies the intended int context without changing runtime behavior.

What:

  • add test/components/agents/test_state_class.py to the test:types mypy allowlist
  • annotate the merged list result as list[int]

How can it be used:

This runs automatically as part of the existing hatch run test:types command.

How did you test it:

  • uv run --with mypy mypy --install-types --non-interactive --cache-dir=.mypy_cache test/components/agents/test_state_class.py: no issues
  • uv run --with pytest pytest test/components/agents/test_state_class.py -q: 52 passed
  • uvx ruff check test/components/agents/test_state_class.py pyproject.toml: passed
  • uvx ruff format --check test/components/agents/test_state_class.py: passed

Before the annotation, the focused mypy command reported three errors at the merge_lists call; after the annotation it reports none.

Checklist:

  • I have read the contribution guidelines
  • I have added or updated tests where needed
  • I have run the relevant tests and quality checks
  • This is a test/type-checking-only change; no release note is needed
  • The commit includes DCO sign-off

AI assistance

Codex assisted with candidate screening, type-check diagnosis, and validation. I reviewed and understand the submitted change and all reported test results.

Signed-off-by: KXH <shepherdlaurie238@gmail.com>
@KXHXK
KXHXK requested a review from a team as a code owner August 12, 2026 20:40
@KXHXK
KXHXK requested review from sjrl and removed request for a team August 12, 2026 20:40
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@HaystackBot

Copy link
Copy Markdown
Contributor

Hi @KXHXK, thanks a lot for your contribution! 🙏

We noticed that the Contributor License Agreement (CLA) check (license/cla) hasn't passed yet, so we've temporarily moved this PR to draft and paused the review assignment.

To get your PR reviewed, please sign the CLA via the link in the license/cla check below (or in the CLA bot comment). As soon as the check turns green, this PR will automatically be marked ready for review again and a reviewer will be re-assigned.

@HaystackBot
HaystackBot removed the request for review from sjrl August 12, 2026 22:04
@HaystackBot HaystackBot added the cla-pending PR is in draft until the contributor signs the CLA label Aug 12, 2026
@HaystackBot
HaystackBot marked this pull request as draft August 12, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-pending PR is in draft until the contributor signs the CLA topic:build/distribution topic:tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants