Skip to content

Add transactional batch rule#190

Open
avinashkamat48 wants to merge 1 commit into
AzureCosmosDB:mainfrom
avinashkamat48:codex/sdk-transactional-batch
Open

Add transactional batch rule#190
avinashkamat48 wants to merge 1 commit into
AzureCosmosDB:mainfrom
avinashkamat48:codex/sdk-transactional-batch

Conversation

@avinashkamat48

Copy link
Copy Markdown

Summary

  • add a Cosmos DB SDK rule for transactional batch operations
  • document same-partition atomicity and batch size boundaries

Verification

  • git diff --check

Closes #168

@TheovanKraay TheovanKraay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this one! Transactional batch isn't covered by any existing rule, so this fills a real gap. A few things needed before it's mergeable:

  1. Missing eval task. Please add a task file in tasks.
  2. Missing AGENTS.md rebuild. Run npm run build and commit the updated AGENTS.md.
  3. Duplicate heading. Remove the ## Use Transactional Batch... heading from the rule body (compile.js generates a numbered heading automatically).
  4. Rule content could be stronger. It would be great to mention the batch limits (100 operations, 2 MB total payload) and the importance of checking individual operation results via response.GetOperationResultAtIndex(), since the batch can return 200 overall but have individual failures.

One more thing: we recently merged a skill split (#204) that added topic-specific skills alongside the monolith. We're in a transitional phase where both coexist while we evaluate whether agent routing can handle the split on its own. Until that's resolved, new rules need to live in both places. Since this is an sdk- prefixed rule, please copy skills/cosmosdb-best-practices/rules/sdk-transactional-batch.md to skills/cosmosdb-sdk/rules/sdk-transactional-batch.md and then run npm run build to regenerate AGENTS.md for both skills.

Thanks again for the contribution!

@jaydestro

Copy link
Copy Markdown
Contributor

@avinashkamat48 there are some ongoing changes being evaluated to the structure that could require this to be modified. you'll definetely get notice when it's time to make any changes to avoid merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Rule] Use transactional batch for atomic multi-item operations within a partition

3 participants