Surface package-bundled private gallery docs#397
Conversation
…-pages # Conflicts: # Docs/PowerForge.Web.Pipeline.md # PowerForge.Web.Cli/WebPipelineRunner.Tasks.cs # PowerForge.Web/Models/WebPrivateGallery.cs # Schemas/powerforge.web.pipelinespec.schema.json
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddeae281eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| var kind = string.IsNullOrWhiteSpace(asset.Kind) ? Classify(asset.Path, classify) : asset.Kind; | ||
| var doc = CreateDocument(source, normalizedSource, asset.Path, null, package.WebUrl, null, kind, docs.Count); | ||
| var doc = CreateDocument(source, normalizedSource, asset.Path, asset.Content, package.WebUrl, null, kind, docs.Count); |
There was a problem hiding this comment.
Honor includeContent/maxContentBytes for package sources
When portal-docs-index is run with includeContent: false (or a small maxContentBytes), package-backed docs still inject full asset.Content into docs.json because IndexPackageSource passes it straight to CreateDocument without checking WebPortalDocsOptions. This newly bypasses the content controls that local/GitHub/Azure DevOps sources respect, so users can still leak or bloat output with bundled package text even when they explicitly disabled/limited content in this step.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06a83492e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (entry.Length > maxBytes) | ||
| { | ||
| metadata.Warnings.Add($"Skipped document content for '{entry.FullName}' because it exceeds the private gallery document content size limit."); | ||
| return null; |
There was a problem hiding this comment.
Truncate oversized package docs instead of dropping content
ReadDocumentContent currently returns null whenever a document is larger than maxDocumentContentBytes, which makes the limit an all-or-nothing filter rather than a byte cap. That means a README/docs file that is only slightly over the configured limit loses all captured content, and downstream portal-module-pages skips generating a document page because it only emits pages for docs with non-empty content. This is a functional regression for the new “bounded content” flow: users tuning the limit to reduce output size will silently lose pages instead of getting truncated content.
Useful? React with 👍 / 👎.
Summary
Validation