Add changefeed triggers for summarization and memory processing#4
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Cosmos DB change feed–driven “automatic processing” for the Azure Functions pipeline (thread summaries, fact extraction, user summaries) using per-scope counter documents + threshold crossings, and updates docs/samples/tests accordingly. Also removes GitHub repo governance/automation files.
Changes:
- Implemented
on_memory_changeCosmos DB trigger + counter/threshold helpers and extracted batch-processing logic for testability. - Added unit + integration tests covering threshold logic, counter retries, and basic end-to-end counter increments.
- Expanded documentation and the demo notebook to explain/configure/validate change feed auto-processing; updated local settings template; removed CI workflow and CODEOWNERS.
Reviewed changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
azure_functions/function_app.py |
Adds change feed trigger, counter management, threshold checks, orchestration starts. |
azure_functions/activities.py |
Switches Functions’ Cosmos endpoint env var to COSMOS_DB__accountEndpoint. |
azure_functions/local.settings.json.template |
Updates template settings for change feed + endpoint key. |
agent_memory_toolkit/models.py |
Introduces counter as a new MemoryType. |
tests/unit/test_changefeed.py |
Unit tests for thresholding, counter increments, batch grouping, orchestration starts. |
tests/integration/test_changefeed_integration.py |
Live Cosmos integration test for counter creation/increment behavior. |
Docs/concepts.md |
Documents change feed automatic processing mechanics and required containers/settings. |
Docs/design_patterns.md |
Adds guidance for automatic vs on-demand processing and config knobs. |
Docs/local_testing.md |
Adds local setup/validation steps for change feed auto-processing. |
Docs/azure_testing.md |
Adds Azure app settings + validation steps for change feed auto-processing. |
Docs/README.md |
Updates doc index entries to include automatic processing coverage. |
README.md |
Updates top-level description/diagram/features list to include auto-processing. |
Samples/Demo.ipynb |
Adds change feed demo steps; clears most outputs but includes new auto-processing cells. |
.gitignore |
Adds ignores for .github/, openspec*, .pytest_cache/. |
.github/workflows/ci.yml (removed) |
Removes CI workflow. |
.github/CODEOWNERS (removed) |
Removes required reviewers configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 15 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
tests/unit/test_changefeed.py:1
- The new
FACT_EXTRACTION_EVERY_Nthreshold path (starting the orchestrator withextract_facts_only) isn’t covered by the added unit tests, while the analogous thread-summary and user-summary paths are. Add a test case that setsFACT_EXTRACTION_EVERY_N > 0, returns an(old,new)pair that crosses the facts threshold, and assertsstarter.start_newis called withextract_facts_only.
"""Unit tests for the change feed trigger helpers and batch logic in function_app.py."""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 20 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 23 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 23 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
This pull request introduces comprehensive documentation updates to cover the new automatic processing feature using Cosmos DB change feed triggers. It explains how the toolkit can now automatically process thread summaries, fact extraction, and user summaries in the background, based on configurable thresholds. The changes also provide setup instructions, troubleshooting steps, and usage examples for both local and Azure environments. Additionally, the
.github/CODEOWNERSand CI workflow files are removed.Major documentation improvements:
Docs/concepts.md,Docs/design_patterns.md,Docs/README.md) [1] [2] [3] [4] [5].Docs/local_testing.md,Docs/azure_testing.md) [1] [2] [3] [4] [5] [6] [7] [8] [9].Design pattern and usage updates:
Docs/design_patterns.md) [1] [2] [3].Project configuration and maintenance:
.github/CODEOWNERSfile, eliminating required reviewers for all changes..github/workflows/ci.ymlfile, disabling the existing GitHub Actions CI pipeline.These updates ensure users and developers can leverage the new automatic processing capabilities and have clear guidance for setup, testing, and troubleshooting.