ci: add dotnet overlay (dotnet-build + dotnet-format) - #24
Conversation
Final language overlay in Phase 3. modules/dotnet/ ships a strict, re-derived Directory.Build.props (Nullable, EnableNETAnalyzers + AnalysisMode=All, EnforceCodeStyleInBuild, TreatWarningsAsErrors) and dotnet.globalconfig (code-style severities; ruleset-only — TargetFramework/LangVersion stay consumer-supplied). Analysis is first-party only: the analyzers ship in the SDK, so there are no PackageReferences and no NuGet manifest (hence no Dependabot nuget ecosystem; the SDK pin is documented inline in the dotnet-fixtures lane). The build and dotnet format are split so they never double-report: the build owns code-quality (CAxxxx) + code-style (IDExxxx) + nullable; dotnet format whitespace owns whitespace (IDE0055 held off the build). Execution lives in ci-workflows as the dotnet-build and dotnet-format composite actions (referenced by SHA). good/bad fixtures + dotnet.test.sh assert the good fixture builds and formats clean and the bad fixture is flagged with specific rule IDs (IDE0161, CA1051) — proving the config loads. The self-lint dotnet-build and dotnet-format lanes consume the actions; a dotnet-fixtures lane installs the pinned SDK inline because its rule-code assertions need the toolchain on PATH. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fa3aad57b
ℹ️ 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".
| private readonly List<int> _amounts = []; | ||
|
|
||
| /// <summary>Adds an amount to the running set.</summary> | ||
| public void Add(int amount) => _amounts.Add(amount); |
There was a problem hiding this comment.
Make the good fixture satisfy enabled IDE rules
With the new props, AnalysisMode=All plus EnforceCodeStyleInBuild=true also bulk-enables IDExxxx code-style rules, and warnings are treated as errors. Since dotnet.globalconfig does not set csharp_style_expression_bodied_methods, IDE0022 uses its default preference for block-bodied methods, so these expression-bodied methods in the supposedly conforming fixture are reported as warnings-as-errors and the new dotnet-build / dotnet-fixtures lanes fail before validating the overlay.
Useful? React with 👍 / 👎.
…ception, bot composition, reply protocol) (#122) ## Summary Five reasoning-only convention updates to `engineering/naming.md` and `conventions/review/`: - **naming.md** — promotes the org-wide branch-naming grammar (Conventional Commits type prefix + cloud-agent/bot prefix, kebab-case slug) into its own section, restated abstractly rather than cited from any single downstream repo. - **naming.md** — excepts `github-iac`'s label-governance seam (`GovernedRepositorySpec.PreviousNames` aliasing, `Labels.cs` taxonomy applied via `Github.IssueLabels`) from the "Rename across all coupled edges" rule, since both propagate through a separate reviewed Pulumi deployment on their own cadence rather than atomically with the originating rename. - **conventions/review/reply-protocol.md** (new) — codifies the threaded, same-surface `Fixed in <sha>` reply as the standard way to close a review finding once addressed, plus conditional (bot-thread-only) resolution. - **conventions/review/ai-review-bot-composition.md** (new) — documents the expected AI-review-bot composition per repository governance class (archived / no-CI-surface / governed / high-traffic primary), derived from `github-iac`'s `GovernedRepositorySpec` registry rather than from visibility or ownership. - **conventions/review/code-quality.md** — converts the PR-title prose bullet to a reference-only pointer at the `pr-title` workflow (`ci-workflows/.github/workflows/semantic-pr.yml`) and `enforceability-tiers.md`, removing the duplicated deterministic-rule prose. ## Decisions closed - #24 `naming-branch-convention-org-wide` - #64 `naming-doc-conflict-content-fix` - #22 `replies-codify-inline-reply-protocol` - #51 `tooling-gov-review-bot-composition-standard` - #67 `tooling-gov-standards-catalog-duplicate-prose` Decisions Log: https://claude.ai/code/artifact/232ecdce-8316-4880-8c0a-dc3c7dcf3a63 Evidence/rationale: https://claude.ai/code/artifact/3160ae0e-c02f-4619-8de3-60d73faa1100 ## Test plan - [x] `markdownlint-cli2` — 0 errors on all changed/new files - [x] `lychee --offline` — 0 broken links/anchors - [x] `typos` — clean - [x] Local `lefthook` pre-commit hooks (typos, gitleaks, editorconfig, markdownlint) — all passed at commit time 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
What
The final language overlay in Phase 3 (mirrors the Python and TypeScript slices).
modules/dotnet/ships a strict, re-derived .NET ruleset; execution is thedotnet-buildanddotnet-formatcomposite actions merged in ci-workflows (#16, referenced by SHA0c00056).Decomposition (single owner, no double-report)
dotnet-buildDirectory.Build.props(AnalysisMode=All,EnforceCodeStyleInBuild,TreatWarningsAsErrors,Nullable) +dotnet.globalconfig(IDE severities)dotnet-formatdotnet format whitespace --verify-no-changesIDE0055is held off the build so whitespace stays single-owned bydotnet format— the direct analog of the Python overlay ignoringE501because the formatter owns wrapping.Re-derived, not ported
Re-derived from the official .NET docs and verified empirically on SDK 10.0.301, with medley specifics stripped (no Platform.Analyzers/Sonar/VSTHRD/BannedApi, no monorepo layout):
PackageReferences and no NuGet manifest. Hence no Dependabotnugetecosystem; the SDK pin is documented inline in thedotnet-fixtureslane (DOTNET_VERSION), and thesetup-dotnetSHA is tracked by the existinggithub-actionsecosystem.TargetFrameworkandLangVersionare omitted (consumer''s runtime floor drives them; Microsoft discouragesLangVersion=latest), the same way Ruff omitstarget-versionand tsconfig omitstarget.Tests & wiring
fixtures/dotnet/{good,bad}+dotnet.test.shassert the good fixture builds and formats clean and the bad fixture is flagged with specific rule IDs (IDE0161— off-by-default, proves the globalconfig+props loaded;CA1051— off in the default analysis mode, proves the strict posture loaded).dotnet-build/dotnet-formatlanes consume the actions against the good fixture; adotnet-fixtureslane installs the pinned SDK inline (its rule-code assertions need the toolchain onPATH).ci-statusaggregates all three.bin//obj/added to.gitignore;migration-plan.mdmarks the .NET overlay done.🤖 Generated with Claude Code