Skip to content

ci: add dotnet overlay (dotnet-build + dotnet-format) - #24

Merged
kyle-sexton merged 1 commit into
mainfrom
ci/dotnet-overlay
Jun 23, 2026
Merged

ci: add dotnet overlay (dotnet-build + dotnet-format)#24
kyle-sexton merged 1 commit into
mainfrom
ci/dotnet-overlay

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

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 the dotnet-build and dotnet-format composite actions merged in ci-workflows (#16, referenced by SHA 0c00056).

Decomposition (single owner, no double-report)

Owner Concern Artifact
dotnet-build code-quality (CAxxxx) + code-style (IDExxxx) + nullable + compiler, warnings-as-errors Directory.Build.props (AnalysisMode=All, EnforceCodeStyleInBuild, TreatWarningsAsErrors, Nullable) + dotnet.globalconfig (IDE severities)
dotnet-format whitespace/layout dotnet format whitespace --verify-no-changes

IDE0055 is held off the build so whitespace stays single-owned by dotnet format — the direct analog of the Python overlay ignoring E501 because 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):

  • First-party only — the analyzers ship in the SDK, so there are no analyzer PackageReferences and no NuGet manifest. Hence no Dependabot nuget ecosystem; the SDK pin is documented inline in the dotnet-fixtures lane (DOTNET_VERSION), and the setup-dotnet SHA is tracked by the existing github-actions ecosystem.
  • Ruleset-onlyTargetFramework and LangVersion are omitted (consumer''s runtime floor drives them; Microsoft discourages LangVersion=latest), the same way Ruff omits target-version and tsconfig omits target.

Tests & wiring

  • fixtures/dotnet/{good,bad} + dotnet.test.sh assert 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).
  • Self-lint dotnet-build / dotnet-format lanes consume the actions against the good fixture; a dotnet-fixtures lane installs the pinned SDK inline (its rule-code assertions need the toolchain on PATH). ci-status aggregates all three.
  • bin//obj/ added to .gitignore; migration-plan.md marks the .NET overlay done.

🤖 Generated with Claude Code

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>
@kyle-sexton
kyle-sexton merged commit d0149e0 into main Jun 23, 2026
27 checks passed
@kyle-sexton
kyle-sexton deleted the ci/dotnet-overlay branch June 23, 2026 14:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

kyle-sexton added a commit that referenced this pull request Jul 15, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant