Skip to content

Fix stale API references across docs and AI skills#21

Merged
imnaseer merged 5 commits into
mainfrom
personal/imnaseer/improve-docs-vi
Jun 10, 2026
Merged

Fix stale API references across docs and AI skills#21
imnaseer merged 5 commits into
mainfrom
personal/imnaseer/improve-docs-vi

Conversation

@imnaseer

Copy link
Copy Markdown
Member

Audited all code snippets in documentation (docs/), AI skills (agent/skills/), and the starter template (agent/starter/) against the actual Accordant source code. Fixed every instance where docs referenced APIs that don't exist or used incorrect signatures.

Changes

Non-existent APIs removed:

  • ProvideTargetAndInitialState → CreateTestingContext / Register pattern
  • RunConcurrentTests → GenerateConcurrentTests + RunTests (two-step)
  • WithExecution → ExecuteWith / BindAsync
  • ITestContext → TestingContext
  • JsonState base class → [State] public partial class
  • LogLevel on TestExecutionOptions → OnStepExecuted callback

Incorrect signatures/values fixed:

  • ThenState<TState, TResponse> → ThenState (TResponse is inferred)
  • TestCaseGenerator.VisualizeStateSpace(...) → spec.VisualizeStateSpace(...)
  • r.Passed → r.Success
  • MaxConcurrencyLevel default: 2 → 3

Files changed (15 files)

  • 6 in docs/ (tutorials 01, 03, 04, 05; concepts conformance-testing, operations-and-expect, models-vs-fakes)
  • 5 in agent/skills/ (concurrency, operations, quickref, test-generation, troubleshooting)
  • 2 in agent/starter/ (ExampleTests.cs, README.md)

imnaseer and others added 5 commits June 9, 2026 21:17
- Tutorial 1: Replace fictional ProvideTargetAndInitialState with real
  CreateTestingContext/Register pattern; fix RunTests signature to use
  separate GenerateTests + RunTests(context, state, testCases, options)
- Tutorial 4: Replace TestCaseGenerator.VisualizeStateSpace static call
  with spec.VisualizeStateSpace convenience method
- Tutorial 5: Replace ProvideTargetAndInitialState and non-existent
  RunConcurrentTests with GenerateConcurrentTests + RunTests pattern
- Concepts/operations-and-expect: Replace non-existent WithExecution
  with ExecuteWith/BindAsync pattern; fix Operation class signature to
  include TState type parameter; fix ITestContext to TestingContext
- Concepts/conformance-testing: Fix r.Passed to r.Success (actual
  property name on TestCaseExecutionResult)
- Concepts/models-vs-fakes: Replace non-existent JsonState base class
  with [State] partial class pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The ThenState method only takes one type parameter (TState); the TResponse
type is inferred from the ExpectedOutcomeBuilder<TResponse> context. Fixes
tutorial 03 (4 instances) and how-to/indefinite-failures (1 instance).
Also adds explicit lambda parameter types to match sample patterns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- concurrency/SKILL.md: Replace non-existent RunConcurrentTests with
  GenerateConcurrentTests + RunTests two-step pattern
- quickref/SKILL.md: Same RunConcurrentTests fix
- troubleshooting/SKILL.md: Same RunConcurrentTests fix (2 instances)
- test-generation/SKILL.md: Replace RunConcurrentTests text reference;
  replace TestCaseGenerator.VisualizeStateSpace static call with
  spec.VisualizeStateSpace convenience method
- operations/SKILL.md: Fix ITestContext (doesn't exist) to TestingContext

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace ProvideTargetAndInitialState (doesn't exist) with the correct
CreateTestingContext/Register pattern. Replace single-call RunTests with
the two-step GenerateTests + RunTests pattern that matches the actual API.
Update README to reflect the corrected workflow steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… in skills

- troubleshooting/SKILL.md: Replace non-existent LogLevel = LogLevel.Verbose
  with real OnStepExecuted callback for debugging
- test-generation/SKILL.md: Replace LogLevel in options table with
  OnStepExecuted; fix MaxConcurrencyLevel default from 2 to 3
- quickref/SKILL.md: Fix MaxConcurrencyLevel default from 2 to 3

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@imnaseer
imnaseer merged commit 93c6e19 into main Jun 10, 2026
2 checks passed
@imnaseer
imnaseer deleted the personal/imnaseer/improve-docs-vi branch June 10, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants