Conversation
Release publish was blocked by two wasm-tools workload bugs (see dotnet/runtime#114723): an outdated bundled wasm-opt missing bulk-memory-opt/call-indirect-overlong support, and a mono-aot-cross crash when AOT-compiling OpenCvSharp.dll. The workflow works around the wasm-opt issue by swapping in a newer binaryen build before publishing; RunAOTCompilation now defaults to false for Release until the AOT crash is fixed upstream. Also fixes wwwroot/index.html referencing /js/canvas.js as a root-absolute path, which 404s once the app is served from a GitHub Pages subpath. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Will drop the extra branch before merging. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Build+publish succeeded on this branch (run 29152731162); deploy only failed due to the github-pages environment's main-only protection rule, which is expected and will pass once merged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a GitHub Pages workflow for building and deploying the Blazor app, updates WebAssembly compilation settings and optimization flags, and changes the canvas script reference to work from a repository subpath. ChangesGitHub Pages deployment
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant DotnetPublish
participant BinaryenWasmOpt
participant PagesArtifact
participant GitHubPages
GitHubActions->>DotnetPublish: install wasm-tools and publish BlazorApp
GitHubActions->>BinaryenWasmOpt: download and verify pinned wasm-opt
BinaryenWasmOpt-->>DotnetPublish: replace bundled wasm-opt
DotnetPublish->>PagesArtifact: upload published wwwroot
GitHubActions->>GitHubPages: deploy uploaded artifact
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/deploy-pages.yml:
- Around line 8-11: Move pages: write and id-token: write from the
workflow-level permissions block into the deploy job’s permissions, while
retaining contents: read at the workflow level if needed by build and deploy.
Ensure the build job does not inherit Pages write or OIDC token permissions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2c659da3-55e4-4da4-bdd8-7b3234de0d5e
📒 Files selected for processing (3)
.github/workflows/deploy-pages.ymlBlazorApp/BlazorApp.csprojBlazorApp/wwwroot/index.html
Addresses CodeRabbit/zizmor finding: the build job (checkout, publish, upload-artifact) never needs Pages write or OIDC token access, so grant those only where actions/deploy-pages actually uses them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add GitHub Pages deploy workflow
Summary
.github/workflows/deploy-pages.yml: publishesBlazorAppin Release and deploys to GitHub Pages (enabled at https://shimat.github.io/opencvsharp_blazor_sample/) on every push tomain, or manually via workflow_dispatch.dotnet publish -c Releasewas blocked by two separate wasm-tools workload bugs, reproduced across net8.0 and net10.0 regardless of SDK feature band:wasm-opt(v117) predates binaryen PR #7106 (bulk-memory-opt/call-indirect-overlong, landed by v121). The workflow works around this by downloading and swapping in binaryenversion_130'swasm-optbefore publishing (checksum-verified). Once wasm-opt is new enough, a second, SDK-driven wasm-opt pass also needed its own flag set aligned with what emcc's internal pass already enables — added via aWasmOptConfigurationFlagsitem inBlazorApp.csproj(harmless for Debug builds, which don't invoke this pass).OpenCvSharp.dllcrashes the AOT compiler with a native GC assertion (sgen-alloc.c:409), on both net8.0 and net10.0. No workaround found yet, soRunAOTCompilationnow defaults tofalsefor Release (wastrue, which made every Release build/publish crash) — pass-p:RunAOTCompilation=trueto retry once this is fixed upstream.wwwroot/index.htmlreferencing/js/canvas.jsas a root-absolute path, which 404s once served from a GitHub Pages project subpath (/opencvsharp_blazor_sample/...) instead of the domain root.Test plan
dotnet publish -c Releasesucceeds with the wasm-opt swap + flag alignment, and the GitHub Pages upload-artifact step completes — see run https://github.com/shimat/opencvsharp_blazor_sample/actions/runs/29152731162 (thedeployjob there only failed because of thegithub-pagesenvironment's main-only protection rule, which is expected)mainand visit https://shimat.github.io/opencvsharp_blazor_sample/🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes