[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B8EEMW9QSCV3XPKH2D3T5":3,"skill-same:01M69B8EEMW9QSCV3XPKH2D3T5":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M69B8EEMW9QSCV3XPKH2D3T5","accordant-troubleshooting","Accordant 规格故障排查","Common mistakes and debugging tips for Accordant specs - use this skill when tests fail unexpectedly or specs don't behave as expected","Accordant 规格的常见错误与调试技巧——当测试意外失败或规格行为不符合预期时使用","microsoft\u002Faccordant","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69B7QH8ZN957JJZVX9SAHW6",70,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Ftroubleshooting\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRSRYQ3M8N5063NNQPF2B1","调试与故障排查","SCENARIO","使用场景",[31,32],"accordant troubleshooting","debugging","2026-11-10 10:12:30",false,"---\nname: accordant-troubleshooting\ndescription: Common mistakes and debugging tips for Accordant specs - use this skill when tests fail unexpectedly or specs don't behave as expected\n---\n\n# Troubleshooting Accordant\n\nThis skill covers common mistakes, debugging techniques, and how to fix typical issues.\n\n## Test Failures\n\n### \"No matching expected outcome\"\n\nThe response doesn't match any `Expect.That()` predicate.\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Check what the spec expects vs what you got\nvar (isValid, message, _) = spec.Allows(operation, request, actualResponse, stateProfile);\nConsole.WriteLine(message);  \u002F\u002F Shows which expectation failed and why\n```\n\n**Common causes:**\n1. **Predicate too strict**: Response has extra fields or slightly different values\n2. **Wrong state**: The spec thinks it's in state A, but the system is in state B\n3. **Missing error case**: You didn't handle an error condition in Apply\n\n**Fix:**\n```csharp\n\u002F\u002F Add explanation to predicates for better debugging\nExpect.That\u003CApiResult\u003CUser>>(\n    r => r.IsSuccess && r.Data.Name == expectedName,\n    $\"Expected success with name '{expectedName}', got status={r?.StatusCode}, name='{r?.Data?.Name}'\")\n```\n\n### \"State mismatch after operation\"\n\nTracked state diverges from actual system state.\n\n**Common causes:**\n1. **Forgot to reset state**: Previous test left data behind\n2. **Missing ThenState**: Operation modifies state but spec uses `.SameState()`\n3. **Wrong state update**: ThenState modifies wrong fields\n\n**Fix:**\n```csharp\n\u002F\u002F Ensure BeforeEachAsync properly resets\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    BeforeEachAsync = async _ =>\n    {\n        \u002F\u002F Actually verify reset worked\n        await client.DeleteAll();\n        var count = await client.GetCount();\n        if (count != 0) throw new Exception(\"Reset failed!\");\n    }\n});\n```\n\n### Tests Pass Individually, Fail in Sequence\n\n**Common causes:**\n1. **Shared mutable state** in test fixtures\n2. **Incomplete reset** between tests\n3. **Timing issues** with async operations\n\n**Fix:**\n```csharp\n\u002F\u002F Create fresh client for each test\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    BeforeEachAsync = async ctx =>\n    {\n        \u002F\u002F Fresh client, fresh start\n        var httpClient = _factory.CreateClient();\n        ctx.Context.Register(new ApiClient(httpClient));\n        await ResetDatabase();\n    }\n});\n```\n\n## State Issues\n\n### Modifying Original State\n\n```csharp\n\u002F\u002F ❌ WRONG - modifying original state\nspec.Operation\u003Cstring, ApiResult\u003Cdecimal>>(\"Deposit\", (accountId, state) =>\n{\n    state.Accounts[accountId] += 100;  \u002F\u002F BAD! Modifies original\n    return Expect.That(...).SameState();  \u002F\u002F State already corrupted\n});\n\n\u002F\u002F ✅ CORRECT - modify the clone in ThenState\nspec.Operation\u003Cstring, ApiResult\u003Cdecimal>>(\"Deposit\", (accountId, state) =>\n{\n    var newBalance = state.Accounts[accountId] + 100;\n    return Expect.That\u003CApiResult\u003Cdecimal>>(r => r.Data == newBalance)\n           .ThenState\u003CBankState>(nextState => nextState.Accounts[accountId] = newBalance);\n});\n```\n\n### State Class Missing [State] Attribute\n\n```csharp\n\u002F\u002F ❌ Won't work - no cloning\u002Fequality support\npublic class BankState\n{\n    public Dictionary\u003Cstring, decimal> Accounts { get; set; }\n}\n\n\u002F\u002F ✅ Add [State] attribute\n[State]\npublic partial class BankState\n{\n    public Dictionary\u003Cstring, decimal> Accounts { get; set; } = new();\n}\n```\n\n### Nested State Not Marked\n\n```csharp\n\u002F\u002F ❌ UserState isn't cloned properly\n[State]\npublic partial class AppState\n{\n    public Dictionary\u003Cstring, UserState> Users { get; set; }  \u002F\u002F UserState needs [State] too!\n}\n\npublic class UserState { ... }  \u002F\u002F Missing [State]\n\n\u002F\u002F ✅ Mark all nested state classes\n[State]\npublic partial class AppState\n{\n    public Dictionary\u003Cstring, UserState> Users { get; set; } = new();\n}\n\n[State]\npublic partial class UserState\n{\n    public string Name { get; set; } = string.Empty;\n}\n```\n\n## Execution Issues\n\n### Operations Not Bound\n\n```\nSystem.InvalidOperationException: No execution binding found for operation 'CreateAccount'\n```\n\n**Fix:**\n```csharp\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003Cdecimal>>(\"CreateAccount\",  \u002F\u002F Must match operation name exactly\n        (client, accountId) => client.CreateAccount(accountId).Result);\n```\n\n### Type Mismatch in Binding\n\n```csharp\n\u002F\u002F ❌ Wrong - request type doesn't match\nspec.Operation\u003C(string, decimal), ApiResult\u003Cdecimal>>(\"Withdraw\", ...);  \u002F\u002F Tuple\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003Cdecimal>>(\"Withdraw\", ...);  \u002F\u002F String - MISMATCH!\n\n\u002F\u002F ✅ Types must match exactly\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003C(string, decimal), ApiResult\u003Cdecimal>>(\"Withdraw\",\n        (client, req) => client.Withdraw(req.Item1, req.Item2).Result);\n```\n\n### Async\u002FAwait Issues\n\n```csharp\n\u002F\u002F ❌ Potential deadlock with .Result\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003CUser>>(\"GetUser\",\n        (client, id) => client.GetUserAsync(id).Result);  \u002F\u002F Can deadlock!\n\n\u002F\u002F ✅ Use async binding\nspec.ExecuteWith\u003CApiClient>()\n    .BindAsync\u003Cstring, ApiResult\u003CUser>>(\"GetUser\",\n        async (client, id) => await client.GetUserAsync(id));\n```\n\n## Test Generation Issues\n\n### Too Many Test Cases\n\n**Diagnosis:** Generation produces thousands of tests\n\n**Fixes:**\n```csharp\nvar options = new TestGenerationOptions\n{\n    \u002F\u002F Reduce depth\n    MaxDepth = 3,  \u002F\u002F Instead of 5\n    \n    \u002F\u002F Add state constraint\n    StateConstraint = state =>\n    {\n        var s = (AppState)state;\n        return s.Users.Count \u003C= 2 && \n               s.Users.Values.Sum(u => u.Todos.Count) \u003C= 4;\n    }\n};\n```\n\n### No Test Cases Generated\n\n**Diagnosis:** `testCases.Count == 0`\n\n**Common causes:**\n1. **Initial state doesn't allow any operation**\n2. **StateConstraint rejects initial state**\n3. **Empty InputSet**\n\n**Fix:**\n```csharp\n\u002F\u002F Verify initial state is valid\nvar initialState = new AppState();\nAssert.True(options.StateConstraint?.Invoke(initialState) ?? true, \"Initial state rejected!\");\n\n\u002F\u002F Ensure inputs aren't empty\nAssert.That(inputs.Count, Is.GreaterThan(0));\n```\n\n### State Space Explosion\n\n**Symptoms:** Generation hangs or runs out of memory\n\n**Fix:**\n```csharp\nvar options = new TestGenerationOptions\n{\n    MaxDepth = 4,\n    StateConstraint = state =>\n    {\n        var s = (AppState)state;\n        \u002F\u002F Aggressive pruning\n        return s.Items.Count \u003C= 3;\n    },\n    \u002F\u002F Or use random sampling\n    SequentialTestCaseAlgorithm = SequentialTestCaseAlgorithms.CreateRandomWalk(\n        numberOfWalks: 100,\n        maxWalkLength: 5,\n        seed: 42)\n};\n```\n\n## Concurrency Test Issues\n\n### All Concurrent Tests Fail\n\n**Common cause:** Implementation has no concurrency control — race conditions everywhere\n\n**Diagnosis:** Check if sequential tests pass first\n```csharp\n\u002F\u002F Run sequential tests first\nvar seqResults = await spec.RunTests(context, initialState, testCases);\nAssert.That(seqResults.All(r => r.Success), \"Fix sequential tests first!\");\n\n\u002F\u002F Then run concurrent\nvar concTestCases = spec.GenerateConcurrentTests(initialState, inputs, options);\nvar concResults = await spec.RunTests(context, initialState, concTestCases);\n```\n\n### Non-Deterministic Failures\n\n**Symptoms:** Same test sometimes passes, sometimes fails\n\n**Common causes:**\n1. **Race conditions** (the bug you're looking for!)\n2. **Incomplete state reset**\n3. **External system interference**\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Run same test multiple times\nfor (int i = 0; i \u003C 10; i++)\n{\n    await ResetState();\n    var concTestCases = spec.GenerateConcurrentTests(initialState, inputs, options);\n    var result = await spec.RunTests(context, initialState, concTestCases);\n    Console.WriteLine($\"Run {i}: {(result.All(r => r.Success) ? \"PASS\" : \"FAIL\")}\");\n}\n```\n\n## Async Operation Issues\n\n### Polling Never Terminates\n\n**Symptoms:** Test hangs on async operation\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Check isTerminal predicate\nvar state = GetCurrentState();\nvar isTerminal = stepFunction.IsTerminal(state);\nConsole.WriteLine($\"IsTerminal: {isTerminal}, State: {state}\");\n```\n\n**Common causes:**\n1. **isTerminal predicate is wrong** — never returns true\n2. **Background work never completes** — liveness bug\n3. **Wrong state being checked**\n\n**Fix:**\n```csharp\n.Triggers(AsyncOperation.Create\u003CJobQueueState>(\n    \u002F\u002F Make sure this actually becomes true\n    isTerminal: s => \n    {\n        var status = s.Jobs.GetValueOrDefault(jobId)?.Status;\n        Console.WriteLine($\"Checking terminal: status={status}\");\n        return status != JobStatus.Pending;\n    },\n    ...\n))\n```\n\n### State Profile Has Too Many States\n\n**Symptoms:** After async operation, many possible states tracked\n\n**This is expected!** Non-determinism means multiple outcomes are valid. Observations narrow it down.\n\n```csharp\n\u002F\u002F Observe to narrow down\nvar response = await client.GetJob(jobId);\n(_, _, stateProfile) = spec.Allows(getJobOp, jobId, response, stateProfile);\n\n\u002F\u002F State count should decrease\nConsole.WriteLine($\"Remaining possible states: {stateProfile.StatesAndStepFunctions.Count}\");\n```\n\n## Debugging Tips\n\n### Enable Detailed Logging\n\n```csharp\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    OnStepExecuted = info =>\n    {\n        foreach (var (op, req, resp) in info.Operations)\n            Console.WriteLine($\"{op.Name}({req}) → {resp}\");\n    }\n});\n```\n\n### Visualize the State Graph\n\n```csharp\nvar dot = spec.VisualizeStateSpace(initialState, inputs, options);\nFile.WriteAllText(\"debug-graph.dot\", dot);\n\u002F\u002F Run: dot -Tpng debug-graph.dot -o debug-graph.png\n```\n\n### Inspect a Single Test Case\n\n```csharp\nvar failedCase = testCases.First(tc => !results[tc].Success);\nConsole.WriteLine($\"Failed sequence:\");\nforeach (var step in failedCase.Steps)\n{\n    Console.WriteLine($\"  {step.OperationName}({step.Request})\");\n}\n```\n\n### Manually Replay a Sequence\n\n```csharp\nvar stateProfile = new StateProfile(initialState);\n\nforeach (var step in failedCase.Steps)\n{\n    Console.WriteLine($\"\\n=== {step.OperationName} ===\");\n    Console.WriteLine($\"Request: {step.Request}\");\n    Console.WriteLine($\"Current states: {stateProfile.StatesAndStepFunctions.Count}\");\n    \n    var response = await ExecuteStep(step);\n    Console.WriteLine($\"Response: {response}\");\n    \n    var (isValid, message, newProfile) = spec.Allows(step.Operation, step.Request, response, stateProfile);\n    Console.WriteLine($\"Valid: {isValid}\");\n    if (!isValid) Console.WriteLine($\"Error: {message}\");\n    \n    stateProfile = newProfile;\n}\n```\n\n## Getting Help\n\n1. **Check the samples**: `Samples\u002F` folder has working examples\n2. **Read the concepts docs**: `docs\u002Fconcepts\u002F` explains the theory\n3. **Visualize**: State graphs often reveal the problem\n4. **Simplify**: Reduce to minimal failing case\n","# Troubleshooting Accordant\n\nThis skill covers common mistakes, debugging techniques, and how to fix typical issues.\n\n## Test Failures\n\n### \"No matching expected outcome\"\n\nThe response doesn't match any `Expect.That()` predicate.\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Check what the spec expects vs what you got\nvar (isValid, message, _) = spec.Allows(operation, request, actualResponse, stateProfile);\nConsole.WriteLine(message);  \u002F\u002F Shows which expectation failed and why\n```\n\n**Common causes:**\n1. **Predicate too strict**: Response has extra fields or slightly different values\n2. **Wrong state**: The spec thinks it's in state A, but the system is in state B\n3. **Missing error case**: You didn't handle an error condition in Apply\n\n**Fix:**\n```csharp\n\u002F\u002F Add explanation to predicates for better debugging\nExpect.That\u003CApiResult\u003CUser>>(\n    r => r.IsSuccess && r.Data.Name == expectedName,\n    $\"Expected success with name '{expectedName}', got status={r?.StatusCode}, name='{r?.Data?.Name}'\")\n```\n\n### \"State mismatch after operation\"\n\nTracked state diverges from actual system state.\n\n**Common causes:**\n1. **Forgot to reset state**: Previous test left data behind\n2. **Missing ThenState**: Operation modifies state but spec uses `.SameState()`\n3. **Wrong state update**: ThenState modifies wrong fields\n\n**Fix:**\n```csharp\n\u002F\u002F Ensure BeforeEachAsync properly resets\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    BeforeEachAsync = async _ =>\n    {\n        \u002F\u002F Actually verify reset worked\n        await client.DeleteAll();\n        var count = await client.GetCount();\n        if (count != 0) throw new Exception(\"Reset failed!\");\n    }\n});\n```\n\n### Tests Pass Individually, Fail in Sequence\n\n**Common causes:**\n1. **Shared mutable state** in test fixtures\n2. **Incomplete reset** between tests\n3. **Timing issues** with async operations\n\n**Fix:**\n```csharp\n\u002F\u002F Create fresh client for each test\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    BeforeEachAsync = async ctx =>\n    {\n        \u002F\u002F Fresh client, fresh start\n        var httpClient = _factory.CreateClient();\n        ctx.Context.Register(new ApiClient(httpClient));\n        await ResetDatabase();\n    }\n});\n```\n\n## State Issues\n\n### Modifying Original State\n\n```csharp\n\u002F\u002F ❌ WRONG - modifying original state\nspec.Operation\u003Cstring, ApiResult\u003Cdecimal>>(\"Deposit\", (accountId, state) =>\n{\n    state.Accounts[accountId] += 100;  \u002F\u002F BAD! Modifies original\n    return Expect.That(...).SameState();  \u002F\u002F State already corrupted\n});\n\n\u002F\u002F ✅ CORRECT - modify the clone in ThenState\nspec.Operation\u003Cstring, ApiResult\u003Cdecimal>>(\"Deposit\", (accountId, state) =>\n{\n    var newBalance = state.Accounts[accountId] + 100;\n    return Expect.That\u003CApiResult\u003Cdecimal>>(r => r.Data == newBalance)\n           .ThenState\u003CBankState>(nextState => nextState.Accounts[accountId] = newBalance);\n});\n```\n\n### State Class Missing [State] Attribute\n\n```csharp\n\u002F\u002F ❌ Won't work - no cloning\u002Fequality support\npublic class BankState\n{\n    public Dictionary\u003Cstring, decimal> Accounts { get; set; }\n}\n\n\u002F\u002F ✅ Add [State] attribute\n[State]\npublic partial class BankState\n{\n    public Dictionary\u003Cstring, decimal> Accounts { get; set; } = new();\n}\n```\n\n### Nested State Not Marked\n\n```csharp\n\u002F\u002F ❌ UserState isn't cloned properly\n[State]\npublic partial class AppState\n{\n    public Dictionary\u003Cstring, UserState> Users { get; set; }  \u002F\u002F UserState needs [State] too!\n}\n\npublic class UserState { ... }  \u002F\u002F Missing [State]\n\n\u002F\u002F ✅ Mark all nested state classes\n[State]\npublic partial class AppState\n{\n    public Dictionary\u003Cstring, UserState> Users { get; set; } = new();\n}\n\n[State]\npublic partial class UserState\n{\n    public string Name { get; set; } = string.Empty;\n}\n```\n\n## Execution Issues\n\n### Operations Not Bound\n\n```\nSystem.InvalidOperationException: No execution binding found for operation 'CreateAccount'\n```\n\n**Fix:**\n```csharp\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003Cdecimal>>(\"CreateAccount\",  \u002F\u002F Must match operation name exactly\n        (client, accountId) => client.CreateAccount(accountId).Result);\n```\n\n### Type Mismatch in Binding\n\n```csharp\n\u002F\u002F ❌ Wrong - request type doesn't match\nspec.Operation\u003C(string, decimal), ApiResult\u003Cdecimal>>(\"Withdraw\", ...);  \u002F\u002F Tuple\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003Cdecimal>>(\"Withdraw\", ...);  \u002F\u002F String - MISMATCH!\n\n\u002F\u002F ✅ Types must match exactly\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003C(string, decimal), ApiResult\u003Cdecimal>>(\"Withdraw\",\n        (client, req) => client.Withdraw(req.Item1, req.Item2).Result);\n```\n\n### Async\u002FAwait Issues\n\n```csharp\n\u002F\u002F ❌ Potential deadlock with .Result\nspec.ExecuteWith\u003CApiClient>()\n    .Bind\u003Cstring, ApiResult\u003CUser>>(\"GetUser\",\n        (client, id) => client.GetUserAsync(id).Result);  \u002F\u002F Can deadlock!\n\n\u002F\u002F ✅ Use async binding\nspec.ExecuteWith\u003CApiClient>()\n    .BindAsync\u003Cstring, ApiResult\u003CUser>>(\"GetUser\",\n        async (client, id) => await client.GetUserAsync(id));\n```\n\n## Test Generation Issues\n\n### Too Many Test Cases\n\n**Diagnosis:** Generation produces thousands of tests\n\n**Fixes:**\n```csharp\nvar options = new TestGenerationOptions\n{\n    \u002F\u002F Reduce depth\n    MaxDepth = 3,  \u002F\u002F Instead of 5\n    \n    \u002F\u002F Add state constraint\n    StateConstraint = state =>\n    {\n        var s = (AppState)state;\n        return s.Users.Count \u003C= 2 && \n               s.Users.Values.Sum(u => u.Todos.Count) \u003C= 4;\n    }\n};\n```\n\n### No Test Cases Generated\n\n**Diagnosis:** `testCases.Count == 0`\n\n**Common causes:**\n1. **Initial state doesn't allow any operation**\n2. **StateConstraint rejects initial state**\n3. **Empty InputSet**\n\n**Fix:**\n```csharp\n\u002F\u002F Verify initial state is valid\nvar initialState = new AppState();\nAssert.True(options.StateConstraint?.Invoke(initialState) ?? true, \"Initial state rejected!\");\n\n\u002F\u002F Ensure inputs aren't empty\nAssert.That(inputs.Count, Is.GreaterThan(0));\n```\n\n### State Space Explosion\n\n**Symptoms:** Generation hangs or runs out of memory\n\n**Fix:**\n```csharp\nvar options = new TestGenerationOptions\n{\n    MaxDepth = 4,\n    StateConstraint = state =>\n    {\n        var s = (AppState)state;\n        \u002F\u002F Aggressive pruning\n        return s.Items.Count \u003C= 3;\n    },\n    \u002F\u002F Or use random sampling\n    SequentialTestCaseAlgorithm = SequentialTestCaseAlgorithms.CreateRandomWalk(\n        numberOfWalks: 100,\n        maxWalkLength: 5,\n        seed: 42)\n};\n```\n\n## Concurrency Test Issues\n\n### All Concurrent Tests Fail\n\n**Common cause:** Implementation has no concurrency control — race conditions everywhere\n\n**Diagnosis:** Check if sequential tests pass first\n```csharp\n\u002F\u002F Run sequential tests first\nvar seqResults = await spec.RunTests(context, initialState, testCases);\nAssert.That(seqResults.All(r => r.Success), \"Fix sequential tests first!\");\n\n\u002F\u002F Then run concurrent\nvar concTestCases = spec.GenerateConcurrentTests(initialState, inputs, options);\nvar concResults = await spec.RunTests(context, initialState, concTestCases);\n```\n\n### Non-Deterministic Failures\n\n**Symptoms:** Same test sometimes passes, sometimes fails\n\n**Common causes:**\n1. **Race conditions** (the bug you're looking for!)\n2. **Incomplete state reset**\n3. **External system interference**\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Run same test multiple times\nfor (int i = 0; i \u003C 10; i++)\n{\n    await ResetState();\n    var concTestCases = spec.GenerateConcurrentTests(initialState, inputs, options);\n    var result = await spec.RunTests(context, initialState, concTestCases);\n    Console.WriteLine($\"Run {i}: {(result.All(r => r.Success) ? \"PASS\" : \"FAIL\")}\");\n}\n```\n\n## Async Operation Issues\n\n### Polling Never Terminates\n\n**Symptoms:** Test hangs on async operation\n\n**Diagnosis:**\n```csharp\n\u002F\u002F Check isTerminal predicate\nvar state = GetCurrentState();\nvar isTerminal = stepFunction.IsTerminal(state);\nConsole.WriteLine($\"IsTerminal: {isTerminal}, State: {state}\");\n```\n\n**Common causes:**\n1. **isTerminal predicate is wrong** — never returns true\n2. **Background work never completes** — liveness bug\n3. **Wrong state being checked**\n\n**Fix:**\n```csharp\n.Triggers(AsyncOperation.Create\u003CJobQueueState>(\n    \u002F\u002F Make sure this actually becomes true\n    isTerminal: s => \n    {\n        var status = s.Jobs.GetValueOrDefault(jobId)?.Status;\n        Console.WriteLine($\"Checking terminal: status={status}\");\n        return status != JobStatus.Pending;\n    },\n    ...\n))\n```\n\n### State Profile Has Too Many States\n\n**Symptoms:** After async operation, many possible states tracked\n\n**This is expected!** Non-determinism means multiple outcomes are valid. Observations narrow it down.\n\n```csharp\n\u002F\u002F Observe to narrow down\nvar response = await client.GetJob(jobId);\n(_, _, stateProfile) = spec.Allows(getJobOp, jobId, response, stateProfile);\n\n\u002F\u002F State count should decrease\nConsole.WriteLine($\"Remaining possible states: {stateProfile.StatesAndStepFunctions.Count}\");\n```\n\n## Debugging Tips\n\n### Enable Detailed Logging\n\n```csharp\nvar results = await spec.RunTests(context, initialState, testCases, new TestExecutionOptions\n{\n    OnStepExecuted = info =>\n    {\n        foreach (var (op, req, resp) in info.Operations)\n            Console.WriteLine($\"{op.Name}({req}) → {resp}\");\n    }\n});\n```\n\n### Visualize the State Graph\n\n```csharp\nvar dot = spec.VisualizeStateSpace(initialState, inputs, options);\nFile.WriteAllText(\"debug-graph.dot\", dot);\n\u002F\u002F Run: dot -Tpng debug-graph.dot -o debug-graph.png\n```\n\n### Inspect a Single Test Case\n\n```csharp\nvar failedCase = testCases.First(tc => !results[tc].Success);\nConsole.WriteLine($\"Failed sequence:\");\nforeach (var step in failedCase.Steps)\n{\n    Console.WriteLine($\"  {step.OperationName}({step.Request})\");\n}\n```\n\n### Manually Replay a Sequence\n\n```csharp\nvar stateProfile = new StateProfile(initialState);\n\nforeach (var step in failedCase.Steps)\n{\n    Console.WriteLine($\"\\n=== {step.OperationName} ===\");\n    Console.WriteLine($\"Request: {step.Request}\");\n    Console.WriteLine($\"Current states: {stateProfile.StatesAndStepFunctions.Count}\");\n    \n    var response = await ExecuteStep(step);\n    Console.WriteLine($\"Response: {response}\");\n    \n    var (isValid, message, newProfile) = spec.Allows(step.Operation, step.Request, response, stateProfile);\n    Console.WriteLine($\"Valid: {isValid}\");\n    if (!isValid) Console.WriteLine($\"Error: {message}\");\n    \n    stateProfile = newProfile;\n}\n```\n\n## Getting Help\n\n1. **Check the samples**: `Samples\u002F` folder has working examples\n2. **Read the concepts docs**: `docs\u002Fconcepts\u002F` explains the theory\n3. **Visualize**: State graphs often reveal the problem\n4. **Simplify**: Reduce to minimal failing case\n",{"name":5,"description":7},"main","30a1dced713d0af39440662464a975471e5fd779","agent\u002Fskills\u002Ftroubleshooting",9,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant","https:\u002F\u002Fmicrosoft.github.io\u002Faccordant\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-10 01:14:01",{"source":9,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add microsoft\u002Faccordant --skill accordant-troubleshooting",{"tool":54,"command":55},"bunx","bunx skills add microsoft\u002Faccordant --skill accordant-troubleshooting",{"tool":57,"command":58},"pnpm","pnpm dlx skills add microsoft\u002Faccordant --skill accordant-troubleshooting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Ftroubleshooting\u002FSKILL.md",true,[],[63,81,96,109,122,136],{"skillNo":64,"name":65,"nameZh":66,"description":67,"descriptionZh":68,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":69,"categories":70,"keywords":77,"publishedAt":33},"01M69B8CHNWRMFG91HS42KMCA8","accordant-test-generation","Accordant 测试生成与运行","How Accordant generates and runs tests - use this skill when configuring test generation, understanding state graphs, or running tests","Accordant 如何生成和运行测试——当配置测试生成、理解状态图或运行测试时使用此技能","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Ftest-generation\u002FSKILL.md",[71,74],{"categoryNo":72,"categoryName":73,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":75,"categoryName":76,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[78,79,80],"test","test generation","accordant test generation",{"skillNo":82,"name":83,"nameZh":84,"description":85,"descriptionZh":86,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":93,"publishedAt":33},"01M69B8A48NGKWDXWKE5WWJ0H6","accordant-state","Accordant 状态模型设计","How to design state models in Accordant - use this skill when defining what your system tracks between operations","如何在 Accordant 中设计状态模型——当定义系统在各项操作之间需要跟踪的内容时使用此技能","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fstate\u002FSKILL.md",[89,90],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":91,"categoryName":92,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C535MHXGXDSGN98VJTMCSK","系统架构设计模式",[94,95],"accordant state","design",{"skillNo":97,"name":98,"nameZh":99,"description":100,"descriptionZh":101,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":102,"categories":103,"keywords":106,"publishedAt":33},"01M69B87PRB888TD55KQC8N9QY","accordant-quickref","Accordant API 快速参考","Quick reference and cheatsheet for Accordant API - use this skill for quick syntax lookup or code snippets","Accordant API 的快速参考与速查表——在需要快速查询语法或代码片段时使用此技能。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fquickref\u002FSKILL.md",[104,105],{"categoryNo":72,"categoryName":73,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":75,"categoryName":76,"taxonomyType":28,"taxonomyTypeDesc":29},[107,108],"accordant quickref","quick reference",{"skillNo":110,"name":111,"nameZh":112,"description":113,"descriptionZh":114,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":115,"categories":116,"keywords":119,"publishedAt":33},"01M69B85BBG2EBQJE2YFPYP88N","accordant-patterns","Accordant 常用测试模式","Common patterns in Accordant - response-dependent state, request derivations, error handling, and HTTP integration","Accordant 中的常用模式——依赖响应的状态、请求推导、错误处理和 HTTP 集成。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fpatterns\u002FSKILL.md",[117,118],{"categoryNo":72,"categoryName":73,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":75,"categoryName":76,"taxonomyType":28,"taxonomyTypeDesc":29},[120,121],"accordant patterns","http",{"skillNo":123,"name":124,"nameZh":125,"description":126,"descriptionZh":127,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":132,"publishedAt":33},"01M69B830ASD0T86FZQ2SNXWKF","accordant-overview","Accordant 基于模型测试入门","What Accordant is, when to use model-based testing, and core concepts - use this skill when starting with Accordant or explaining its purpose","介绍 Accordant 是什么、何时使用基于模型的测试以及核心概念——在初次接触 Accordant 或需要讲解其用途时使用此技能。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Foverview\u002FSKILL.md",[130,131],{"categoryNo":72,"categoryName":73,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":75,"categoryName":76,"taxonomyType":28,"taxonomyTypeDesc":29},[133,134,135],"accordant overview","testing","core",{"skillNo":137,"name":138,"nameZh":139,"description":140,"descriptionZh":141,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":142,"categories":143,"keywords":148,"publishedAt":33},"01M69B80P9WNY5RS0EGKH0HM89","accordant-operations","Apply\u002FExecute 操作定义","How to define operations with Apply and Execute methods - use this skill when creating spec operations or understanding the Apply\u002FExecute pattern","如何使用 Apply 和 Execute 方法定义操作——在创建规范操作（spec operations）或理解 Apply\u002FExecute 模式时使用此技能。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Faccordant\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Foperations\u002FSKILL.md",[144,145],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":146,"categoryName":147,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QVANT4709358VEJK53E","代码实现",[149,150],"accordant operations","spec"]