Fix Durable user-summary extraction race (#40), add Function-app import guard (#39), and remove dead vector-dedup scaffolding - #41
Merged
Aayush Kataria (aayush3011) merged 3 commits intoAug 17, 2026
Conversation
Copilot started reviewing on behalf of
Aayush Kataria (aayush3011)
August 17, 2026 21:04
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes now-unreferenced vector distance/dedup helper code from the pipeline layer and its supporting utilities/tests, and updates integration-test docstrings to reflect the simplified retrieval behavior.
Changes:
- Deleted unused vector-distance policy helpers from
PipelineServiceandAsyncPipelineServiceand dropped their related imports. - Removed
vector_order_direction/distance_function_from_container_propertiesfrom_utilsand deleted their unit tests. - Updated integration-test helper docstrings to no longer reference the removed internal
_vector_candidatesbehavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_utils.py | Removes unit tests and imports for deleted _utils helpers. |
| tests/integration/test_full_pipeline.py | Updates docstring wording for vector-search gating helper. |
| tests/integration/test_async_full_pipeline.py | Updates docstring wording for async vector-search gating helper. |
| azure/cosmos/agent_memory/services/pipeline.py | Removes unused vector distance/dedup helper methods and related imports. |
| azure/cosmos/agent_memory/aio/services/pipeline.py | Removes unused async vector distance/dedup helper methods and related imports. |
| azure/cosmos/agent_memory/_utils.py | Removes unused vector distance helper functions/constants. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Aayush Kataria (aayush3011)
August 17, 2026 22:33
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Suppressed comments (1)
function_app/orchestrators/user_summary.py:61
- The wait-loop can exceed the configured
USER_SUMMARY_WAIT_SECONDSbudget: whennow < deadlinebutnow + poll_interval > deadline, the timer is currently scheduled past the deadline, so the orchestrator may wait longer than intended before deciding to give up. Also, readingcontext.current_utc_datetimemultiple times per iteration makes the logic harder to reason about and test (and can drift if the value changes between reads). Consider capturingnowonce per iteration and capping the timer fire-at todeadline.
while isinstance(user_summary, dict) and user_summary.get("status") == _NO_MEMORIES_YET_STATUS:
if context.current_utc_datetime >= deadline:
logger.warning(
"UserSummary no memories persisted within %ss for user=%s; skipping this "
"cadence (a later user-summary threshold will retry)",
wait_budget,
user_id,
)
return {"persisted": False, "user_summary_id": None, "skipped": _NO_MEMORIES_YET_STATUS}
yield context.create_timer(context.current_utc_datetime + timedelta(seconds=poll_interval))
user_summary = yield context.call_activity_with_retry("us_Extract", retry, extract_payload)
Aayush Kataria (aayush3011)
merged commit Aug 17, 2026
04e0b2e
into
AzureCosmosDB:main
8 checks passed
This was referenced Aug 17, 2026
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.
No description provided.