Skip to content

V0.13.1/chore - #51

Merged
gimlichael merged 30 commits into
mainfrom
v0.13.1/chore
Nov 21, 2026
Merged

gimlichael merged 30 commits into
mainfrom
v0.13.1/chore

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request adds a standalone run-action materializer to dotnet-docfx-digest, so the generated Native and Docker wrapper scripts can be rebuilt at DocFX build time from a committed manifest instead of being committed themselves. It also updates the run-action guidance and the fast validator to match, and records the release in the changelog.

Standalone run-action materializer:

  • The generator emits run-actions.manifest.json and a self-contained BuildRunActions.ps1 beside docfx.json, with no installed skill required.
  • The materializer rebuilds byte-identical native and Docker scripts from the manifest and leaves Markdown pages and docfx.json untouched.
  • A missing default manifest is a clean no-op, while an explicitly passed missing manifest still fails.

Documentation:

  • The run-action reference describes the manifest and materializer flow and recommends ignoring the generated run-actions/ directory while committing the settings, manifest, materializer, and Markdown associations.

Fast validator:

  • The fast validator accepts run-actions.manifest.json and BuildRunActions.ps1 as valid deliverables when run-action output is present.

Regression coverage:

  • Tests verify materializer output parity, non-modification of Markdown and docfx.json, and the no-manifest no-op path.

Release notes:

  • The changelog adds the 0.13.1 entry and its compare link.

aicia-bot and others added 6 commits November 21, 2026 00:41
Run-action examples previously required generated wrapper scripts to be committed or regenerated on every build. The generator now emits run-actions.manifest.json and a self-contained BuildRunActions.ps1 beside docfx.json, so the wrappers can be materialized at DocFX build time, and the fast validator accepts these new deliverables.
The run-action delivery test now proves that BuildRunActions.ps1 rebuilds byte-identical native and docker scripts from run-actions.manifest.json, and that it leaves Markdown pages and docfx.json untouched.
The run-action reference now describes the manifest and BuildRunActions.ps1 flow, including the recommendation to ignore the generated run-actions directory and run the materializer at DocFX build time.
The standalone BuildRunActions.ps1 materializer threw when the default run-actions.manifest.json was absent, which broke consumers that do not use run actions. An explicitly passed ManifestPath that is missing still fails, while the default path now no-ops cleanly.
The new no-manifest case verifies that the standalone BuildRunActions.ps1 materializer exits cleanly without creating run-action output when the default manifest is absent.
@gimlichael gimlichael self-assigned this Nov 21, 2026
@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; both numbered previous findings are addressed, and no new actionable issues were found.

Summary

This PR moves generated run scripts out of committed documentation and rebuilds them from a manifest at build time.

  • DocFX builds create runnable example scripts from a committed manifest.
  • API include directives stay on namespace pages before examples.
  • Example-mapped API pages reject manual Example headings.
  • Run-script links return when copying or previewing fails.
  • Framework-targeted sample builds use one MSBuild node.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Examples and settings] --> B[Generator]
  B --> C[Committed manifest]
  B --> D[Markdown links]
  C --> E[BuildRunActions.ps1]
  E --> F[Generated Native and Docker scripts]
  D --> G[DocFX build]
  F --> G
  G --> H[Published documentation]
Loading

Reviews (9) · Last reviewed commit: "🐛 track list-nested fences in docfx mar..." · Reviewed by Greptile

aicia-bot and others added 6 commits November 21, 2026 01:21
When copying or previewing a run script failed, the enhanced toolbar left the original run links hidden, so users had no way to get the script. Re-show those links on copy failure and tighten the click and enhancement checks so the fallback reliably applies.
The DocFX verification build runs in an isolated temp copy of the repository. When that copy contains a run-actions manifest and BuildRunActions.ps1, materialize the run actions there first so the verified build matches what users receive, and fail verification with the script output if materialization breaks.
The standalone BuildRunActions.ps1 only wrote scripts, so native.ps1 or docker.ps1 files left behind after a transport or example was removed from the manifest stayed on disk. It now deletes generated scripts that are no longer expected, removes example directories it empties, and leaves unrelated files alone. The test covers this path and runs the standalone checks before the modern DocFX render.
Availability includes on type pages and after examples break the DocFX overwrite layout, so the skill now limits Markdown include directives under .docfx/api/ to namespace overview pages and keeps Markdown edits within that folder.
The docfx validator now reports API_INCLUDE_OUTSIDE_NAMESPACES when an include directive appears under .docfx/api/ outside api/namespaces/, enforcing the rule the skill documents.
Comment thread skills/dotnet-docfx-digest/SKILL.md Resolved
gimlichael and others added 4 commits November 21, 2026 04:46
The generator now records per-example data only in run-actions.manifest.json and verifies transports from temporary scripts, leaving BuildRunActions.ps1 as the sole owner of materialized run-actions/ files so no duplicated wrapper scripts appear in the working tree while authoring. Tests now materialize through BuildRunActions.ps1 explicitly.
Clarifies that the generator no longer creates run-actions/ in the working tree and that manifest entries, not owned assets, are replaced when sources change, matching the new generator behavior.
The run-actions generator now creates its fallback template under templates/modern instead of run-actions-template, and the validator recognizes that location as the run-actions toolbar entry point so generated pages stay valid.
aicia-bot and others added 9 commits November 21, 2026 05:41
Since the generator no longer materializes run-actions/ itself, it now updates an existing BuildDocfxImage.ps1 to invoke BuildRunActions.ps1 before the image build and to remove the generated run-actions directory in the finally block. The test covers the wiring against a sample script.
The generator now parses BuildDocfxImage.ps1 and rewrites standard scripts into the try/finally shape, while customized scripts are patched around their Docker build step so existing parameters, catch blocks, and finally logic survive. Unparseable results fall back to the original file. Tests cover standard, partially wired CRLF, customized flat, try/finally, and try/catch variants.
Documents that the generator wires BuildRunActions.ps1 before the Docker build and removes the generated run-actions directory in finally, rewriting uncustomized scripts and surgically patching customized ones.
Overwrite bodies mapped via example: already get an Examples heading from DocFX, so manual Example/Examples headings render duplicates. The validator now recognizes flow-sequence mappings and fails with EXAMPLE_REDUNDANT_HEADING.

Co-Authored-By: Claude <noreply@anthropic.com>
Adds regression coverage for example: [*content] recognition and for EXAMPLE_REDUNDANT_HEADING on manual Example/Examples headings.

Co-Authored-By: Claude <noreply@anthropic.com>
Clarifies in the skill contract, references, and evals that example:-mapped bodies must not carry manual Example/Examples headings.

Co-Authored-By: Claude <noreply@anthropic.com>
Updates the semantic example quality gates entry to mention the example: mapping forms and EXAMPLE_REDUNDANT_HEADING.

Co-Authored-By: Claude <noreply@anthropic.com>
The generator now appends templates/modern when missing and moves templates/ms-style to the end of build.template so its overrides keep precedence.

Co-Authored-By: Claude <noreply@anthropic.com>
Adds cases for ms-style without modern and ms-style listed before an existing modern, asserting the final template order.

Co-Authored-By: Claude <noreply@anthropic.com>
Verification evidence is now persisted per script hash in the system temp directory so reruns and toolbar refreshes keep Native and Docker states independent, while a changed script discards stale evidence. The inventory also reports pages that already hold run-action blocks so stale associations are removed when the last C# fence is deleted, and BuildRunActions.ps1 detection uses the AST so commented invocations no longer count.
Include placement and example heading detection now share one Markdown line scanner that skips fenced code and HTML comments, so inline literals and commented directives no longer raise API_INCLUDE_OUTSIDE_NAMESPACES. Namespace pages are also flagged when an include appears after examples begin, with regression coverage in test-quality.ps1.
Verification records and logs moved from the shared system temp directory into a private .docfx-run-verification directory owned by the current user. Cached evidence is only trusted when the record and log live in that directory, pass ownership checks, and are not links, so a planted log can no longer be reported as verified.
The shared Markdown line scanner now follows list indentation so fenced code and indented literals inside list items are no longer scanned as live include directives, while real includes in list items on type pages are still reported. Regression cases were added to test-quality.ps1.
@gimlichael
gimlichael merged commit 67bbbc0 into main Nov 21, 2026
14 checks passed
@gimlichael
gimlichael deleted the v0.13.1/chore branch November 21, 2026 14:02
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