Repository navigation
Add full-text policy input for data-plane container creation - #321
Open
Mike Krüger (mkrueger) wants to merge 1 commit into
Open
Mike Krüger (mkrueger) wants to merge 1 commit into
Mike Krüger (mkrueger) wants to merge 1 commit into
Conversation
Mike Krüger (mkrueger)
requested review from
a team
and
a balanced review from Copilot
November 30, 2026 13:44
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the container-level full-text policy support.
No open issues 🎉
What changed in this PR
Adds container-level full-text policy input to the shell’s data-plane creation workflow, covering part of #309 without changing existing containers or enabling account features.
Changes:
- Adds
--full-text-policytomkconandcreate container, accepting quoted JSON in the CLI and native JSON objects in MCP. - Validates the basic policy shape, forwards it through create-if-not-exists, and explicitly rejects ARM usage.
- Adds focused tests, localized help, and documentation distinguishing full-text policies from indexing policies.
| File | Description |
|---|---|
l10n/CosmosDBShell.json |
Updates the localization catalog with option help and errors. |
docs/mcp.md |
Documents native JSON policy input for MCP. |
docs/commands.md |
Documents CLI usage, prerequisites, and backend limitations. |
CosmosDBShell/lang/en.ftl |
Adds localized policy descriptions and validation errors. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Mcp/ToolOperations.cs |
Defines the policy schema and enforces object input. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/ICosmosResourceOperations.cs |
Extends container creation with an optional policy. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/DataPlaneCosmosResourceOperations.cs |
Applies the policy to container creation properties. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/CosmosResourceFacade.cs |
Forwards the policy to resource operations. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/ContainerFullTextPolicyInput.cs |
Parses and validates the supported policy shape. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/ArmCosmosResourceOperations.cs |
Explicitly rejects full-text policy input. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/MakeContainerCommand.cs |
Adds the option and validates it before resource calls. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/CreateCommand.cs |
Forwards the option for containers and rejects other targets. |
CosmosDBShell.Tests/ToolOperationsCallToolTests.cs |
Tests CLI/MCP forwarding and MCP input types. |
CosmosDBShell.Tests/CommandTests/ResourceCreationResultTests.cs |
Tests ARM rejection, existing-container outcomes, and service errors. |
CosmosDBShell.Tests/CommandTests/MakeContainerCommandTests.cs |
Tests rejection of malformed and unsupported policy shapes. |
Review effort: Balanced
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 7 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
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.
Add
--full-text-policytomkconandcreate containerfor data-plane connections. The CLI accepts quoted JSON, and MCP accepts a native JSON object. Both validate the input before calling Cosmos DB and pass the policy through the create-if-not-exists operation without updating existing containers. The full-text indexing policy remains a separate setting.This PR covers part of #309. It supports the basic policy shape (
defaultLanguage,fullTextPaths, and per-pathpathandlanguage), not advanced analyzer settings. ARM connections reject the option explicitly because the ARM operation is an upsert and could overwrite an existing container. This PR does not close #309.Validation: 285 targeted tests passed during implementation; all 18 full-text tests passed again during review. No live Azure or emulator validation was performed.