Skip to content

V11.0.0/docfx - #181

Open
gimlichael wants to merge 49 commits into
mainfrom
v11.0.0/docfx
Open

gimlichael wants to merge 49 commits into
mainfrom
v11.0.0/docfx

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces DocFX run-actions generation and template support so API documentation examples can be executed natively or in Docker, alongside updated API overwrite pages and repository documentation.

DocFX run-actions infrastructure:

  • Added a run-actions build script, manifest, settings, and client-side template script to generate and attach native and Docker execution scripts for API examples, including host sample probe support with build and HTTP probe timeouts.
  • Wired run-actions generation and asset cleanup into the DocFX image build, included generated run-actions assets in the DocFX configuration, and ignored the generated output directory in Git.

API documentation examples and overwrites:

  • Updated API type overwrite examples to use runnable entry points and align with DocFX rendering conventions, removed redundant availability notes, and attached generated run-action script links across the documented types.
  • Fixed include directive syntax on the HMAC authentication namespace overview page.

Repository documentation and guidance:

  • Clarified DocFX overwrite heading rules, namespace-only include restrictions, and interim scratch artifact guidance in the contributor guide.
  • Added the Cuemon.Kernel package entry to the repository README and recorded the DocFX updates in the changelog.

gimlichael and others added 15 commits November 21, 2026 13:15
Exclude the generated .docfx/run-actions/ directory from version control so build-time run-action artifacts do not pollute the working tree.
Clarify DocFX overwrite heading conventions, restrict [!INCLUDE] directives to namespace pages, and generalize interim scratch artifact restrictions.
Introduce DocFX run-actions generation and client-side template integration so API examples can be executed natively or via Docker.
Fix broken include syntax on namespace overview pages and update type overwrite examples to align with DocFX rendering conventions.
Regenerate run-actions manifest and settings to cover the updated DocFX API type examples.
Refine type overwrite examples to align with DocFX rendering and run-actions execution conventions.
Update the run-actions build script, manifest, and settings to match the revised DocFX API type examples.
Adjust type overwrite examples for ChecksumBuilder and PortablePhysicalFileProvider.
Add host-sample runner support in BuildRunActions.ps1 and regenerate the run-actions manifest and settings for updated DocFX API examples.
Update DocFX API type overwrite C# examples and attach generated run-action script links across 382 type pages.
Ensure host sample builds, HTTP probes, and startup delays respect the configured deadline and clean up child processes on timeout or failure.
Switch AppTagHelperOptions from an intrinsic limitation to a probed host run-action harness and regenerate its manifest and API doc snippet.
@gimlichael gimlichael self-assigned this Nov 22, 2026
@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · The badge adds no new issue, but the existing example-output rule violation must be fixed before merging.RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches public API documentation and its build and release paths.

The badge adds no new issue, but the existing example-output rule violation must be fixed before merging.

FindingsFix All in CodexFindings

  1. P2 Comment overstates removed characters ▶
  2. P2 Example promises a missing node ▶
Fix with agent prompt
### Issue 1
.docfx/api/types/Cuemon.Extensions.Xml.StringExtensions.md:undefined-28
The new comment says `SanitizeXmlElementText` removes every character in `U+0001..U+0019` except tab, LF, and CR. It also leaves characters such as `U+000B`, `U+000C`, and `U+000E` unchanged. Readers could rely on this claim and still produce invalid XML. Describe the actual removed ranges instead: `U+0001..U+0008`, `U+0011..U+0012`, and `U+0014..U+0019`.

```suggestion
// Sanitize XML element text (removes U+0001..U+0008, U+0011..U+0012, and U+0014..U+0019)
```

### Issue 2
.docfx/api/types/Cuemon.Extensions.Runtime.Serialization.HierarchySerializer.md:undefined-7
The added `ReportRoot.ReportChild.Int32` path is not printed by this example. `HierarchyOptions.SkipProperty` skips properties named `Count`, and the example uses those default options. Readers running it get a shorter tree than the page promises.

Remove this path from the claimed output, or change the example to include that property. Before merging, this must meet the `AGENTS.md` requirement that examples not rely on unverified behavior.

```suggestion
`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and the dot-separated path tree (`ReportRoot`, `ReportRoot.String`, `ReportRoot.ReportChild`).
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds native and Docker run scripts to DocFX API examples.

  • API examples gain matching native and Docker run scripts.
  • DocFX builds generate and package the example run scripts.
  • API example code blocks offer buttons to copy or preview run scripts.
  • API example pages show runnable entry points and script links.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Manifest["Example manifest"] --> Generator["Generate PowerShell scripts"]
  Generator --> Checks["Check scripts and links"]
  Checks --> Build["Build DocFX site"]
  Pages["API examples"] --> Build
  Build --> Assets["Publish site and scripts"]
  Assets --> Reader["Reader previews or copies a script"]
Loading

Reviews (10) · Last reviewed commit: "✨ add greptile badge for bug tracking in..." · Reviewed by Greptile

Comment thread .docfx/BuildDocfxImage.ps1 Resolved
Comment thread .docfx/run-actions.manifest.json Resolved
Comment thread README.md Resolved
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.27%. Comparing base (7aac501) to head (061a626).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #181   +/-   ##
=======================================
  Coverage   94.27%   94.27%           
=======================================
  Files         610      610           
  Lines       19319    19319           
  Branches     1874     1874           
=======================================
  Hits        18213    18213           
  Misses       1078     1078           
  Partials       28       28           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

gimlichael and others added 11 commits November 22, 2026 14:11
Allow net4x target frameworks in DocFX run-actions by skipping Docker transport for .NET Framework examples, adding reference assemblies and latest LangVersion for net4x host builds, and updating the CallerArgumentExpressionAttribute example to target net48 with native-only transport.
Tighten manifest validation and deterministic script generation in BuildRunActions.ps1, add TestRunActions.ps1 and verify-docfx-site.sh to verify generated scripts and built site assets, and preserve run-actions in the Docker build context.
Add a docfx_validation job to pr.yml to check deterministic run-action generation and Docker build context, and validate run-action assets in release.yml before and after building the OCI image.
Add a DocFX Build Entry Points section to AGENTS.md explaining local scripted builds, direct Docker builds, and CI validation.
Add a proof-of-concept tool and test harness to consolidate per-TFM DocFX managed-reference metadata across net10.0, net11.0, and netstandard2.0 without losing framework-specific APIs or relationships.
Drop the pinned net10.0 TargetFramework property from the remaining DocFX metadata groups in docfx.json so all groups follow the same unpinned configuration.
Add a proof-of-concept pipeline, NGINX routing config, browser adapter, and HTTP/Playwright verification scripts to build and serve independent per-TFM DocFX API views.
Skip assembly signing during metadata generation when cuemon.snk is absent locally, and resolve framework-prefixed API paths against framework-views.json during HTML link validation.
Replace the standalone PoC build, nginx config, and client script with the pinned docfx-oci-build shared implementation and ms-style template, and expand browser navigation and mobile assertions.
Add an opt-in workflow_dispatch input and matrix job on Ubuntu and Windows to build and validate the DocFX framework-view fixture.
Remove the local multi-TFM DocFX fixture and test scripts now that framework-view generation lives in the shared codebeltnet/docfx builder image.
Drop the manual docfx_framework_views job and run_docfx_framework_views input from the PR workflow following the removal of tooling/docfx-multi-tfm.
Document the shared codebeltnet/docfx:2.81.0-v1.1.0 builder workflow, persistent cache under .bot/docfx/cache/, and local browser testing command.
Switch the DocFX build script from a pinned builder tag and explicit CLI/engine version checks to pulling the floating codebeltnet/docfx:2 tag on every run and tracking its resolved image ID.
Update the DocFX build entry-point guidance in AGENTS.md to reflect pulling the floating codebeltnet/docfx:2 tag on every run and keying the metadata cache by the resolved image ID.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 issues found across 588 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".docfx/api/types/Cuemon.Collections.Generic.PartitionerEnumerable`1.md">

<violation number="1" location=".docfx/api/types/Cuemon.Collections.Generic.PartitionerEnumerable`1.md:45">
P2: `words` is still inside `while (partitioner.HasPartitions)`, so the three-chunk demo runs once for each of the nine remaining batches. Close the outer loop before this section.</violation>
</file>

<file name=".docfx/api/types/Cuemon.AspNetCore.Authentication.Digest.DigestAuthenticationHandler.md">

<violation number="1" location=".docfx/api/types/Cuemon.AspNetCore.Authentication.Digest.DigestAuthenticationHandler.md:47">
P3: This example now resolves only `IOptionsMonitor<DigestAuthenticationOptions>`, not `DigestAuthenticationHandler` as the paragraph claims. Update the paragraph to describe reading the configured options.</violation>
</file>

<file name=".docfx/api/types/Cuemon.AspNetCore.Http.Throttling.ThrottlingSentinelOptions.md">

<violation number="1" location=".docfx/api/types/Cuemon.AspNetCore.Http.Throttling.ThrottlingSentinelOptions.md:17">
P2: This prints the returned object's type name instead of option values and skips the custom configuration, validation, and output described by the example. Call `CreateCustom()` directly so running the example demonstrates those behaviors.</violation>
</file>

<file name=".docfx/api/types/Cuemon.Data.TokenBuilder.md">

<violation number="1" location=".docfx/api/types/Cuemon.Data.TokenBuilder.md:17">
P2: `Append(",30,")` counts both commas, then `Append("New York")` makes `IsValid` true before the line labeled `false`; the later `Engineer` append is truncated to `E`. Append `Alice,30,` and `New York,` so the builder has three tokens before `Engineer`.</violation>
</file>

<file name=".docfx/api/types/Cuemon.AspNetCore.Mvc.Filters.ModelBinding.DisableModelBindingAttribute.md">

<violation number="1" location=".docfx/api/types/Cuemon.AspNetCore.Mvc.Filters.ModelBinding.DisableModelBindingAttribute.md:17">
P2: This only constructs `DisableModelBindingAttribute` and reads its stored type; no MVC class or action applies it, so model binding is never disabled. Decorate a controller or action to demonstrate the behavior promised above.</violation>
</file>

<file name=".docfx/api/types/Cuemon.Collections.Generic.PartitionerCollection-1.md">

<violation number="1" location=".docfx/api/types/Cuemon.Collections.Generic.PartitionerCollection-1.md:41">
P2: The partition summary remains inside the item `foreach`, so `IteratedCount` and `HasPartitions` print once per item instead of once per partition. Close the item loop before the summary.</violation>
</file>

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack

View guided diff | Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 588 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.

View guided diff | Turn on auto-fix | Re-trigger cubic

aicia-bot and others added 6 commits November 27, 2026 17:42
Skip cleanly when the default manifest path is missing and remove redundant validation boilerplate in the materializer script.
Regenerate DocFX API namespace tables, code examples, and run-action manifests to match current public APIs and deterministic formatting.
Disable analyzers during DocFX metadata extraction with reference assemblies enabled and point the .NET xref map to Microsoft Learn.
Cache remote xref maps locally, key metadata cache fingerprints by source-affecting commits so doc-only changes reuse cached metadata, and support optional pre-restore.
Skip regex matching on markdown and HTML files that do not contain run-actions markers.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 existing issue remains and no new issues found across 138 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread CHANGELOG.md Resolved
Replace manual filter context setup with a WebApplication example for ServerTimingFilter, refine the TokenBuilder multi-chunk quoted delimiter example, and update the synchronized run-actions settings and manifest.
Document operation-specific docfx verification commands, behavioral ledger usage, and scoped-run completion rules in the AGENTS.md docfx-digest section.
Refine 61 DocFX API type examples to exercise the documented options and APIs directly, and regenerate the synchronized run-actions manifest and SHA256 settings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 65 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".docfx/api/types/Cuemon.Xml.XmlEncodingOptions.md">

<violation number="1" location=".docfx/api/types/Cuemon.Xml.XmlEncodingOptions.md:32">
P2: This always writes UTF-8 instead of using `options.Encoding`, so changing the documented encoding option silently produces bytes in the wrong encoding. Preserve the configured encoding while applying the preamble policy.</violation>
</file>

<file name="AGENTS.md">

<violation number="1" location="AGENTS.md:678">
P2: Scoped runs are defined to close with `summary.canClaimCompletion: false`, but the preceding rule forbids emitting any audit result or handoff in that state. Explicitly allow the scoped result while continuing to prohibit repository-wide completion claims.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

// Write XML with explicit encoding settings honoring options.Preamble.
var settings = new XmlWriterSettings
{
Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: options.Preamble == PreambleSequence.Keep),

@cubic-dev-ai cubic-dev-ai Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This always writes UTF-8 instead of using options.Encoding, so changing the documented encoding option silently produces bytes in the wrong encoding. Preserve the configured encoding while applying the preamble policy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .docfx/api/types/Cuemon.Xml.XmlEncodingOptions.md, line 32:

<comment>This always writes UTF-8 instead of using `options.Encoding`, so changing the documented encoding option silently produces bytes in the wrong encoding. Preserve the configured encoding while applying the preamble policy.</comment>

<file context>
@@ -26,27 +26,42 @@ var options = new XmlEncodingOptions
 var settings = new XmlWriterSettings
 {
-    Encoding = options.Encoding,
+    Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: options.Preamble == PreambleSequence.Keep),
     OmitXmlDeclaration = options.OmitXmlDeclaration,
     Indent = true
</file context>
Fix with cubic

Comment thread AGENTS.md
```

Codebelt repositories are normally strong-name signed with a `.snk` file in the repository root on the main author's codespace. Preserve and copy that root `.snk` file when building a temporary copy. If the repository or temp copy has no root `.snk`, run build and test verification with `-p:SkipSignAssembly=true`, for example `dotnet build -p:SkipSignAssembly=true` and `dotnet test -p:SkipSignAssembly=true`.

The final DocFX verification must run outside the working tree when possible. The `--verify-docfx-build` option copies the repository to a temp workspace, runs DocFX against the resolved `docfx.json` there, and removes the temp workspace afterward so generated API YAML, manifest files, and site output do not flood git status. Do not call the work complete until the final JSON reports `summary.fullVerificationRan: true`, `summary.canClaimCompletion: true`, `summary.remainingWorkItems: 0`, an empty `summary.remainingGates`, an empty `summary.remainingDiagnosticsByCode`, `summary.newlyIntroducedSkipMarkers: 0`, and `summary.interimArtifacts: 0`.
The final DocFX verification must run outside the working tree when possible. The `--verify-docfx-build` option copies the repository to a temp workspace, runs DocFX against the resolved `docfx.json` there, and removes the temp workspace afterward so generated API YAML, manifest files, and site output do not flood git status. Do not call repository-wide work complete until the final JSON reports `summary.fullVerificationRan: true`, `summary.canClaimCompletion: true`, `summary.remainingWorkItems: 0`, an empty `summary.remainingGates`, an empty `summary.remainingDiagnosticsByCode`, `summary.newlyIntroducedSkipMarkers: 0`, `summary.interimArtifacts: 0`, and zero outstanding behavioral obligations when `summary.behaviorReviewRequired` is true. A scoped (`--uid`, `--project`, `--dry-run`) run closes at `scoped-passed` / `dry-run-passed` with `summary.canClaimCompletion: false` and never implies repository-wide completion.

@cubic-dev-ai cubic-dev-ai Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Scoped runs are defined to close with summary.canClaimCompletion: false, but the preceding rule forbids emitting any audit result or handoff in that state. Explicitly allow the scoped result while continuing to prohibit repository-wide completion claims.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At AGENTS.md, line 678:

<comment>Scoped runs are defined to close with `summary.canClaimCompletion: false`, but the preceding rule forbids emitting any audit result or handoff in that state. Explicitly allow the scoped result while continuing to prohibit repository-wide completion claims.</comment>

<file context>
@@ -662,17 +662,20 @@ Do not emit a final report, audit result, completion summary, or handoff while `
 Codebelt repositories are normally strong-name signed with a `.snk` file in the repository root on the main author's codespace. Preserve and copy that root `.snk` file when building a temporary copy. If the repository or temp copy has no root `.snk`, run build and test verification with `-p:SkipSignAssembly=true`, for example `dotnet build -p:SkipSignAssembly=true` and `dotnet test -p:SkipSignAssembly=true`.
 
-The final DocFX verification must run outside the working tree when possible. The `--verify-docfx-build` option copies the repository to a temp workspace, runs DocFX against the resolved `docfx.json` there, and removes the temp workspace afterward so generated API YAML, manifest files, and site output do not flood git status. Do not call the work complete until the final JSON reports `summary.fullVerificationRan: true`, `summary.canClaimCompletion: true`, `summary.remainingWorkItems: 0`, an empty `summary.remainingGates`, an empty `summary.remainingDiagnosticsByCode`, `summary.newlyIntroducedSkipMarkers: 0`, and `summary.interimArtifacts: 0`.
+The final DocFX verification must run outside the working tree when possible. The `--verify-docfx-build` option copies the repository to a temp workspace, runs DocFX against the resolved `docfx.json` there, and removes the temp workspace afterward so generated API YAML, manifest files, and site output do not flood git status. Do not call repository-wide work complete until the final JSON reports `summary.fullVerificationRan: true`, `summary.canClaimCompletion: true`, `summary.remainingWorkItems: 0`, an empty `summary.remainingGates`, an empty `summary.remainingDiagnosticsByCode`, `summary.newlyIntroducedSkipMarkers: 0`, `summary.interimArtifacts: 0`, and zero outstanding behavioral obligations when `summary.behaviorReviewRequired` is true. A scoped (`--uid`, `--project`, `--dry-run`) run closes at `scoped-passed` / `dry-run-passed` with `summary.canClaimCompletion: false` and never implies repository-wide completion.
 
 If a command cannot be run, report the exact limitation or failure instead of claiming the documentation was verified.
</file context>
Fix with cubic

Use conditional curl requests with -R -z when cached xref maps already exist so stale caches are refreshed while falling back safely on network errors.
Refine API documentation examples for proper resource disposal, ASP.NET Core hosting, and accurate API usage, and regenerate the corresponding run-actions manifest and settings.
Describe host-sample probes accurately as part of native and Docker run-script generation and verification in the unreleased changelog.
var sanitizedName = invalidName.SanitizeXmlElementName();
Console.WriteLine(sanitizedName); // "stElementName"

// Sanitize XML element text (removes disallowed control characters in U+0001..U+0019 except tab/LF/CR)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Comment overstates removed characters

The new comment says SanitizeXmlElementText removes every character in U+0001..U+0019 except tab, LF, and CR. It also leaves characters such as U+000B, U+000C, and U+000E unchanged. Readers could rely on this claim and still produce invalid XML. Describe the actual removed ranges instead: U+0001..U+0008, U+0011..U+0012, and U+0014..U+0019.

Suggested change
// Sanitize XML element text (removes disallowed control characters in U+0001..U+0019 except tab/LF/CR)
// Sanitize XML element text (removes U+0001..U+0008, U+0011..U+0012, and U+0014..U+0019)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .docfx/api/types/Cuemon.Extensions.Xml.StringExtensions.md
Line: 28

Comment:
**Comment overstates removed characters**

The new comment says `SanitizeXmlElementText` removes every character in `U+0001..U+0019` except tab, LF, and CR. It also leaves characters such as `U+000B`, `U+000C`, and `U+000E` unchanged. Readers could rely on this claim and still produce invalid XML. Describe the actual removed ranges instead: `U+0001..U+0008`, `U+0011..U+0012`, and `U+0014..U+0019`.

```suggestion
// Sanitize XML element text (removes U+0001..U+0008, U+0011..U+0012, and U+0014..U+0019)
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 26 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".docfx/BuildDocfxImage.ps1">

<violation number="1" location=".docfx/BuildDocfxImage.ps1:170">
P2: Concurrent DocFX containers can select the same temp file and truncate or remove each other's revalidation output, causing a failed build or a bad cache update. Create a unique temporary file in the cache directory.</violation>
</file>

<file name=".docfx/api/types/Cuemon.AspNetCore.Mvc.Filters.Cacheable.HttpCacheableFilter.md">

<violation number="1" location=".docfx/api/types/Cuemon.AspNetCore.Mvc.Filters.Cacheable.HttpCacheableFilter.md:33">
P2: `AddHttpCacheable()` applies this filter to every MVC action, and `HttpCacheableFilter` writes `Options.CacheControl` without checking the result. With `Public = true`, an authenticated endpoint added to the app becomes share-cacheable; scope the filter to public actions or avoid a global public policy.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

while IFS="$(printf '\t')" read -r fname url; do
[ -n "$fname" ] || continue
target="/cache/xref/$fname"
tmp="$target.$$.tmp"

@cubic-dev-ai cubic-dev-ai Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Concurrent DocFX containers can select the same temp file and truncate or remove each other's revalidation output, causing a failed build or a bad cache update. Create a unique temporary file in the cache directory.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .docfx/BuildDocfxImage.ps1, line 170:

<comment>Concurrent DocFX containers can select the same temp file and truncate or remove each other's revalidation output, causing a failed build or a bad cache update. Create a unique temporary file in the cache directory.</comment>

<file context>
@@ -167,10 +167,22 @@ if [ -f /work/xref-urls.tsv ]; then
         [ -n "$fname" ] || continue
         target="/cache/xref/$fname"
-        if [ ! -s "$target" ]; then
+        tmp="$target.$$.tmp"
+        if [ -s "$target" ]; then
+            echo "Revalidating cached xref map $url -> $target"
</file context>
Suggested change
tmp="$target.$$.tmp"
tmp="$(mktemp "$target.XXXXXX")"
Fix with cubic

var options = new HttpCacheableOptions();
options.Filters.Add(new HttpEntityTagHeaderFilter(io => io.UseEntityTagResponseParser = true));
options.Filters.Add(new HttpLastModifiedHeaderFilter());
Public = true,

@cubic-dev-ai cubic-dev-ai Bot Nov 29, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: AddHttpCacheable() applies this filter to every MVC action, and HttpCacheableFilter writes Options.CacheControl without checking the result. With Public = true, an authenticated endpoint added to the app becomes share-cacheable; scope the filter to public actions or avoid a global public policy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .docfx/api/types/Cuemon.AspNetCore.Mvc.Filters.Cacheable.HttpCacheableFilter.md, line 33:

<comment>`AddHttpCacheable()` applies this filter to every MVC action, and `HttpCacheableFilter` writes `Options.CacheControl` without checking the result. With `Public = true`, an authenticated endpoint added to the app becomes share-cacheable; scope the filter to public actions or avoid a global public policy.</comment>

<file context>
@@ -4,74 +4,81 @@ example:
-            options.Filters.Add(new HttpLastModifiedHeaderFilter());
-
-            var filter = new HttpCacheableFilter(Options.Create(options));
+        Public = true,
+        MaxAge = TimeSpan.FromSeconds(60)
+    };
</file context>
Fix with cubic

The transport validation used -notin, which is case-insensitive, while the branches that follow compare transports case-sensitively with -ceq. Using -cnotin keeps the validation consistent with those comparisons, so a mis-cased transport is rejected up front instead of slipping through.
The authentication example prose now states what the sample actually shows: unauthenticated requests are rejected by all three pipelines and only a valid Basic request reaches the handler. The serializer prose now lists the ReportChild.Int32 node that the example's tree output prints.
The PartitionerCollection example was indented inside the code fence, so copying it produced leading whitespace on every line. Dedenting it to column zero makes the sample copy-paste ready without changing its behavior.
@@ -4,40 +4,48 @@ example:
- *content
---

`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and a path-based tree showing `ReportRoot > ReportChild`.
`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and the dot-separated path tree (`ReportRoot`, `ReportRoot.String`, `ReportRoot.ReportChild`, `ReportRoot.ReportChild.Int32`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Example promises a missing node

The added ReportRoot.ReportChild.Int32 path is not printed by this example. HierarchyOptions.SkipProperty skips properties named Count, and the example uses those default options. Readers running it get a shorter tree than the page promises.

Remove this path from the claimed output, or change the example to include that property. Before merging, this must meet the AGENTS.md requirement that examples not rely on unverified behavior.

Suggested change
`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and the dot-separated path tree (`ReportRoot`, `ReportRoot.String`, `ReportRoot.ReportChild`, `ReportRoot.ReportChild.Int32`).
`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and the dot-separated path tree (`ReportRoot`, `ReportRoot.String`, `ReportRoot.ReportChild`).

Context Used: AGENTS.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: .docfx/api/types/Cuemon.Extensions.Runtime.Serialization.HierarchySerializer.md
Line: 7

Comment:
**Example promises a missing node**

The added `ReportRoot.ReportChild.Int32` path is not printed by this example. `HierarchyOptions.SkipProperty` skips properties named `Count`, and the example uses those default options. Readers running it get a shorter tree than the page promises.

Remove this path from the claimed output, or change the example to include that property. Before merging, this must meet the `AGENTS.md` requirement that examples not rely on unverified behavior.

```suggestion
`HierarchySerializer` converts any object graph into a hierarchical node structure (`IHierarchy<DataPair>`) for inspection and path-based representation. This example creates a `ReportRoot` with a `Name` of `"alpha"` and a `ReportChild` with `Count = 7`, passes it to the `HierarchySerializer` constructor, and accesses the root node's instance type name, checks whether it has children, and prints the tree path representation via `ToString()`. Key steps include constructing a serializer from a plain object and reading the resulting node properties. Console output displays the `ReportRoot` type name, `True` for `HasChildren`, and the dot-separated path tree (`ReportRoot`, `ReportRoot.String`, `ReportRoot.ReportChild`).
```

**Context Used:** AGENTS.md ([source](https://github.com/codebeltnet/cuemon/blob/main/AGENTS.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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