Repository navigation
[Fabric] Add submit-only workspace capacity assignment - #3850
Closed
Amos Hersch (AmosHersch) wants to merge 2 commits into
Closed
Amos Hersch (AmosHersch) wants to merge 2 commits into
Amos Hersch (AmosHersch) wants to merge 2 commits into
Conversation
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
5 of 21 tasks
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-assign-workspace-capacity
branch
from
October 6, 2026 00:44
7dfd216 to
0efab0d
Compare
Amos Hersch (AmosHersch)
changed the base branch from
main
to
amoshersch-fabric-delete-workspace
October 6, 2026 00:45
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-assign-workspace-capacity
branch
2 times, most recently
from
October 6, 2026 12:28
ac0ab2a to
026f232
Compare
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-assign-workspace-capacity
branch
from
October 7, 2026 09:39
026f232 to
efef50c
Compare
8 of 21 tasks
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-assign-workspace-capacity
branch
from
October 7, 2026 11:49
efef50c to
07a5d88
Compare
Amos Hersch (AmosHersch)
marked this pull request as ready for review
October 7, 2026 12:53
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the documented API contract and includes complete registration, serialization, safety, documentation, and offline test coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds the Fabric core_assign-workspace-to-capacity tool for submit-only capacity assignment.
Changes:
- Implements validated, single-request assignment with a typed pending receipt.
- Registers the tool and adds comprehensive offline coverage.
- Updates Fabric documentation, prompts, and changelog.
| File | Description |
|---|---|
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/WorkspaceUpdateToolRegistrationTests.cs |
Extends read-only filtering assertions. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/WorkspaceCreateToolRegistrationTests.cs |
Updates expected tool discovery. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/WorkspaceAssignToCapacityToolRegistrationTests.cs |
Tests registration, consent, schemas, and validation. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/TestSupport/UnreadableHttpContent.cs |
Adds a response-body-read guard. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Services/WorkspaceCapacityAssignmentServiceTests.cs |
Tests HTTP, errors, cancellation, and disposal. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/README.md |
Documents assignment test coverage. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/ItemUpdateToolRegistrationTests.cs |
Extends read-only filtering assertions. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/FabricCoreSetupTests.cs |
Verifies service and command registration. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Commands/WorkspaceAssignToCapacityMcpTests.cs |
Tests MCP modes and output contracts. |
tools/Fabric.Mcp.Tools.Core/tests/Fabric.Mcp.Tools.Core.Tests/Commands/WorkspaceAssignToCapacityCommandTests.cs |
Tests command validation and errors. |
tools/Fabric.Mcp.Tools.Core/src/Services/WorkspaceCapacityAssignmentException.cs |
Adds sanitized assignment failures. |
tools/Fabric.Mcp.Tools.Core/src/Services/IFabricCoreService.cs |
Exposes the assignment operation. |
tools/Fabric.Mcp.Tools.Core/src/Services/FabricCoreService.cs |
Implements the submit-only POST. |
tools/Fabric.Mcp.Tools.Core/src/Options/WorkspaceAssignToCapacityOptions.cs |
Defines required identifiers. |
tools/Fabric.Mcp.Tools.Core/src/Models/WorkspaceAssignToCapacityCommandResult.cs |
Defines the pending receipt. |
tools/Fabric.Mcp.Tools.Core/src/Models/CoreJsonContext.cs |
Registers source-generated JSON models. |
tools/Fabric.Mcp.Tools.Core/src/Models/AssignWorkspaceToCapacityRequest.cs |
Defines the API request body. |
tools/Fabric.Mcp.Tools.Core/src/FabricCoreSetup.cs |
Registers and exposes the command. |
tools/Fabric.Mcp.Tools.Core/src/Commands/WorkspaceAssignToCapacityCommand.cs |
Implements command behavior and metadata. |
servers/Fabric.Mcp.Server/tests/Fabric.Mcp.Server.Tests/Infrastructure/ServerStartupTests.cs |
Verifies host discovery and annotations. |
servers/Fabric.Mcp.Server/README.md |
Documents assignment usage and limitations. |
servers/Fabric.Mcp.Server/docs/e2eTestPrompts.md |
Adds tool-selection prompts. |
servers/Fabric.Mcp.Server/changelog-entries/amhersch-fabric-assign-workspace-capacity.yaml |
Records the new feature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
KupoCat
approved these changes
Oct 8, 2026
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Amos Hersch (AmosHersch)
force-pushed
the
amoshersch-fabric-assign-workspace-capacity
branch
from
October 8, 2026 08:29
07a5d88 to
23ea021
Compare
9 of 21 tasks
Contributor
Author
|
Superseded by #3887, which has merged into |
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.
What does this PR do?
Adds only
core_assign-workspace-to-capacityrelative to its immediate parent, #3847 (Delete Workspace). This existing draft is the final tool layer of the conflict-prevention chain; its base isamoshersch-fabric-delete-workspaceat83da05281e680f9716b1408f710a8a0aa308d8da, with ultimate targetmain.Uses the documented Assign To Capacity API: validates both required, nonempty GUIDs before authentication, then sends exactly one application-level body-bearing POST. Only 202 Accepted produces the typed receipt containing the requested workspace/capacity IDs,
accepted: true, andstate: "Pending". The capacity ID is the requested target, not a verified current assignment. Acceptance never means completion.No polling, operation handle, automatic retry, preflight, follow-up request, fallback capacity, workspace creation, or capacity lifecycle operation is added. The response body is not required or read, even when Location/operation headers appear. Later inspection through Get Workspace remains caller-driven; assignment does not invoke that tool.
Stack adaptation
SendFabricHttpRequestAsynchelper with explicitResponseHeadersReadand named cancellation propagation. The inherited post-credential cancellation check andIAzureTokenCredentialProvider -> ProviderDelegatingCredential -> TokenCredential -> Fabric Corebridge remain unchanged.longseconds and ignores dates. The original BCL parsing limits still apply; the local projection is retained because the shared helper rejects multiple headers that the original typed getter can accept. Boundary/date/multiple-header regressions cover this distinction.FabricCoreHttpMessageHandler, retainsUnreadableHttpContent, and preserves every predecessor operation suite and Delete Item's explicit-value/repetition guard.The verified bottom-to-top ancestry is #3854, #3855, #3846, #3852, #3841, #3842, #3843, #3853, #3851, #3849, #3848, #3847, #3850. No
core_get-itemis introduced; #3701 remains separate. This session did not register native stack metadata or merge any PR.Final head:
0efab0df92cf1cb1f7adac94dc533f4114ed4326. Layer-relative delta: two commits, 23 files. The original single tool commit was rebased onto the frozen parent; the second commit formats the new registration coverage.Cumulative validation
All results below cover the combined inherited stack and assignment, not just the original independent branch.
dotnet build tools\Fabric.Mcp.Tools.Core\src --nologo --verbosity quietdotnet build tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests --nologo --verbosity quiet -m:1 -nr:falsedotnet build servers\Fabric.Mcp.Server\src --nologo --verbosity quiet -m:1 -nr:falsedotnet build servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests --nologo --verbosity quiet -m:1 -nr:falsedotnet build tools\Fabric.Mcp.Tools.DataFactory\tests\Fabric.Mcp.Tools.DataFactory.Tests --nologo --verbosity quiet -m:1 -nr:falsedotnet test --project tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj --no-builddotnet test --project servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj --no-builddotnet test --project tools\Fabric.Mcp.Tools.DataFactory\tests\Fabric.Mcp.Tools.DataFactory.Tests\Fabric.Mcp.Tools.DataFactory.Tests.csproj --no-build --filter-class '*ProviderDelegatingCredentialTests'dotnet format tools\Fabric.Mcp.Tools.Core\src\Fabric.Mcp.Tools.Core.csproj --no-restore --verify-no-changes --include $sourceFiles --verbosity quietdotnet format tools\Fabric.Mcp.Tools.Core\tests\Fabric.Mcp.Tools.Core.Tests\Fabric.Mcp.Tools.Core.Tests.csproj --no-restore --verify-no-changes --include $testFiles --verbosity quietdotnet format servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Fabric.Mcp.Server.Tests.csproj --no-restore --verify-no-changes --include servers\Fabric.Mcp.Server\tests\Fabric.Mcp.Server.Tests\Infrastructure\ServerStartupTests.cs --verbosity quiet.\eng\common\spelling\Invoke-Cspell.ps1 -FileList $files -PackageInstallCache '.work\assignment-stack-cspell'.\eng\scripts\Process-PackageReadMe.ps1 -Command validate -InputReadMePath 'servers\Fabric.Mcp.Server\README.md'.\eng\scripts\Test-ToolSelectionPrompts.ps1 -ServerName Fabric.Mcp.Server -OutputPath '.work\assignment-stack-prompt-validation'.\servers\Fabric.Mcp.Server\src\bin\Debug\fabmcp.exe tools list --name-onlygit merge-tree --write-tree --name-only --messages 0fa879ecf7c51946fa17e73304e468558c351b6c 0efab0df92cf1cb1f7adac94dc533f4114ed4326git diff --check 83da05281e680f9716b1408f710a8a0aa308d8da HEADFile selections are layer-relative:
An initial parallel-worker host build encountered MSB4166. The scoped retry with
-m:1 -nr:falsepassed without code/configuration changes. All inherited named command/service/MCP suites remain present; coverage was not reduced to obtain these totals. Registered checks cover the 13 Core names, input/output schemas, six-tool read-only set, assignment consent rejection before authentication, and accepted/pending behavior in output modes.Evidence limits and CI
No actual Fabric assignment or other resource operation was executed. API tests use fake credentials/HTTP or substituted services. Host discovery tests exercise only local stdio/HTTP metadata enumeration, not real Fabric permissions or OBO. No live/recorded infrastructure was added; live service, real OBO/RBAC, service-principal/managed-identity permissions, and playback remain unexercised. Broad native/NPX builds and repository-wide tests were not run; the scoped prompt-validator publish is not a native-AOT claim.
ToolDescriptionEvaluator: not run; maintainer exemption. The Fabric MCP maintainer has waived the score/ranking requirement for this PR. Configuration is unavailable; no score or top-three ranking is claimed. The checkbox remains unchecked because the evaluator was not run. Normal code review and required CI still apply.
Required CI still applies; local results do not claim a green merge gate. The post-retarget snapshot showed SpellCheck and license/cla successful, Verify Links in progress, and the Azure Pipelines aggregate queued with Initialize/SDL Sources subchecks cancelled. Consult the current linked checks for subsequent state; no CI bypass or automatic merge was requested.
The Azure-only checklist items and Azure consolidated-tools registration do not apply to this Fabric-only layer; Fabric uses
NullConsolidatedToolDefinitionProvider. No tool is renamed.GitHub issue number?
N/A. User-requested tool addition and in-place stack adaptation; no issue was created. Immediate PR dependency: #3847, ultimate target
main.Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts - Not run; score/ranking requirement waived for this PR by the Fabric MCP maintainer.consolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test PipelineInvoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess to the repo need to validate the contents of this PR before leaving a comment with the text/azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.