Skip to content

No guard compiles the README and guide C# snippets #388

Open

Description

@Blind-Striker

Nothing in the repository compiles the C# snippets in README.md or docs/guide/*.md.

  • tests/OpenCode.Sdk.Tools.Tests/Documentation/ReadmeGuideTableTests.cs checks only that the README's guide table lists every guide.
  • tests/OpenCode.Sdk.Tools.Tests/Packaging/PackedReadmeTests.cs checks the packed README's presence and links, not its code.
  • docs/guide/README.md asks authors to compile a snippet before adding it, but nothing checks that afterwards.

Why it matters: a public signature change can leave every snippet stale while CI stays green. FRZ-H2b is about to change four door signatures (streams and traversals gain requestOptions before the cancellation token). That breaks 11 positional-token snippets across streaming.md, getting-started.md and connection-modes.md, plus README.md:186. Those edits will be made and checked by hand. The next signature change won't have that luck.

Shape of a fix (for whoever owns docs tooling): extract fenced csharp blocks from README.md and docs/guide/*.md and compile them against the SDK in a Tools.Tests guard. A block that is deliberately a fragment carries an explicit marker. Found while planning FRZ-H2b (faz4/FRZ/gen-frz-h2b-doors.plan.md, amendment item 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions