Skip to content

V0.13.0/docfx and csrun - #50

Merged
gimlichael merged 95 commits into
mainfrom
v0.13.0/docfx-and-csrun
Nov 20, 2026
Merged

gimlichael merged 95 commits into
mainfrom
v0.13.0/docfx-and-csrun

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces the dotnet-csrun skill, which turns documentation examples and API claims into small runnable C# programs and genuine xUnit v3 tests executed through csrun. It also adds deterministic validation so the published example and its fixtures cannot drift apart silently.

New skill:

  • Guides agents to build a schema version 1 csrun manifest with exact package pins, an explicit target framework, and a readable copy-and-run PowerShell block.
  • Classifies every result as verified, compiled only, unverified, or failed, so model confidence is never presented as execution evidence.
  • Provides nine representative evaluation specifications and fixtures that cover success, deliberate failures, empty test discovery, invalid source, package pins, and Unicode or multiline sources.

Validation:

  • Adds an offline artifact check that confirms the published source matches its console fixture, JSON round-trips preserve source text, and local resource links resolve.
  • Adds an optional focused execution script that runs all seven fixtures through a trusted local engine or the official Docker image and fails on mismatched exit codes or observations.

Documentation:

  • Lists dotnet-csrun in the README skills table and install examples, with a short rationale on when executable evidence is worth using.

Executable C# evidence is needed when documentation examples and API claims must be proven by running the exact source. The new skill provides small complete console examples and genuine xUnit v3 tests through csrun, with exact package pins and an honest verified, compiled-only, or unverified status.
The csrun skill ships a deterministic validator and a template check that keeps the published SKILL.md example identical to its console fixture and verifies its local links. Both run offline so regressions are caught without invoking a model.
The README now lists dotnet-csrun in the available skills table, install examples, and a short rationale section so users can discover the skill and understand when executable evidence is worth using.
@gimlichael gimlichael self-assigned this Nov 16, 2026
@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

This PR adds executable C# examples through dotnet-csrun, source-bound DocFX examples, paired Native and Docker run controls, and broader package selection for .NET scaffolds.

  • C# examples can be run as standalone programs or xUnit tests.
  • DocFX examples can stay tied to their maintained source and project.
  • DocFX can generate paired run scripts and copy buttons for examples.
  • App and library scaffolds can choose compatible stable packages across major versions.
  • The install-sync script now accepts several skill names in one comma-separated value.

Reviews (18) · Last reviewed commit: "💄 update contextual source references a..." · Reviewed by Greptile

Comment thread scripts/validate-dotnet-csrun.ps1 Resolved
Comment thread skills/dotnet-csrun/evals/evals.json Resolved
The csrun validator sets its own output encoding to UTF-8 but left the console encoding unset, so captured child output could be decoded inconsistently. Setting [Console]::OutputEncoding keeps both sides on the same encoding.
Eval case 6 runs a net11.0 example, so it now references a dedicated fixture for that case instead of sharing the generic console input.
The execution validator now runs the four new feasibility fixtures through the engine and checks their observations. The artifact validator locks the original InventoryWorker source and the new fixtures' manifest shape and package pins, so a false repair cannot silently pass.
Agents were choosing manifest construction before judging whether an application entrypoint or separate assembly could run under csrun, and sometimes repaired samples by changing what they were meant to prove. The workflow now assesses feasibility first and classifies failures before repair, with the detailed rules kept in a dedicated reference.
Adds review specifications and source fixtures for genuine application startup, compatible hosting, multiple entrypoints, safe import adaptation, and top-level test source, so the feasibility rules are exercised by the validator.
Comment thread skills/dotnet-csrun/evals/evals.json Resolved
aicia-bot and others added 7 commits November 17, 2026 00:11
Sample identity and artifact helpers give csrun verify and repair a single deterministic source of truth for manifest-derived paths, so the lifecycle workflow does not reimplement them in prose.
The csrun validator and repository validator now check the create, verify, repair, and audit contracts, so lifecycle regressions fail deterministically instead of surfacing only in prose review.
csrun previously covered only creating new examples. Existing source now has an explicit read-only verify path, an authorized repair path with preserved semantics, and a scoped audit path, with a reference for composing them from dotnet-docfx-digest.
New eval fixtures cover verify, repair, and audit outcomes, including diverged source and incorrect package pins, so the lifecycle contract is exercised against concrete inputs rather than described only in prose.
Standalone runtime examples can now be created, verified, or repaired through dotnet-csrun while docfx-digest keeps ownership of API discovery, placement, and DocFX builds. The composition reference defines that boundary.
The README skill table and csrun summary now describe the create, verify, repair, and audit lifecycle and the paired native and Docker commands, so the public entry matches the skill.
Comment thread scripts/validate-dotnet-csrun.ps1 Resolved
gimlichael and others added 6 commits November 17, 2026 00:26
The README describes the source-bound sample contract so consumers know that maintained examples declare their project and source context explicitly and that the validator checks those bindings rather than skipping them.
The skill contract now covers csrun composition, the source-binding requirement for maintained examples, and the example-architecture reference that explains the split application and test assembly case for ManagedApplicationFixture.
Samples can now bind to a maintained project and source file, and the validator rejects unresolvable bindings. It also refuses to collapse a ManagedApplicationFixture entry point into a test-owned source unit and skips .bot directories during source discovery.
Regression coverage for the full completion boundary with a project-bound example, and for the new context and entry-point diagnostics, so the checks stay enforced.
Adds eval case 115 and the InventoryWorker fixture tree that the managed application example regression depends on. Tests copy these fixtures to a temp directory before building, so they are never built in place.
Bound sample context was validated from source paths alone, so unchanged pages could go unchecked when their bound source or project changed, deleted or moved, and a shared batch build failure could mark unrelated projects as failed. Validation now reads the disposable MSBuild binary log for actual Csc invocations and per-project outcomes, selects pages through their bindings, and rejects excerpts excluded by conditional compilation.
The validator changes need regression coverage for changed-only selection of pages whose bound source or project changes, deleted or moved inputs, conditional compilation excluding displayed code, and per-project batch attribution. The new cases use small SDK projects so they run without network access or an external test runner.
The sample context rules changed: bound pages are selected by their source and project inputs, compiler evidence comes from the native build log, and conditionally excluded excerpts are rejected. The architecture and diagnostics references need to describe what validation now proves and what it does not.
gimlichael and others added 13 commits November 18, 2026 10:20
Allow scaffold package selection to follow current compatible releases instead of fixed major lines.
Expose listed stable releases across major lines so compatibility can be checked against each target framework.
Keep generated project guidance aligned with dynamically resolved test packages.
Check candidate discovery and exercise scaffold expectations against the current runtime matrix.
Provide the LTS and STS SDKs required by the template validation matrix.
Clarify that the scaffold README is tracked while other bot working material stays local.
Catch contradictions between the tracked bot README and local-only working material guidance.
The generated native block and the sample helper no longer pin csrun v0.2.1. They resolve the latest stable release at runtime and verify the downloaded script against the SHA-256 digest GitHub publishes for that asset.
The csrun guidance now describes runtime release resolution and points to the csrun source and releases, and recommends a reviewed local engine or a pinned Docker digest for reproducible runs.
The run-actions entry point is now named dotnet-docfx-digest csrun, which matches the csrun engine it drives. The previous generate-run-actions name remains accepted so existing invocations keep working.
The DocFX digest section of the README now names the csrun command so it matches the renamed skill entry point.
Comment thread skills/dotnet-docfx-digest/SKILL.md Resolved
gimlichael and others added 14 commits November 20, 2026 01:58
Run action examples must now execute the C# shown on the page, so hidden harness members are no longer composed into standalone scripts. Legacy harness recipes fail generation with a clear instruction to move the executable code into the visible sample.
Run action recipes now derive their standalone scripts from the C# shown on the page. The skill, reference, and eval expectations describe that contract, so authors put the complete executable sample in the visible fence and label pinned repository tests separately.
The Docker wrapper ran the image entry point, so it did not verify the csrun release that Native runs. Both wrappers now download the latest stable engine, check its SHA-256 digest, and execute the same asset. The Docker image supplies only the SDK and PowerShell.
Both csrun wrappers now fetch and verify the latest stable release, and the Docker path runs the verified asset inside the SDK image. The skill and execution reference describe that behavior and drop the stale claim that no host or network setup is needed.
The README described the old harness and Docker-only behavior. It now states that standalone scripts run the visible C#, that pinned repository tests are named, and that both transports verify the latest csrun release.
Run action recipes must show the xUnit using directive so the visible C# compiles as written. Short Fact and Assert names now replace fully qualified attributes, making the sample readable and self-contained.
The run action sample test now expects the visible source to import Xunit and use short Fact and Assert names. This keeps the regression check aligned with the updated recipe contract in run-actions.md.
Copying a run action script now swaps the button icon for a brief check mark, giving visible confirmation without changing the code block layout. The status message is visually hidden in that case so the feedback is not shown twice, and the browser test asserts the check icon and the restored play icon.
Existing sites can now pick up toolbar changes without regenerating their examples. The instructions say to run the generator even when examples are current, verify the refreshed module against the skill asset, and keep existing scripts and their verification evidence intact.
A stale toolbar module must be replaced on refresh while every existing PowerShell payload stays byte-identical and keeps its verification status. The test now seeds a stale module, runs the generator, and checks the refreshed module is published into the rendered site.
The copy checkmark used a fixed link-success class, so its color and size could drift from the DocFX clipboard feedback. Measure DocFX's own success markup in the same code block and copy its computed color and font size, so the feedback matches in both themes.
The browser test now measures the DocFX clipboard checkmark and compares the run action checkmark against it, in light and dark themes. This guards the styling fix against regressions that only appear in one theme.
@gimlichael
gimlichael merged commit dd19d33 into main Nov 20, 2026
14 checks passed
@gimlichael
gimlichael deleted the v0.13.0/docfx-and-csrun branch November 20, 2026 02:57
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