Repository navigation
Conversation
CoralGarden52
requested review from
JohnJyong,
QuantumGhost and
laipz8200
as code owners
September 10, 2026 14:49
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-09-10 14:50:56.482520631 +0000
+++ /tmp/pyrefly_pr.txt 2026-09-10 14:50:46.214447694 +0000
@@ -1381,7 +1381,7 @@
ERROR `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
--> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:314:16
ERROR `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
- --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:707:16
+ --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:750:16
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:113:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
|
Contributor
Pyrefly Type Coverage
|
fatelei
approved these changes
Sep 11, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 11, 2026
This was referenced Sep 11, 2026
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #42157
The batch segment import task now reads uploaded CSV files with
dtype=strandkeep_default_na=False. This preserves numeric-looking values and literalNAvalues as text for both paragraph and QA imports, including leading zeros in values such as00123.No new dependency is required.
Root cause and scope
The batch task used the default Pandas type inference. Values such as
00123andNAcould become NumPy numeric or missing-value scalars, and the subsequentlen(content)call raisedTypeError.This change is limited to the batch segment import path. It is separate from #41922, which fixes the standard
CSVExtractorpath, and #38863, which addresses batch-task Redis error status handling.Validation
Before
On the pre-fix
upstream/maincommitf0d69e7b39, the same CSV:was read as:
The task-level reproduction failed with:
After
The same task-level reproduction, using the real task function and real Pandas parsing with database, storage, Redis, and vector service boundaries mocked in memory, passed with:
The direct Pandas comparison now reports:
Other checks:
pytest -q api/tests/unit_tests/core/rag/extractor/test_csv_extractor.py --no-cov: 15 passedruff check: All checks passedruff format --check: 2 files already formattedgit diff --check: passedNA, and QA answers.The container integration test was not runnable to completion locally because the current user cannot access the Docker daemon socket (
Permission deniedon/var/run/docker.sock). The production fix itself does not require Docker; this limitation only affects the repository's Testcontainers-based PostgreSQL/Redis integration fixture. CI can run the integration test in its normal container-enabled environment.Screenshots
Checklist
make lint && make type-check; targeted Ruff checks were run insteadFrom Codex.