Release Quality Governance
This is the canonical Definition of Done for ComplexityAnalysis.Analyzers.
Issue-specific specifications, contributor guidance, agents, and pull requests
should point here instead of redefining the same policy.
Principle
Section titled “Principle”Validation must be proportional to risk.
A README typo does not need the performance harness. A Roslyn dependency change does need host and package compatibility evidence. A diagnostic behavior change does need triggering and non-triggering tests, documentation, and release tracking when the public analyzer contract changes.
Start every change by answering:
- What type of change is this?
- Which public behavior, package, performance, compatibility, documentation, security, or release risk does it carry?
- Which evidence proves those risks are handled?
- Which validations are intentionally not applicable?
Change-Type Matrix
Section titled “Change-Type Matrix”| Change type | Examples | Required evidence | Not normally required |
|---|---|---|---|
| Documentation only | README, docs, typo, links, examples that do not alter behavior. | Markdown review, coherent links, EN/PT-BR alignment when public equivalent content changes. | Analyzer performance harness, package consumer matrix, release tracking. |
| Test only | Characterization, regression tests, fixtures. | Restore/build/test; prove no unintended production behavior change. | Performance validation unless harness, workload, or performance infrastructure changes. |
| Analyzer behavior | New analysis, heuristic change, complexity composition, recursion or interprocedural behavior. | Triggering and non-triggering tests; #31 characterization remains green or intentional before/after is documented; false-positive review; conservative Unknown; cancellation/concurrency review; performance assessment; public docs when behavior is user-visible. |
Package validation beyond normal gates unless dependencies, target framework, packaging, or consumer loading change. |
| New diagnostic | New rule ID, descriptor, message, category, severity, enablement, reporting logic. | Unique ID; descriptor contract; triggering/non-triggering tests; diagnostic UX per #34; EN/PT-BR catalog docs; config docs if configurable; AnalyzerReleases.Unshipped.md; performance impact review; package compatibility preserved. |
Release publication or version bump automation. |
| Diagnostic message or UX | Message text, diagnostic properties, location, guidance. | #34 convention; deterministic message/properties tests; release tracking when public diagnostic metadata changes; docs when public guidance changes; prove triggering did not change unintentionally. | Performance harness unless explanation generation touches hot paths materially. |
| Configuration change | New key, default, valid values, fallback, boundaries. | Key documented; default and allowed values documented; invalid fallback tested; boundary tests; EN/PT-BR docs; release tracking; backwards compatibility review. | Package consumer matrix unless package or host behavior changes. |
| Performance-sensitive change | Traversal, caches, recurrence solver, semantic resolution, interprocedural logic, known operations. | #32 structural gates; relevant performance tests/harness; boundedness; cancellation; cache ownership review; regression justification for intentional variance. | Fragile wall-clock thresholds as the only proof. |
| Roslyn or dependency change | Microsoft.CodeAnalysis*, analyzer authoring packages, test/build dependencies. |
Reason; #33 compatibility matrix; package contract; supported host evidence; dependency leakage analysis; PrivateAssets review; no Workspaces without explicit architecture decision; Dependabot policy respected. |
Public docs unless support policy or consumer behavior changes. |
| Packaging change | .csproj pack settings, .nupkg layout, package metadata, consumer loading. |
Local pack; .nupkg inspection; analyzer path validation; no runtime lib/ regression; no dependency leakage; consumer test; compatibility impact review. |
Diagnostic characterization beyond normal tests unless behavior changed. |
| CI or workflow change | GitHub Actions, permissions, required checks, workflow names/jobs. | Least privilege; event and permission review; pin/version review; branch protection/ruleset compatibility; no weakened gates; no new continue-on-error on critical validation; release side effects assessed. |
Analyzer behavior tests unless workflow change alters test selection or validation semantics. |
| Release change | Release workflow, tags, NuGet, GitHub Packages, GitHub Release, version semantics. | Explicit maintainer intent; main-branch and semantic-version behavior; retry/idempotency; Trusted Publishing/OIDC permissions; tag immutability; package publication targets. | Performing a production release during ordinary development. |
| Future CLI or project-level change | Project scanning, aggregate reports, filesystem/project loading, JSON/console output. | Keep project-level work outside DiagnosticAnalyzer hot paths; test filesystem/project loading separately; prove analyzer package runtime remains clean. |
Treating CLI I/O as acceptable analyzer hot-path I/O. |
Definition of Done
Section titled “Definition of Done”Use the dimensions that apply to the change.
Correctness
Section titled “Correctness”- Expected behavior is specified before implementation when behavior changes.
- Triggering, non-triggering, and regression tests are added or updated when analyzer behavior changes.
- #31 characterization remains green unless a deliberate behavior change records
Before,After, andReason. - Unsupported or unproven cases remain
Unknown. - No known high-confidence false positive is introduced.
Performance
Section titled “Performance”- Analyzer work remains bounded, demand-driven, cancellation-aware, and safe for concurrent execution.
- Hot paths do not add filesystem I/O, network I/O, process execution, telemetry, mandatory whole-solution scans, or mandatory whole-compilation call graph construction.
- Changes to traversal, recursion, caching, semantic resolution, or known operations satisfy #32 structural gates and record any material variance.
Compatibility And Packaging
Section titled “Compatibility And Packaging”- The analyzer target framework remains
netstandard2.0unless an explicit architecture decision changes the support policy. - Roslyn compatibility follows the #33 baseline.
- The package keeps the analyzer assembly under
analyzers/dotnet/cs/and does not regress into runtimelib/assets. - Roslyn authoring dependencies remain private; consumers do not receive unnecessary compile/runtime/transitive dependencies.
- Supported SDK host evidence is provided for Roslyn, dependency, packaging, or consumer-loading changes.
Diagnostic Experience
Section titled “Diagnostic Experience”- Public diagnostics explain only evidence the analyzer can prove.
- Messages and properties are deterministic, concise, and stable.
- Guidance is conditional when semantic suitability cannot be proven.
- Diagnostic locations point to useful user code.
- New or changed diagnostics follow the #34 convention.
Documentation
Section titled “Documentation”- Public behavior changes update the analyzer catalog, configuration docs, architecture/getting-started docs, or README only where relevant.
- Equivalent public content in
docs/enanddocs/pt-BRstays semantically aligned. - Internal architecture notes and CI-only details do not require duplicate translation unless they become public user/contributor guidance.
Release Tracking And Versioning
Section titled “Release Tracking And Versioning”- Update
src/ComplexityAnalysis.Analyzers/AnalyzerReleases.Unshipped.mdfor new diagnostics, changed diagnostics, removed diagnostics, public configuration, or public analyzer behavior relevant to release notes. - Public changes consider semantic version impact: fixes are usually patch, backward-compatible capabilities are usually minor, and breaking diagnostic, configuration, or package-contract changes are major candidates.
- Do not automate version bumps as part of ordinary analyzer changes unless a separate release issue asks for it.
Security And Dependencies
Section titled “Security And Dependencies”- Analyzer hot paths do not access secrets, network, filesystem, telemetry, or processes.
- Dependency changes document purpose, security impact, compatibility, and package impact.
- Workflow and release changes review
GITHUB_TOKEN, OIDC, environments, package registries, and permissions. - Do not commit secrets, local packages, coverage output, or build artifacts.
Required Checks And CI Mapping
Section titled “Required Checks And CI Mapping”The active main ruleset requires these status checks by exact name:
| Quality dimension | Required check | What it covers |
|---|---|---|
| Correctness and coverage signal | Validate analyzer |
Restore, Release build, tests with OpenCover verification, coverage artifact. |
| Code quality and security analysis | SonarQube Cloud |
Sonar analysis and quality gate after validation. |
| Analyzer package layout | Pack analyzer |
Pack and inspect analyzer placement under analyzers/dotnet/cs/; reject runtime lib/ analyzer asset. |
| Core solution validation | Quality |
Restore, Release build, broad test suite excluding focused package/performance suites. |
| Package contract | Package |
Pack, run package contract tests, upload local .nupkg artifact. |
| Performance | Performance |
Structural performance suite and compiler ReportAnalyzer=true reporting path. |
| Host compatibility | Compatibility (8.0.x) |
Real package consumer smoke under .NET 8 SDK host. |
| Host compatibility | Compatibility (9.0.x) |
Real package consumer smoke under .NET 9 SDK host. |
| Host compatibility | Compatibility (10.0.x) |
Real package consumer smoke under .NET 10 SDK host. |
Optional checks
Section titled “Optional checks”| Quality dimension | Optional check | What it covers |
|---|---|---|
| Project regression evidence | Complexity regression |
Manual snapshot generation/comparison, artifact retention, and job summary. |
Additional branch rules require pull requests, linear history, thread resolution,
code-scanning limits, and protected release tags matching v* for the analyzer,
tool-v* for the independently versioned CLI, and mcp-v* for the independently
versioned MCP server.
Do not rename required workflow or job names casually. If a check name must change, treat it as an explicit governance change and document the ruleset impact.
Local Validation Menu
Section titled “Local Validation Menu”The common broad validation path is:
dotnet restore ComplexityAnalysis.Analyzers.slnxdotnet build ComplexityAnalysis.Analyzers.slnx --configuration Release --no-restoredotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-buildAdd focused checks according to risk:
dotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter AnalyzerCharacterizationBaselineTestsdotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter AnalyzerPerformanceBudgetContractTestsdotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter PerformanceSyntheticCorpusTestsdotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter AnalyzerPackageContractTestsdotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter AnalyzerPackageConsumerContractTestsdotnet test ComplexityAnalysis.Analyzers.slnx --configuration Release --no-build --filter AnalyzerHostCompatibilityContractTestsdotnet pack src/ComplexityAnalysis.Analyzers/ComplexityAnalysis.Analyzers.csproj --configuration Release --no-build -p:PackageVersion=0.0.0-local --output artifacts/local-packagesdotnet build ./performance/ComplexityAnalysis.Analyzers.Performance/ComplexityAnalysis.Analyzers.Performance.csproj --configuration Release --no-restore -t:Rebuild -p:ReportAnalyzer=true -p:UseSharedCompilation=false -v:detailedDocumentation-only changes may record a lighter validation such as Markdown
review, link review, git diff --check, and no analyzer behavior impact.
Branch, PR, And Issue Flow
Section titled “Branch, PR, And Issue Flow”Use the simple flow:
issue -> dedicated branch -> implementation -> proportional local validation -> pull request -> required checks -> review -> merge -> release separately when requestedUse Conventional Commits:
feat:for backward-compatible user-facing capability;fix:for defects;perf:for performance changes;test:for test-only changes;docs:for documentation;refactor:for non-behavioral code structure;build:for build system or package construction;ci:for workflow changes;chore:for maintenance that does not fit the categories above.
Future feature issues should ideally include context, goal, scope, non-goals, dependencies, acceptance criteria, and a Definition of Done. Trivial bugs and small docs fixes can stay lighter when a full template would not add clarity.
Release Safety
Section titled “Release Safety”Normal validation is not a production release.
Do not create tags, publish NuGet packages, publish GitHub Packages, create GitHub Releases, move release tags, or trigger production release workflows as part of ordinary development. Those actions require explicit maintainer intent.