Repository navigation
V0.13.1/chore - #51
Merged
Merged
Conversation
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.
[Medium impact] This PR appears safe to merge; both numbered previous findings are addressed, and no new actionable issues were found. SummaryThis PR moves generated run scripts out of committed documentation and rebuilds them from a manifest at build time.
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]
Reviews (9) · Last reviewed commit: "🐛 track list-nested fences in docfx mar..." · Reviewed by Greptile |
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
run-actions.manifest.jsonand a self-containedBuildRunActions.ps1besidedocfx.json, with no installed skill required.docfx.jsonuntouched.Documentation:
run-actions/directory while committing the settings, manifest, materializer, and Markdown associations.Fast validator:
run-actions.manifest.jsonandBuildRunActions.ps1as valid deliverables when run-action output is present.Regression coverage:
docfx.json, and the no-manifest no-op path.Release notes: