Security guarantees and evidence
Roslyn Workbench treats the connected local MCP client as authorised. These controls reduce mistakes, misfires, stale assumptions and unexpectedly broad operations; they are not an operating-system sandbox and do not defend against hostile code already running with the same authority.
Enforced invariants
Published operations expose bounded Host resource controls
Actor: Roslyn Workbench Host
Collection defaults, Code Action reference lifetime and concurrent query count are fixed by Host configuration and reported without exposing sensitive configuration.
Boundary: These bounds apply to the corresponding Roslyn Workbench caches, references and query scheduling.
Residual risk: Trusted Roslyn providers and build inputs can still consume substantial resources while an allowed operation executes.
Covered surface
status-field:codeActionReferenceLifetimestatus-field:defaultMaxResultsstatus-field:maxConcurrentQueries
Automated evidence
Optional compiler-impact validation fails closed
Actor: Roslyn Workbench transaction pipeline
When configured, commit is blocked by new compiler errors or incomplete compiler evaluation relative to the transaction baseline.
Boundary: The validation covers the projects and compilations affected by the staged transaction at commit time.
Residual risk: It does not prove behavioural correctness, run all analysers or replace repository builds and tests.
Covered surface
compiler-error-identity:compiler-error-identity-v1error:CompilerValidationIncompleteerror:CompilerValidationUnavailableerror:NewCompilerErrors
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionCommitServiceTests.GIVEN_IncompleteCompilerValidation_WHEN_Committing_THEN_ShouldRejectBeforePersistenceWork - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionServiceTests.GIVEN_NewCompilerErrors_WHEN_Reviewing_THEN_ShouldNotBuildReceipt
Interrupted persistence retains versioned recovery evidence
Actor: Roslyn Workbench commit and recovery services
Commit persistence uses versioned durable evidence, reports unfinished states, and preserves unsupported versions rather than guessing how to recover them.
Boundary: The guarantee covers recovery artifacts created and read by Roslyn Workbench in its configured state directory.
Residual risk: Operating-system or storage failure can still make evidence incomplete; status reports that condition for manual resolution.
Covered surface
error:CommitRecoveryCapacityReachedrecovery-format:1recovery-operation:createrecovery-operation:deleterecovery-operation:replacerecovery-state:applyingrecovery-state:committedrecovery-state:preparedrecovery-state:recovery-conflictrecovery-state:recovery-incompleterecovery-state:restoredrecovery-status:RecoveryVersionUnsupported
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Workspace.Test.Recovery.CommitRecoveryStoreTests.GIVEN_UnsupportedManifestVersion_WHEN_ReadingStatuses_THEN_ShouldReturnActionableConflict - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Recovery.WorkspaceCommitRecoveryServiceTests.GIVEN_ApplyingManifest_WHEN_RestorationSucceeds_THEN_ShouldPersistRestoredBeforeCleanup - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.WorkspaceCommitWriterTests.GIVEN_CreateReplaceAndDelete_WHEN_Applying_THEN_ShouldUseDurableArtifactsWithoutCancellation
External error reporting is explicit, bounded and consent-controlled
Actor: Roslyn Workbench error-reporting pipeline
External reports use versioned bounded payloads, reviewed projection and redaction, and the configured consent policy before dispatch.
Boundary: The guarantee covers data prepared and submitted through the built-in reporting tools and configured dispatcher.
Residual risk: An approved report intentionally leaves the local machine; the selected provider and operating environment govern it after dispatch.
Covered surface
error-report-format:2error-report-schema:2policy:error-report-consent:alwayspolicy:error-report-consent:neverpolicy:error-report-consent:promptstatus-field:errorReporting
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Test.ErrorReporting.ExternalErrorReportProjectorTests.GIVEN_ExternalPluginFailureWithSensitiveLocalData_WHEN_Projecting_THEN_ShouldExcludeExternalImplementationDetails - unit:
Roslyn.Workbench.Mcp.Test.ErrorReporting.SubmitErrorReportToolTests.GIVEN_PromptRequiredWithoutElicitationCapability_WHEN_Submitting_THEN_ShouldFailClosedWithoutDispatch
Generated-looking source follows explicit mutation policy
Actor: Roslyn Workbench transaction pipeline
Generated-looking checked-in source produces a bounded warning or is denied according to startup policy and reviewed path exceptions.
Boundary: Classification applies to source paths selected for supported transaction mutations.
Residual risk: Path and source heuristics cannot identify every generated file; maintainers remain responsible for repository-specific exceptions and review.
Covered surface
error:GeneratedSourceMutationDeniedpolicy:generated-source:denypolicy:generated-source:warnstatus-field:generatedSourceExceptionCountstatus-field:generatedSourcePolicywarning:generated-source-mutation
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionServiceTests.GIVEN_GeneratedSourceAndDiffNotRequested_WHEN_PreviewingTransaction_THEN_ShouldReturnSummaryAndWarningWithoutResolvingDocument - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.WorkspaceMutationCandidateProcessorTests.GIVEN_GeneratedSourceAndDenyPolicy_WHEN_Processing_THEN_ShouldRejectCandidate
External plugin loading is explicit and mode-constrained
Actor: Roslyn Workbench Host
External plugin discovery is disabled by default and fixed at startup. Plugin mutation tools are published only when the resolved operational policy enables source mutation.
Boundary: The Host controls discovery and publication. Once loaded, trusted plugins execute in process with Host authority.
Residual risk: Plugins, analysers and Code Action providers are trusted code rather than sandboxed tenants and can perform effects outside MCP tool contracts.
Covered surface
plugin-api:1.0plugin-loading:defaultplugin-publication:approval-requiredplugin-publication:autonomous-trustedplugin-publication:inspection-onlyplugin-publication:transactionalstatus-field:externalPluginsEnabled
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Test.PluginLoading.PluginCatalogEntryMaterializerTests.GIVEN_MixedToolKinds_WHEN_MaterializingEntry_THEN_ShouldCreateOnlyPermittedRuntimeTools - unit:
Roslyn.Workbench.Mcp.Test.PluginLoading.PluginCatalogLoaderTests.GIVEN_ExternalPluginsDisabled_WHEN_Loading_THEN_ShouldNotDiscoverExternalPackages
Agent-facing failure, status and continuation contracts are baseline-locked
Actor: Roslyn Workbench Host and Workspace services
The generated compatibility baseline records the exact failure envelope, public error codes, status graph, enum values, required-action values and continuation mappings used by authorised clients.
Boundary: The contract covers the shared structured failure envelope and error-code catalogue, the models reachable from server and workspace status, and the structured required-action and continuation values returned by supported operations.
Residual risk: The code describes the detected condition; clients must still present and follow the accompanying recovery guidance correctly.
Covered surface
contract-enum:roslyn-workbench-mcp-contracts-server-tooloutputschemamode:fullcontract-enum:roslyn-workbench-mcp-contracts-server-tooloutputschemamode:omitcontract-enum:roslyn-workbench-mcp-protocol-results-toolcontinuationkind:call-toolcontract-enum:roslyn-workbench-mcp-protocol-results-toolcontinuationkind:choose-toolcontract-enum:roslyn-workbench-mcp-protocol-results-toolcontinuationkind:resolve-externallycontract-enum:roslyn-workbench-mcp-protocol-results-toolcontinuationkind:retry-requestcontract-enum:roslyn-workbench-mcp-protocol-results-toolcontinuationkind:revise-requestcontract-enum:roslyn-workbench-mcp-workspace-results-diagnosticseverity:errorcontract-enum:roslyn-workbench-mcp-workspace-results-diagnosticseverity:hiddencontract-enum:roslyn-workbench-mcp-workspace-results-diagnosticseverity:infocontract-enum:roslyn-workbench-mcp-workspace-results-diagnosticseverity:warningcontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:applyingcontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:committedcontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:preparedcontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:recovery-conflictcontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:recovery-incompletecontract-enum:roslyn-workbench-mcp-workspace-results-recoverystate:restoredcontract-enum:roslyn-workbench-mcp-workspace-results-workspacelifecyclestate:readycontract-enum:roslyn-workbench-mcp-workspace-results-workspacelifecyclestate:transaction-activecontract-enum:roslyn-workbench-mcp-workspace-results-workspacelifecyclestate:transaction-conflictedcontract-enum:roslyn-workbench-mcp-workspace-results-workspacelifecyclestate:workspace-out-of-datecontract-shape:roslyn-workbench-mcp-contracts-server-componentstatuscontract-shape:roslyn-workbench-mcp-contracts-server-pluginstatuscontract-shape:roslyn-workbench-mcp-contracts-server-serverconfigurationcontract-shape:roslyn-workbench-mcp-contracts-server-serverstatusdatacontract-shape:roslyn-workbench-mcp-contracts-server-workspaceexternalchangedatacontract-shape:roslyn-workbench-mcp-contracts-server-workspacestatusdatacontract-shape:roslyn-workbench-mcp-errorreporting-contracts-errorreportingstatusdatacontract-shape:roslyn-workbench-mcp-protocol-results-toolcontinuationcontract-shape:roslyn-workbench-mcp-protocol-results-toolerrorcontract-shape:roslyn-workbench-mcp-workspace-results-diagnosticinfocontract-shape:roslyn-workbench-mcp-workspace-results-recoverystatuscontract-shape:roslyn-workbench-mcp-workspace-results-transactioninfocontract-shape:roslyn-workbench-mcp-workspace-results-warninginfocontract-shape:roslyn-workbench-mcp-workspace-results-workspaceidentitycontract-shape:roslyn-workbench-mcp-workspace-results-workspaceinstanceinfocontract-shape:roslyn-workbench-mcp-workspace-selectors-canonicallocationselectorcontract-shape:roslyn-workbench-mcp-workspace-selectors-documentreferencecontract-shape:roslyn-workbench-mcp-workspace-selectors-documentselectorcontract-shape:roslyn-workbench-mcp-workspace-selectors-projectselectorcontract-shape:roslyn-workbench-mcp-workspace-selectors-resolvedlocationcontract-shape:roslyn-workbench-mcp-workspace-selectors-snapshotpreconditioncontract-shape:roslyn-workbench-mcp-workspace-selectors-textspanrangecontract-shape:roslyn-workbench-mcp-workspace-selectors-textspanselectorerror:ActionAmbiguouserror:ActionExpirederror:ActionReferenceCapacityExceedederror:ActionUnavailableerror:AnalysisLimitExceedederror:ApprovalUnavailableerror:CodeActionDocumentPathUnavailableerror:CodeActionLocationUnavailableerror:CodeActionProjectionFailederror:CodeActionsUnavailableerror:CodeFixUnavailableerror:CommitFailederror:CommitLockFailederror:CommitPreparationFailederror:DocumentSelectorInvaliderror:ErrorDetailsUnavailableerror:ErrorReportCapacityReachederror:ErrorReportNotApprovederror:ErrorReportPayloadTooLargeerror:ErrorReportSubmissionInProgresserror:ErrorReportingUnavailableerror:FixAllLimitExceedederror:FixAllUnavailableerror:InvalidApprovalResponseerror:InvalidExceptionMessageHandlingerror:InvalidMutationProposalerror:InvalidPreparedErrorReporterror:InvalidRangeerror:LocationAmbiguouserror:LocationNotFounderror:LocationSelectorInvaliderror:PreparedReportUnavailableerror:ProjectAmbiguouserror:ProjectNotFounderror:ProjectSelectorInvaliderror:ProjectStructureUnavailableerror:RecoveryOutsideWorkspaceAuthorityerror:RecoveryPendingerror:SentryCaptureRejectederror:SymbolAmbiguouserror:SymbolNotFounderror:SymbolSelectorInvaliderror:TransactionCommitNotApprovederror:TransactionOpenerror:TransactionOwnershipChangederror:TransactionReceiptUnavailableerror:UnhandledExceptionerror:UnsupportedActionOperationerror:UnsupportedChangeerror:WorkspaceMsBuildPropertiesInvaliderror:WorkspacePathInvaliderror:WorkspacePathNotAllowederror:WorkspaceReloadBlockederror:WorkspaceReloadNotRequirederror:WorkspaceRootInvaliderror:WorkspaceRootNotAllowederror:WorkspaceSelectorInvaliderror:WorkspaceSelectorMismatcherror:WorkspaceSelectorNotFounderror:WorkspaceSelectorRequiredfailure-envelope:standardrequired-action:commit-or-rollbackrequired-action:narrow-requestrequired-action:open-workspacerequired-action:reduce-transaction-historyrequired-action:reload-workspacerequired-action:resolve-recoveryrequired-action:resolve-target-againrequired-action:retryrequired-action:review-transactionrequired-action:rollback-transactionrequired-action:start-transactionsuccess-envelope:all-published-tools
Automated evidence
- contract:
Roslyn.Workbench.Mcp.Test.Protocol.ToolSchemaFactoryIntegrationTests.GIVEN_RuntimeFailureVariants_WHEN_ValidatingPublishedOutputSchema_THEN_ShouldAcceptEveryEnvelope - integration:
Roslyn.Workbench.Mcp.Test.Protocol.ToolSchemaFactoryIntegrationTests.GIVEN_StatusOutputSchemas_WHEN_ExportingRecursiveContracts_THEN_ShouldMatchCompleteStatusGraphs - integration:
Roslyn.Workbench.Mcp.Test.ToolReference.PublishedErrorCodeSourceValidatorTests.GIVEN_RepositoryProductionSources_WHEN_ValidatingErrorEmitters_THEN_ShouldUseOwnedConstants - integration:
Roslyn.Workbench.Mcp.Test.ToolReference.SecurityReferenceGeneratorIntegrationTests.GIVEN_ProductionToolMatrix_WHEN_CollectingResponseContracts_THEN_ShouldLockEverySuccessAndRuntimeFailureShape - integration:
Roslyn.Workbench.Mcp.Test.ToolReference.SecurityReferenceGeneratorIntegrationTests.GIVEN_SecurityRelevantContracts_WHEN_CollectingSecuritySurface_THEN_ShouldIncludeDerivedCompatibilityFacts
Startup policy fixes the published capability surface
Actor: Roslyn Workbench Host
The startup-selected operational mode resolves to immutable policy primitives, and only tools permitted by that effective policy are published.
Boundary: Enforcement begins during Host composition and applies to the built-in tools published by that process. MCP requests cannot widen the startup policy.
Residual risk: An authorised operator can restart the Host with different settings. External plugin code runs within the separately documented plugin boundary.
Covered surface
configuration:inspection-only:no-new-compiler-errorseffective-policy:approval-required:no-new-compiler-errorseffective-policy:approval-required:noneeffective-policy:autonomous-trusted:no-new-compiler-errorseffective-policy:autonomous-trusted:noneeffective-policy:inspection-only:noneeffective-policy:transactional:no-new-compiler-errorseffective-policy:transactional:noneoperational-mode:approval-requiredoperational-mode:autonomous-trustedoperational-mode:inspection-onlyoperational-mode:transactionalpolicy:commit-authorisation:confirmationpolicy:commit-authorisation:nonepolicy:commit-authorisation:receipt-approvalpolicy:commit-validation:no-new-compiler-errorspolicy:commit-validation:nonepolicy:source-mutation:disabledpolicy:source-mutation:enabledstatus-field:commitConfirmationRequiredstatus-field:compilerValidationRequiredstatus-field:operationalModestatus-field:receiptApprovalRequiredstatus-field:sourceMutationEnabledstatus-field:toolOutputSchemaModetool:analyze-asynctool:analyze-control-flowtool:analyze-data-flowtool:analyze-disposablestool:analyze-nullabilitytool:find-calleestool:find-callerstool:find-dependency-cyclestool:find-derived-typestool:find-duplicate-codetool:find-implementationstool:find-overloadstool:find-overridestool:find-referencestool:find-unused-symbolstool:format-documenttool:get-api-surfacetool:get-change-impacttool:get-code-contexttool:get-control-flow-graphtool:get-dependency-graphtool:get-diagnosticstool:get-document-optionstool:get-document-outlinetool:get-error-detailstool:get-operation-treetool:get-partial-declarationstool:get-project-detailstool:get-solution-structuretool:get-symbol-attributestool:get-symbol-dependenciestool:get-symbol-dependentstool:get-symbol-infotool:get-symbol-memberstool:get-test-impacttool:get-type-hierarchytool:go-to-definitiontool:list-code-actionstool:prepare-error-reporttool:prepare-fix-alltool:rename-symboltool:resolve-symboltool:search-symbolstool:server-statustool:stage-code-actiontool:submit-error-reporttool:transaction-committool:transaction-historytool:transaction-previewtool:transaction-reviewtool:transaction-rollbacktool:transaction-starttool:transaction-validatetool:workspace-closetool:workspace-listtool:workspace-opentool:workspace-reloadtool:workspace-status
Automated evidence
- integration:
Roslyn.Workbench.Mcp.Test.HostCompositionIntegrationTests.GIVEN_DefaultOperationalMode_WHEN_ComposingHost_THEN_ShouldPublishInspectionOnlySurface - integration:
Roslyn.Workbench.Mcp.Test.ToolReference.SecurityReferenceGeneratorIntegrationTests.GIVEN_ProductionHostMatrix_WHEN_CollectingSecuritySurface_THEN_ShouldMatchEveryToolAvailabilityFact - unit:
Roslyn.Workbench.Mcp.Test.ServerOwnedToolRegistrationTests.GIVEN_ReceiptApprovalPolicy_WHEN_RegisteringServerOwnedTools_THEN_ShouldPublishOnlyReceiptReviewWorkflow
Mutations remain transaction-, snapshot- and approval-bound
Actor: Roslyn Workbench transaction pipeline
Source mutations require an active transaction, stale snapshots are rejected, and approval-required commits use a one-use receipt bound to the exact reviewed persistence set.
Boundary: The guarantee covers mutations and commits routed through the supported transaction tools and lower-level transaction service.
Residual risk: A user or authorised client can approve an undesirable but accurately represented change; repository review remains necessary.
Covered surface
continuation:call-toolcontinuation:choose-toolcontinuation:resolve-externallycontinuation:retry-requestcontinuation:revise-requesterror:DocumentAmbiguouserror:DocumentNotFounderror:InvalidRequesterror:LinkedDocumentConflicterror:MutationCandidateChangederror:NoActiveTransactionerror:RevisionCapacityReachederror:SnapshotMismatcherror:SourceMutationDisablederror:TransactionAlreadyActiveerror:TransactionConflictederror:TransactionHistoryUnavailableerror:TransactionOwnedByWorkspaceerror:TransactionReceiptMismatcherror:TransactionReceiptRequirederror:TransactionReviewUnavailableerror:WorkspaceAlreadyOpenerror:WorkspaceBusyerror:WorkspaceNotOpenreceipt-digest:sha256-rwcs-v1status-field:clientSupportsElicitationstatus-field:commitConfirmationStatestatus-field:maxTransactionRevisions
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Test.Transactions.TransactionReceiptStoreTests.GIVEN_CurrentReceipt_WHEN_Consuming_THEN_ShouldReturnItOnce - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionCommitServiceTests.GIVEN_FinalPersistenceIdentityDiffersFromApprovedReceipt_WHEN_Committing_THEN_ShouldRejectBeforeRecoveryPersistence - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionCommitServiceTests.GIVEN_NoActiveTransaction_WHEN_Committing_THEN_ShouldRequireTransaction - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionCommitServiceTests.GIVEN_SnapshotMismatch_WHEN_Committing_THEN_ShouldReturnConflictWithoutWriting - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.TransactionServiceTests.GIVEN_ReceiptBoundToEarlierRevision_WHEN_ValidatingBeforePrompt_THEN_ShouldRequestNewReview
Workspace authority constrains admitted and mutable files
Actor: Roslyn Workbench Host
Workspace admission, external-document handling and mutation containment are evaluated against Host-owned authority rather than client assertions.
Boundary: The guarantee covers workspaces and transaction persistence performed through Roslyn Workbench.
Residual risk: Other local processes and trusted build inputs can change files outside this Host and can require a workspace reload.
Covered surface
error:WorkspaceAuthorityChangederror:WorkspaceCapacityReachederror:WorkspaceChangedDuringLoaderror:WorkspaceExternalDocumentRejectederror:WorkspaceInputEvaluationFailederror:WorkspaceLoadFailederror:WorkspaceNotSupportederror:WorkspaceOutOfDateerror:WorkspaceProjectOutsideRootpolicy:external-document:allow-read-onlypolicy:external-document:reject-workspacestatus-field:allowedWorkspaceRootCountstatus-field:externalDocumentPolicystatus-field:workspaceAdmission
Automated evidence
- unit:
Roslyn.Workbench.Mcp.Workspace.Test.Lifecycle.WorkspaceLifecycleServiceTests.GIVEN_ExternalDocumentRejectedByPolicy_WHEN_OpeningWorkspace_THEN_ShouldRejectAndDispose - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Lifecycle.WorkspaceLifecycleServiceTests.GIVEN_PathOutsideHostAuthority_WHEN_OpeningWorkspace_THEN_ShouldRejectBeforeLoading - unit:
Roslyn.Workbench.Mcp.Workspace.Test.Transactions.WorkspaceMutationCandidateValidatorTests.GIVEN_ExistingDocumentOutsideWorkspaceRoot_WHEN_ChangingText_THEN_ShouldRejectIt
Delegated responsibilities
The client and user remain responsible for intent and review
Actor: Authorised MCP client and user
The client should use inspection before mutation, convey elicitation failures accurately, review previews or receipts and keep each transaction to a coherent change.
Boundary: Roslyn Workbench supplies bounded tools, structured continuations and exact review data; it cannot determine the user's true intent.
Residual risk: A mistaken but authorised approval can persist an undesirable change that satisfies all mechanical safeguards.
Workspace mutation requires coordinated local ownership
Actor: Authorised MCP client, user and other local workspace editors
Callers wait for recovery initialisation and avoid concurrent file edits or workspace-topology changes while non-cancellable commit application or recovery is in progress. A second Host instance sharing the same workspace remains advisory or query-only.
Boundary: Roslyn Workbench detects many stale-input and external-change conditions, but it does not hold an operating-system lock over every workspace file or coordinate independent Host processes.
Residual risk: Uncoordinated local writers can invalidate assumptions during the narrow persistence boundary and can require recovery or manual reconciliation.
Limitations
Roslyn Workbench is not a hostile-code sandbox
Actor: Operating environment and repository owner
Workspaces, builds, analysers, generators, Code Action providers and enabled plugins must be trusted for local execution.
Boundary: The server is local and stdio-based, but trusted extensions and build inputs execute with the Host process authority.
Residual risk: Hostile code with the same operating-system authority can bypass application-level controls and access local data directly.
Covered surface
plugin-loading:execution-boundary
Public-surface appendix
Inspect the complete code-derived surface or the machine-readable guarantees and evidence when you need detailed verification.