test(storage): align semantic processor fakes with pathlock lease and localized overview heading - #3841
Closed
huangruiteng wants to merge 1 commit into
Closed
Conversation
… localized overview heading Three stale test doubles/assertions in tests/storage fail on main at 674f5e6: - test_semantic_processor_language.py: the overview_generation template renders the section heading as '简要描述' for zh-CN and 'Brief Description' otherwise, but the test always asserted 'Brief Description', failing the zh-CN parametrization. Assert the language-appropriate heading. - test_semantic_processor_mv_vector_store.py: VikingFS.mv now acquires a pathlock lease via _async_agfs.pathlock_acquire_batch and passes the resulting lease dict through _pathlock_fs_ctx. The test left that mock auto-returning an AsyncMock, which _pathlock_fs_ctx rejects. Stub it to return a {'lease_ref': ...} dict. - test_semantic_queue_memory_dedupe.py: write_semantic_sidecars now calls VikingFS.write_file(..., lease_ref=...), but _FakeVikingFS.write_file did not accept the kwarg. Add lease_ref to the fake. Test-only changes. 74 tests across the three files pass.
Collaborator
Author
|
Closed by the Ark/LoopX community-hygiene audit: this Draft was produced from a local test sweep without an accepted upstream issue or maintainer-owned task, so it is outside the current issue-fix qualification boundary. The source branch is intentionally retained; this PR may be reopened after explicit issue qualification and a fresh competing-PR check. |
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.
Problem
Three stale test doubles/assertions in
tests/storagefail on main at674f5e60:test_semantic_processor_language.py::test_overview_generation_language_flow[zh-CN]— thesemantic/overview_generation.yamltemplate renders the section heading as简要描述forzh-CNandBrief Descriptionotherwise (template line 59), but the test always asserted"Brief Description", so thezh-CNparametrization failed whileen/japassed.test_semantic_processor_mv_vector_store.py::test_mv_canonicalizes_user_shorthand_before_vector_update—VikingFS.mvnow acquires a pathlock lease via_async_agfs.pathlock_acquire_batchand passes the resulting lease dict through_pathlock_fs_ctx. The test left that mock auto-returning anAsyncMock, which_pathlock_fs_ctxrejects withValueError: lease_ref must be a non-empty string or lease dictionary.test_semantic_queue_memory_dedupe.py::test_stale_memory_semantic_write_is_skipped—write_semantic_sidecarsnow callsVikingFS.write_file(..., lease_ref=...), but the test's_FakeVikingFS.write_filedid not accept the kwarg (TypeError: ... got an unexpected keyword argument 'lease_ref').These are the same stale-test-fake class as already-fixed #3758/#3835/#3839.
Change
Test-only:
简要描述forzh-CN).pathlock_acquire_batchto return a{'lease_ref': 'lease-1'}dict in the mv test.lease_ref=Noneto_FakeVikingFS.write_file.No product code changed.
Tests
The remaining failures under
tests/storageare covered by other open Draft PRs (#3807 openGauss update_data, #3808 qdrant caplog, #3813 mock adapter, #3777 volcengine update_data) or are environmental (bulk_upsertmissingPersistStorenative symbol).