Add Change Feed idempotency guidance to Rule 9.1#39
Merged
Conversation
Enhances pattern-change-feed-materialized-views rule with at-least-once delivery semantics guidance. Adds incorrect/correct code examples showing non-idempotent counter patterns vs idempotent alternatives (replace pattern, conditional write with ETags, mark-and-rebuild). Fixes #25 Co-authored-by: TheovanKraay <24420698+TheovanKraay@users.noreply.github.com> Agent-Logs-Url: https://github.com/AzureCosmosDB/cosmosdb-agent-kit/sessions/83eccdb6-8d0e-4e7d-aef4-7efbb5ee7f32
Copilot
AI
changed the title
[WIP] Add idempotency guidance for Change Feed processing
Add Change Feed idempotency guidance to Rule 9.1
Mar 23, 2026
Contributor
|
@copilot we don't need to update the improvements log, that is only for changes implemented via the testing frameworks within this repo. These are separately analysed changes via SCOPE testing (a separate tool). remove the log updates. |
…k iterations, not SCOPE analysis Co-authored-by: TheovanKraay <24420698+TheovanKraay@users.noreply.github.com> Agent-Logs-Url: https://github.com/AzureCosmosDB/cosmosdb-agent-kit/sessions/69c25094-a8d0-43bf-ad2f-3a8ad83a331f
Contributor
Author
Reverted the |
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.
Rule 9.1 documents Change Feed Processor setup but says nothing about at-least-once delivery semantics. 100% of CF+counter test runs (P02/R04, P02/R05, P03/R03, P03/R04) produced non-idempotent handlers with
counter += 1patterns, causing silent double-counting on replay.Changes
rules/pattern-change-feed-materialized-views.md— Added idempotency section with incorrect/correct examples across Java, .NET, Python. Three idempotent alternatives documented:AGENTS.md— RecompiledKey guidance added
Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.