Skip to content

Fix 6 tutorials with code snippets mismatched against actual source code#48

Merged
devstress merged 1 commit intomainfrom
copilot/test-tutorial-clarity
Apr 5, 2026
Merged

Fix 6 tutorials with code snippets mismatched against actual source code#48
devstress merged 1 commit intomainfrom
copilot/test-tutorial-clarity

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

Fresh new-developer audit of all 50 tutorials, cross-referencing every code snippet against the actual source. 44 passed; 6 had stale or incorrect API references that would confuse a mid-level dev following along.

Fixes

  • Tutorial 08 (Activities Pipeline)PipelineOptions showed non-existent properties (InputTopic, WorkerConcurrency, ProcessingTimeout); updated to actual (InboundSubject, NatsUrl, WorkflowTimeout, etc.). Changed SubscribeAsync<object>SubscribeAsync<JsonElement>.

  • Tutorial 26 (Message Replay)IMessageReplayStore methods showed CancellationToken ct = default but actual interface requires the parameter (no default).

  • Tutorial 29 (Throttle) — "What You'll Learn" listed wrong partition strategies (Source, Recipient, CorrelationId) → actual API: TenantId, Queue, Endpoint.

  • Tutorial 31 (Event Sourcing) — CancellationToken param named ct in 5 snippets but source uses cancellationToken throughout IEventStore, TemporalQuery, ISnapshotStore.

  • Tutorial 43 (Kubernetes) — Helm template listing showed deployment.yaml, service.yaml, ingress.yaml which don't exist. Updated to actual service-specific manifests (admin-api.yaml, openclaw-web.yaml, workflow-temporal.yaml, etc.).

  • Tutorial 49 (Testing) — Referenced non-existent ITestWorkflowEnvironment / TestWorkflowEnvironment. Fixed to WorkflowEnvironment? / WorkflowEnvironment with the try-catch pattern used in the actual test suite.

Example (Tutorial 08 before/after)

// Before — properties don't exist on PipelineOptions
await _consumer.SubscribeAsync<object>(
    topic: _options.InputTopic, ...);

// After — matches src/Demo.Pipeline/IntegrationPipelineWorker.cs
await _consumer.SubscribeAsync<JsonElement>(
    topic: _options.InboundSubject, ...);

@devstress devstress marked this pull request as ready for review April 5, 2026 13:24
@devstress devstress merged commit 60f7de5 into main Apr 5, 2026
3 checks passed
@devstress devstress deleted the copilot/test-tutorial-clarity branch April 5, 2026 13:24
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