-
-
Notifications
You must be signed in to change notification settings - Fork 2
280 lines (265 loc) · 17.6 KB
/
Copy pathci.yml
File metadata and controls
280 lines (265 loc) · 17.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
name: CI
on:
push:
branches:
- main
- dev
- release/**
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- dev
- release/**
workflow_dispatch:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "true"
DOTNET_VERSION: 10.0.x
TEST_PROJECT: ".\\SharpClaw.Tests\\SharpClaw.Tests.csproj"
permissions:
contents: read
jobs:
correctness:
name: Correctness / ${{ matrix.domain }}
runs-on: windows-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- domain: API Key Provider
filter: 'FullyQualifiedName~SharpClaw.Tests.Api'
- domain: Architecture Core Dependencies
filter: 'FullyQualifiedName~SharpClaw.Tests.Architecture.CoreDependencyGuardrailTests'
- domain: Architecture Module Dependencies
filter: 'FullyQualifiedName~SharpClaw.Tests.Architecture.ModuleDependencyGuardrailTests'
- domain: Clients Finish Reasons
filter: 'FullyQualifiedName~SharpClaw.Tests.Clients'
- domain: Core Header Tags
filter: 'FullyQualifiedName~SharpClaw.Tests.Services.HeaderTagProcessorTests'
- domain: Core Chat Cache
filter: 'FullyQualifiedName~SharpClaw.Tests.Services.ChatCacheTests'
- domain: CLI Channel Commands
filter: 'FullyQualifiedName~SharpClaw.Tests.Cli.ChannelCliCommandTests'
- domain: CLI REPL
filter: 'FullyQualifiedName~SharpClaw.Tests.Cli.CliReplSmokeTests'
- domain: Gateway Abstraction Boundaries
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.GatewayAbstractionsIsolationTests'
- domain: Gateway Internal API Client
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.InternalApiClientResolutionTests'
- domain: Gateway Synthetic Modules
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.SyntheticGatewayModuleTests'
- domain: Gateway Endpoint Catalog
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.GatewayEndpointGroupCatalogTests'
- domain: Gateway Endpoint Toggles
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.GatewayEndpointToggleTests'
- domain: Gateway Route Parity
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.GatewayRouteParityTests'
- domain: Gateway Lifecycle
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.GatewayInstanceLifecycleTests'
- domain: Gateway Hot Reload
filter: 'FullyQualifiedName~SharpClaw.Tests.Gateway.HotReload.HotReloadHostManagerTests'
- domain: Gateway Chat Surface
filter: 'FullyQualifiedName~SameSpoofResponseTextMatchesCoreApiSseAndGatewaySurfaces|FullyQualifiedName~GatewaySseProxy_ForwardsRealHttpSsePath'
- domain: Gateway Chat Errors And Cancellation
filter: 'FullyQualifiedName~GatewayErrorEnvelopeShapeIsStable|FullyQualifiedName~MidStreamFailureErrorEnvelopeIsStableInSse|FullyQualifiedName~DeterministicTimeoutCancellationDoesNotLeaveExecutingJobsStuck'
- domain: API Job Contracts
filter: 'FullyQualifiedName~ApiJob'
- domain: Gateway Job Contracts
filter: 'FullyQualifiedName~GatewayJob'
- domain: Frontend Instances
filter: 'FullyQualifiedName~SharpClaw.Tests.Frontend.FrontendInstanceServiceTests'
- domain: Frontend Gateway Process
filter: 'FullyQualifiedName~SharpClaw.Tests.Frontend.GatewayProcessManagerTests'
- domain: Frontend Uno Client State
filter: 'FullyQualifiedName~SharpClaw.Tests.Frontend.UnoClientStateTests'
- domain: Persistence Provider Configuration
filter: 'FullyQualifiedName~SharpClaw.Tests.Persistence.ApiKeyEncryptorBytesTests|FullyQualifiedName~SharpClaw.Tests.Persistence.DatabaseProviderOptionsTests'
- domain: JSONColdStore Provider Paths
filter: 'FullyQualifiedName~SharpClaw.Tests.Services.AuthServiceJsonColdStoreTests|FullyQualifiedName~SharpClaw.Tests.Modules.BundledModuleStorageGatewayTests|FullyQualifiedName~SharpClaw.Tests.Modules.InProcessModuleJsonColdStoreTests|FullyQualifiedName~SharpClaw.Tests.Tasks.TaskExecutionLifecycleTests.ScheduledJobWorker'
- domain: Persistence Instances
filter: 'FullyQualifiedName~SharpClaw.Tests.Persistence.SharpClawInstanceLifecycleTests|FullyQualifiedName~SharpClaw.Tests.Persistence.SharpClawInstancePathsTests'
- domain: Providers Capabilities
filter: 'FullyQualifiedName~SharpClaw.Tests.Providers.CapabilityResolverTests'
- domain: LlamaSharp Schema Conversion
filter: 'FullyQualifiedName~SharpClaw.Tests.Providers.LlamaSharp.LlamaSharpRegexToGrammarTests|FullyQualifiedName~SharpClaw.Tests.Providers.LlamaSharp.LlamaSharpStringFormatGrammarsTests'
- domain: LlamaSharp Tool Calling
filter: 'FullyQualifiedName~SharpClaw.Tests.Providers.LlamaSharp.LlamaSharpToolGrammarShapeTests|FullyQualifiedName~SharpClaw.Tests.Providers.LlamaSharp.LlamaSharpToolPromptBuilderTests'
- domain: Tasks Scripts Compiler Parser
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskScriptCompilerTests|FullyQualifiedName~SharpClaw.Tests.Tasks.TaskScriptParserTests'
- domain: Tasks Scripts Semantics Validator
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskScriptSemanticsTests|FullyQualifiedName~SharpClaw.Tests.Tasks.TaskScriptValidatorTests'
- domain: Tasks Step Keys
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskStepKeyAssignmentTests'
- domain: Tasks Execution Lifecycle
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskExecutionLifecycleTests'
- domain: Tasks Shared Data
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskSharedDataStoreTests'
- domain: Tasks Triggers
filter: 'FullyQualifiedName~SharpClaw.Tests.Tasks.TaskTriggerAttributeParserTests'
- domain: Chat Prompt Surface
filter: 'FullyQualifiedName~AllDynamicChatFeaturesDisabled|FullyQualifiedName~HeaderExpansionSwitches|FullyQualifiedName~ModuleHeaderTagContext'
- domain: Chat Tool Permissions
filter: 'FullyQualifiedName~PermissionDeniedInlineTool|FullyQualifiedName~PermissionGrantedInlineTool|FullyQualifiedName~PermissionDeniedJobTool|FullyQualifiedName~PermissionGrantedJobTool'
- domain: Chat Costs And Budgets
filter: 'FullyQualifiedName~CachedCostHotPath|FullyQualifiedName~NonStreamingChatMeetsHardProviderPlusOverheadBudget|FullyQualifiedName~StreamingChatAndSseForwardingMeetHardProviderPlusOverheadBudget|FullyQualifiedName~BudgetHelperFailsAtOneMillisecondOverBudget'
- domain: Chat Thread History
filter: 'FullyQualifiedName~ThreadedChatSendsNewestHistory|FullyQualifiedName~ThreadedChatDefaultHistoryLimit|FullyQualifiedName~ThreadedChatCharacterLimit'
- domain: Chat Thread Concurrency
filter: 'FullyQualifiedName~SameThreadConcurrentSends|FullyQualifiedName~DifferentThreadConcurrentSends|FullyQualifiedName~CancelledThreadedSend'
- domain: Chat Agent Selection
filter: 'FullyQualifiedName~RequestedAllowedAgent|FullyQualifiedName~RequestedDisallowedAgent'
- domain: Chat Prompt Assembly
filter: 'FullyQualifiedName~TestHarnessPromptAssemblyExpandedTests'
- domain: Chat Streaming
filter: 'FullyQualifiedName~TestHarnessStreamingCorrectnessTests'
- domain: Jobs Direct
filter: 'FullyQualifiedName~DirectJobSubmissionCompletes|FullyQualifiedName~DirectJobDetailAndLifecycleActionsReuseCachedLogs|FullyQualifiedName~DirectJobDeniedStops|FullyQualifiedName~DirectJobAwaitingApproval|FullyQualifiedName~DirectJobApprovalDenies|FullyQualifiedName~DirectJobFailure'
- domain: Jobs Lifecycle
filter: 'FullyQualifiedName~LongRunningDirectJobPauseResumeStopAndCompletedCancelAreStable'
- domain: Jobs Streaming
filter: 'FullyQualifiedName~DirectStreamingJobToolConcatenatesChunksIntoResult'
- domain: Tools Inline Permissions
filter: 'FullyQualifiedName~AllowedInlineModuleTool|FullyQualifiedName~DeniedInlineModuleTool|FullyQualifiedName~ToolPermissionDoesNotStayCached|FullyQualifiedName~JobToolAliasUsesCanonicalPermissionDescriptor'
- domain: Tools Arguments Output And Latency
filter: 'FullyQualifiedName~MalformedToolArgumentsProduceStableError|FullyQualifiedName~LargeToolOutputIsBounded|FullyQualifiedName~ToolLatencyIsMeasuredSeparately'
- domain: Tools Provider Stream Bulk
filter: 'FullyQualifiedName~ProviderStream_100ToolCalls_CorrectnessVariants|FullyQualifiedName~ProviderStream_100MixedToolCalls|FullyQualifiedName~ProviderStream_100ToolCalls_MalformedArguments'
- domain: Tools Provider Stream Cache
filter: 'FullyQualifiedName~ProviderStream_RepeatedToolCalls_RolePermissionRemovalInvalidatesWarmPath|FullyQualifiedName~ProviderStream_RepeatedToolCalls_RolePermissionGrantInvalidatesWarmPath'
- domain: Tools Provider Stream Lifecycle
filter: 'FullyQualifiedName~ProviderStream_ModuleLifecycle|FullyQualifiedName~ProviderStream_TextBeforeToolsAndTextAfterTools|FullyQualifiedName~ProviderStream_CancelAfterToolCalls|FullyQualifiedName~ProviderStream_ToolNameVariants'
- domain: Costs Job Accounting
filter: 'FullyQualifiedName~JobCostIsNonNull|FullyQualifiedName~FailedJobCostBehavior|FullyQualifiedName~SharpClaw.Tests.Services.AgentJobTokenAccountingTests.WhenCurrentExecutionRecordsTokens'
- domain: Costs Streaming
filter: 'FullyQualifiedName~StreamingCostReportedOnlyAtEnd'
- domain: Costs Multi Agent
filter: 'FullyQualifiedName~MultipleAgentsInOneChannelDoNotCrossContaminateCosts'
- domain: Costs Module Hooks
filter: 'FullyQualifiedName~CustomModuleCostHookAddsUsage|FullyQualifiedName~SharpClaw.Tests.Services.AgentJobTokenAccountingTests.WhenModuleCostTrackerRecordsTokens'
- domain: Cache Header Invalidations
filter: 'FullyQualifiedName~ChannelMutationInvalidates|FullyQualifiedName~AgentMutationInvalidates|FullyQualifiedName~ThreadLimitUpdateInvalidates|FullyQualifiedName~DefaultResourceMutationInvalidates'
- domain: Cache Tool Settings
filter: 'FullyQualifiedName~EffectiveToolDefinitionsStayWarmUntilAgentToolSettingsChange'
- domain: Agent Orchestration Access
filter: 'FullyQualifiedName~ListAccessibleThreadsScales|FullyQualifiedName~AdminIndependentCanList|FullyQualifiedName~NonAdminDoubleGate|FullyQualifiedName~PrimaryAgentAndAllowedAgents|FullyQualifiedName~DisabledAccessibleThreadsHeader'
- domain: Agent Orchestration History
filter: 'FullyQualifiedName~ReadThreadHistoryHandles'
- domain: Defaults Mutations
filter: 'FullyQualifiedName~ChannelDefaultsClear|FullyQualifiedName~ContextDefaultsClear|FullyQualifiedName~ClearingCoreAgentDefault|FullyQualifiedName~SetClearSetSameDefaultKey|FullyQualifiedName~UnknownDefaultKeyClear|FullyQualifiedName~ModuleDefinedDefaultResourceKeyCannotShadow'
- domain: Defaults Resource Resolution
filter: 'FullyQualifiedName~PerResourceJob'
- domain: Module API Host Startup
filter: 'FullyQualifiedName~SharpClaw.Tests.Modules.ApiHostStartupTests|FullyQualifiedName~SharpClaw.Tests.Logging.SessionLogWriterTests'
- domain: Module Bundled Outputs
filter: 'FullyQualifiedName~SharpClaw.Tests.Modules.BundledModuleOutputTests'
- domain: Module External Lifecycle
filter: 'FullyQualifiedName~SharpClaw.Tests.Modules.SyntheticExternalModuleLifecycleTests'
- domain: Module Foreign Runtime
filter: 'FullyQualifiedName~SharpClaw.Tests.Modules.ForeignModule|FullyQualifiedName~SharpClaw.Tests.Modules.JavaScriptModuleSdkTests|FullyQualifiedName~SharpClaw.Tests.Modules.PythonModuleSdkTests'
- domain: Module Sidecar Parity
filter: 'FullyQualifiedName~SharpClaw.Tests.Modules.BundledDotNetSidecarDefaultTests|FullyQualifiedName~SharpClaw.Tests.Modules.BundledTestHarnessSidecarConformanceTests|FullyQualifiedName~SharpClaw.Tests.Modules.OutOfProcessModuleHostTests|FullyQualifiedName~SharpClaw.Tests.Modules.SidecarReadinessInventoryTests'
- domain: Module Harness Integration
filter: 'FullyQualifiedName~ModuleRegistersDynamicProvidersToolsHeaderTagsAndCostFeed|FullyQualifiedName~ProviderCaptureRedactsSecretsButKeepsAssertablePromptShape'
- domain: Module Harness Cost And Matrix
filter: 'FullyQualifiedName~CostFeedUsesHarnessBehaviorAndRecordsTiming|FullyQualifiedName~ProviderMatrixScalesPastOneThousandDeterministicCases'
- domain: Module Contracts Architecture
filter: 'FullyQualifiedName~TestHarnessArchitectureTests'
- domain: Provider Registration
filter: 'FullyQualifiedName~TestHarnessProviderRegistrationTests'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout ModuleSDK test fixture
if: matrix.domain == 'Module Foreign Runtime'
uses: actions/checkout@v4
with:
repository: SharpClaw-NET/SharpClaw.ModuleSDK
path: SharpClaw.ModuleSDK
ref: main
- name: Set ModuleSDK test fixture root
if: matrix.domain == 'Module Foreign Runtime'
shell: pwsh
run: |
"SHARPCLAW_MODULESDK_ROOT=$env:GITHUB_WORKSPACE\SharpClaw.ModuleSDK" |
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
shell: pwsh
run: dotnet restore $env:TEST_PROJECT
- name: Run correctness domain
shell: pwsh
run: >
dotnet test $env:TEST_PROJECT
--configuration Release
--no-restore
--logger GitHubActions
--filter "TestCategory!=PerformanceDiagnostic&TestCategory!=PerformanceGate&(${{ matrix.filter }})"
performance:
name: Performance / ${{ matrix.domain }}
runs-on: windows-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- domain: Streaming End To End
filter: 'FullyQualifiedName~PerformanceGate_StreamingOverhead_1000ms_AllSurfaces'
- domain: Streaming API
filter: 'FullyQualifiedName~PerformanceGate_StreamingOverhead_100ms_ApiStream|FullyQualifiedName~PerformanceGate_StreamingOverhead_Large1000ChunkStream|FullyQualifiedName~PerformanceGate_StreamingOverhead_ApiSse1000TinyChunks'
- domain: Streaming Gateway
filter: 'FullyQualifiedName~PerformanceGate_StreamingOverhead_GatewaySseProxy1000TinyChunks'
- domain: Streaming Concurrency
filter: 'FullyQualifiedName~PerformanceGate_TenConcurrentStreams'
- domain: Chat Non Streaming
filter: 'FullyQualifiedName~PerformanceGate_NonStreamingOverhead'
- domain: Chat Concurrent Throughput
filter: 'FullyQualifiedName~PerformanceGate_FiftyConcurrentShortChats'
- domain: Chat Sequential Warm Cache
filter: 'FullyQualifiedName~PerformanceGate_OneHundredSequentialWarmCacheChats'
- domain: Jobs Direct Actions
filter: 'FullyQualifiedName~PerformanceGate_DirectJobAllowedWarmNoOp|FullyQualifiedName~PerformanceGate_DirectJobDeniedWarmNoOp'
- domain: Jobs Summaries
filter: 'FullyQualifiedName~PerformanceGate_DirectJobSummaries|FullyQualifiedName~PerformanceGate_DirectJobDetailHotLogs'
- domain: Jobs Parallel
filter: 'FullyQualifiedName~PerformanceGate_DirectJob_TwentyParallelAllowedNoOpJobs'
- domain: Tools Permission Checks
filter: 'FullyQualifiedName~PerformanceGate_InlineToolPermissionCheck'
- domain: Tools Provider Stream Serial
filter: 'FullyQualifiedName~PerformanceGate_ProviderStream_100AllowedNoOpToolCalls|FullyQualifiedName~PerformanceGate_ProviderStream_100DeniedToolCalls'
- domain: Tools Provider Stream Parallel
filter: 'FullyQualifiedName~PerformanceGate_ProviderStream_10ParallelChatsEachWith100AllowedToolCalls|FullyQualifiedName~PerformanceGate_ProviderStream_10ParallelChatsEachWith100DeniedToolCalls'
- domain: Accessible Threads
filter: 'FullyQualifiedName~PerformanceGate_AccessibleThreads'
- domain: Prompt Assembly
filter: 'FullyQualifiedName~PerformanceGate_PromptAssembly'
- domain: Cost Lookup
filter: 'FullyQualifiedName~PerformanceGate_CostLookup'
- domain: Provider Resolution
filter: 'FullyQualifiedName~PerformanceGate_ProviderResolution'
- domain: Cold Chat Cache
filter: 'FullyQualifiedName~PerformanceGate_ColdChatAfterCacheClear'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
shell: pwsh
run: dotnet restore $env:TEST_PROJECT
# Require this check in GitHub branch protection. It is the blocking
# performance signal; diagnostic tiers remain local opt-in tests.
- name: Run performance domain
shell: pwsh
run: >
dotnet test $env:TEST_PROJECT
--configuration Release
--no-restore
--logger GitHubActions
--filter "TestCategory=PerformanceGate&(${{ matrix.filter }})"