Skip to content

Documentation samples reference nonexistent or invalid APIs #31

@nficano

Description

@nficano

Several documentation snippets do not compile against the current public API. The delegation guide returns summary.Output, but JobResult exposes Success, Result, Error, FinalStatus, and EnsureSuccess, not Output. The jobs guide also refers to result.Output. The job events guide calls MetricAsync with a decimal literal and a positional cancellation token after a named argument, while the method accepts double value and requires cancellationToken: ct after named arguments.

The relevant locations are docs/guides/delegation.md:31, docs/guides/jobs.md:61, docs/guides/job-events.md:37, src/Arcp.Client/JobHandle.cs:113, and src/Arcp.Runtime/JobContext.cs:92.

Fix prompt: Audit the C# snippets in the guides and update them to compile against the current SDK. Replace JobResult.Output examples with the correct access pattern through JobResult.Result?.Result or a helper added to the SDK, and update MetricAsync examples to pass a double literal such as 0.012 and cancellationToken: ct. Add a docs snippet compilation check or sample project that references the markdown snippets most likely to drift.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:mediumMedium severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions