Dogfood BettererNet on its own repo + alpha release pipeline - #5
Conversation
Add a regex `excludes` option so globbing real .NET repos doesn't count generated build output; the declarative config defaults to skipping bin/obj. This gap surfaced immediately when pointing the tool at this repo. Add a root betterer.json guarding the source against new sync-over-async (2 acknowledged in BettererHistoryReporter), #pragma warning disable, async void, and NotImplementedException. Record the baseline in .betterer.results and run `betterernet ci` as a CI step. Docs: document excludes + the bin/obj default; refresh the stale CLI description; note the dogfooding in the README.
Add a release workflow that builds, tests, packs, and pushes all 13 packages to nuget.org on a `v*` tag (or manual dispatch with a version), gated on a NUGET_API_KEY secret. Add CHANGELOG.md documenting the 0.1.0-alpha surface and RELEASING.md with the cut-a-release steps. Update ROADMAP to note the release pipeline and dogfooding.
There was a problem hiding this comment.
Pull request overview
This PR dogfoods BettererNet against its own repository by committing a declarative betterer.json + baseline results and wiring betterernet ci into CI, and it adds an alpha release pipeline for publishing NuGet packages via a tag-triggered workflow. It also extends the regex test integration to support glob excludes and makes the declarative config default to skipping generated bin/obj output.
Changes:
- Add
excludessupport toBettererRegexTestand defaultbetterer.json-driven regex tests to exclude**/bin/**and**/obj/**. - Add repo-level dogfooding configuration (
betterer.json,.betterer.results) and run the self-check in CI. - Add a tag/manual-dispatch GitHub Actions release workflow plus release documentation (CHANGELOG/RELEASING/README/ROADMAP updates).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/BettererNet.Tests/BettererRegexTestTests.cs | Updates regex test calls for new signature and adds coverage for exclude globs. |
| tests/BettererNet.Tests/BettererConfigFileTests.cs | Adds test ensuring declarative regex config excludes bin/obj by default. |
| src/BettererNet.Regex/BettererRegexTest.cs | Introduces excludes to the regex test implementation and applies it to scan + fingerprint. |
| src/BettererNet.Cli/BettererConfigFile.cs | Adds default bin/obj excludes for declarative regex tests. |
| ROADMAP.md | Updates roadmap to reflect dogfooding and release workflow completion. |
| RELEASING.md | Adds step-by-step NuGet release instructions. |
| README.md | Refreshes CLI description and documents self-guarding behavior. |
| DOCUMENTATION.md | Documents regex excludes and the default bin/obj behavior in declarative config. |
| CHANGELOG.md | Adds an initial 0.1.0-alpha changelog entry. |
| betterer.json | Adds a repo-level BettererNet config to guard the codebase. |
| .github/workflows/release.yml | Adds a tag/manual-trigger release workflow to pack and push NuGet packages. |
| .github/workflows/ci.yml | Adds a CI step to run betterernet ci against the committed baseline. |
| .betterer.results | Adds the committed baseline results used by CI dogfooding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Push the 13 BettererNet.* packages by name (and fail if an expected one is missing) instead of artifacts/*.nupkg, so a new or internal project can never be published to nuget.org by accident.
|
@codex make a review! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09796100fc
ℹ️ 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".
- Validate the resolved version as SemVer and pass the manual input via env
rather than inline ${{ }} interpolation, closing a shell-injection vector
on workflow_dispatch and rejecting malformed versions.
- Add a dry_run input (default true) so manual runs pack-only by default;
tag pushes still publish. Fixes RELEASING.md describing manual runs as a
dry run when they actually pushed to nuget.org.
- Document the pre-1.0 / ConfigLoader binary-compat policy in RELEASING.md.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Builds on #4 (merged). Two steps toward a real release: make BettererNet guard its own codebase, then add the pipeline to publish it.
Dogfooding
Pointing the tool at its own repo immediately surfaced a real gap, which this PR fixes:
bin/objexclusion, so**/*.cswould also scan generated build output — giving non-deterministic counts between a fresh checkout and a built CI tree (every adopter hits this on day one). Added anexcludesoption toBettererRegexTest; the declarative config now defaults to skippingbin/obj.betterer.jsonguarding the source: no sync-over-async (2 real calls inBettererHistoryReporter, tracked as acknowledged debt), no#pragma warning disable, noasync void, noNotImplementedException(the last three locked at zero)..betterer.results) and wiredbetterernet ciinto CI.ciexits 0; a planted#pragma warning disable→[worse]with exactfile:lineand exit 1; removed → green again.Alpha release prep
.github/workflows/release.yml— on av*tag (or manual dispatch with a version), builds → tests → packs →dotnet nuget pushall 13 packages to nuget.org (--skip-duplicate), gated on aNUGET_API_KEYsecret.CHANGELOG.mddocumenting the0.1.0-alphasurface andRELEASING.mdwith the cut-a-release steps.Verification
dotnet pack→ 13 packages; both workflow YAMLs parse.nuget push(needs the key + live nuget.org).To ship the alpha after merge
NUGET_API_KEY(Settings → Secrets and variables → Actions).git tag v0.1.0-alpha && git push origin v0.1.0-alpha→ the workflow publishes.https://claude.ai/code/session_01V1phdgDossB7htzxcbZTNF
Generated by Claude Code