Repository navigation
Fix generated C# release contract and NuGet environment wiring - #4169
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe C# SDK release pipeline now records generated ChangesC# generated-source release flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CSharpPreparer
participant ReleaseContract
participant ProductSliceVerifier
participant NuGetPublisher
CSharpPreparer->>ReleaseContract: write-generated-manifest
ReleaseContract-->>CSharpPreparer: generated-sources.sha256
ProductSliceVerifier->>ReleaseContract: verify-generated-sources
ReleaseContract-->>ProductSliceVerifier: validated packaged sources
NuGetPublisher->>ReleaseContract: verify-generated-sources
ReleaseContract-->>NuGetPublisher: validated packaged sources
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
Binary size checks passed✅ 7 passed
Generated by |
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
`@baml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.PrimitivePackageConsumer/verify.sh`:
- Around line 53-57: Update the package comparison pipeline in verify.sh to
replace GNU-only find -printf with portable find -print and equivalent
sed/truncation that preserves paths relative to each root. Apply the same change
to both generated_source_root and consumer/baml_client listings, keeping the
sorted .g.cs comparison unchanged.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 085a69a1-eeb0-4ba3-a39a-406f35f242a3
📒 Files selected for processing (7)
.github/workflows/prepare-csharp-sdk.reusable.yaml.github/workflows/publish2-csharp-sdk.yaml.github/workflows/release-baml-language.yml.github/workflows/verify-csharp-product-slice.reusable.yamlbaml_language/sdks/csharp/bridge_csharp/tests/Baml.Bridge.PrimitivePackageConsumer/verify.shscripts/baml-csharp-release-contractscripts/tests/test_release_pipeline_contract.py
💤 Files with no reviewable changes (1)
- .github/workflows/release-baml-language.yml
Summary
boundary-tools-prodenvironment so Infisical-hydratedNUGET_USERis resolved whereNuGet/loginrunspublish2-csharp-sdk.yamland remove the invalid caller-to-reusable-workflow secret forwardingWhy
The release integration itself was green after #4158, but the production release failed during C# preparation because Dhilan's Swift/release work also expanded the generated C# stdlib surface from 11 to 35 legitimate
.g.csfiles. The hard-coded filename snapshot was not a sound product invariant. This keeps Dhilan's generator output and changes the release contract to pin what preparation actually produced, including paths and hashes, so later additions, removals, or content changes still fail closed.The NuGet trusted-publisher policy is configured for the reusable workflow and existing
boundary-tools-prodenvironment. GitHub environment secrets are resolved in the called job; they are not passed from the caller.Validation
sdk_tests/crates/csharp/primitive_slicewith the current CLI.g.csfilespython3 -m unittest scripts.tests.test_release_pipeline_contract(9 tests)bash -non the package consumergit diff --checkSafety
No compiler/runtime semantics, stdlib implementation, platform support, or shared CFFI artifact format is changed. This PR does not trigger a production release.
Summary by CodeRabbit
generated-sources.sha256manifest.*.g.csfilename list comparisons with manifest-driven validation (missing/unexpected/modified detection).