Skip to content

Definition of Done

This page sets the checklist that every ConnectSoft pull request meets before it is merged. It is written for pull request authors, who check it before asking for review, and for reviewers, who check it during review.

Each item is a rule with its own ID. Detailed rules for each area live on the area pages and are linked from here.

Checklist

Rule The pull request…
CS-DOD-001 builds without new compiler or analyzer warnings
CS-DOD-002 adds tests for the change, including a regression test for every bug fix
CS-DOD-003 does not lower the coverage threshold
CS-DOD-004 updates the documentation when behaviour, configuration or a public API changes
CS-DOD-005 contains no secrets
CS-DOD-006 documents every public and internal member with XML comments
CS-DOD-007 links the work item when there is one

Rules

CS-DOD-001: No new warnings

Severity: major · Applies to: service, library, api-client, blazor, template · Enforced by: manual (target: ENF-004) · Status: active

Why

The build does not yet fail on warnings (ENF-004), so a new warning is easy to miss and hard to find later among hundreds. Analyzer warnings often point at real defects: non-constant log templates, a missing ConfigureAwait in library or service code, or disposal problems. CA2007 does not apply to Orleans grains or Blazor components, which must not use ConfigureAwait(false) (see async and concurrency).

Do

  • Build the changed projects and compare the warning list with the default branch.
  • Fix every warning the change introduces.
  • When a warning must stay, suppress it at the narrowest scope with a justification that names the reason. ADR-0103 sets the warning policy.

Don't

  • Suppress a warning project-wide to make the change build cleanly.
  • Fix unrelated existing warnings in the same pull request, unless the work item asks for it.

How to check

  • The build of the pull request has no warning that the default branch build does not have.
  • The change adds no project-wide suppression, such as a NoWarn entry in a project file or Directory.Build.props, or an .editorconfig line that lowers a rule's severity for the whole project.
  • Each new suppression is at the narrowest scope and has a justification that names the reason.

CS-DOD-002: Tests come with the change

Severity: major · Applies to: service, library, api-client, blazor, template · Enforced by: manual · Status: active

Why

Code without a test can be broken by the next change without anyone noticing. A bug without a regression test comes back.

Do

  • Add or update tests for every behaviour the change adds or changes. See the testing standard.
  • For a bug fix, add a test that fails without the fix and passes with it.
  • For a new validator, add its dedicated test class (CS-VAL-001).

Don't

  • Merge a bug fix whose only proof is a manual check.
  • Delete or skip a failing test to make the build pass.

How to check

  • The pull request contains test changes that exercise the changed code.
  • A bug fix includes a test that names the defect behaviour.
  • The change does not delete a failing test or skip it, for example with [Ignore] or a test filter, to make the build pass.

CS-DOD-003: The coverage threshold is not lowered

Severity: major · Applies to: service, library, api-client, blazor, template · Enforced by: manual (target: ENF-021) · Status: active

Why

ADR-0105 sets an 80% line coverage target, with a ratchet: a repository's threshold only goes up.

Do

  • Keep the codeCoverageThreshold pipeline variable at its current value or raise it.
  • When measured coverage is well above the threshold, raise the threshold toward 80.

Don't

  • Lower the threshold to get a pull request through.

How to check

The diff does not lower codeCoverageThreshold or any other coverage gate.

CS-DOD-004: Documentation follows behaviour

Severity: minor · Applies to: service, library, api-client, blazor, template, docs, pipelines · Enforced by: manual · Status: active

Why

Documentation that describes old behaviour is worse than none, because people and AI agents act on it.

Do

Update the documentation in the same pull request when the change alters: - behaviour that users or callers see; - a configuration key, its default or its meaning; - a public API, contract or message; - a template parameter or generated output; - a rule in these standards.

Don't

  • Leave a documentation update for a later pull request when the behaviour changes now.

How to check

For each such change in the diff, the matching documentation page, README or AGENTS.md is updated in the same pull request.

CS-DOD-005: No secrets in the change

Severity: blocker · Applies to: service, library, api-client, blazor, template, docs, pipelines · Enforced by: manual (target: ENF-022) · Status: active

Why

A secret in Git history stays there after it is deleted from the files. The only fix is to revoke it. See Security and compliance.

Do

  • Read secrets from configuration providers, environment variables or pipeline secret variables.
  • Use obvious placeholders in samples and documentation, such as <your-feed-token>.

Don't

  • Commit passwords, tokens, keys, connection strings with credentials, or certificates. This applies to every file type, including nuget.config, appsettings*.json, pipeline YAML, scripts and documentation.

How to check

  • Search the diff for password, pwd=, secret, token, apikey, ClearTextPassword, AccountKey= and private key headers.
  • Every hit is a placeholder or a reference to a secret store.

CS-DOD-006: XML comments on public and internal members

Severity: minor · Applies to: service, library, api-client, blazor, template · Enforced by: manual · Status: active

Why

ConnectSoft libraries publish their XML documentation with the package, and generated services are read by people who did not write them. Internal members are included because most service code is internal.

Do

  • Add <summary> to every public and internal type and member the change adds, test helpers included.
  • Add <param> for every parameter and <returns> for every member that returns a value, Task included, as CS-XML-001 describes.
  • Add <exception> for each exception a caller should handle.

Don't

  • Write comments that repeat the member name, such as "Gets the order id".

How to check

  • Every new or changed public or internal type and member in the diff has an XML <summary>.
  • Each such member also has a <param> for every parameter, a <returns> when it returns a value (Task included), and an <exception> for each exception a caller should handle.

CS-DOD-007: Link the work item

Severity: nit · Applies to: service, library, api-client, blazor, template, docs, pipelines · Enforced by: manual · Status: active

Why

The work item holds the acceptance criteria the reviewer checks against.

Do

When the change belongs to a work item: - link it to the pull request; - reference it in the commits (CS-GIT-005).

Don't

  • Link a work item that the change does not implement.

How to check

The pull request shows the linked work item, when there is one.

CS-DOD-008: Run the full test suites of every repository the change affects

Severity: major · Applies to: service, library, api-client, blazor, template · Enforced by: manual · Status: active

Why

A change of behaviour or wording is pinned by tests in other test projects and other repositories, such as acceptance tests, end-to-end tests and consumer libraries. A filtered run or the owning project's unit tests alone stay green while those tests fail in CI.

Do

  • Run the full unit, acceptance and architecture suites of the changed repository, after a build.
  • Run the full suites of each repository that consumes the changed contract, message or text.
  • Search every test project for the old terms and literals before you call the change done.

Don't

  • Call a change done on a filtered run or on --no-build after edits.
  • Pin user-facing text in tests with literals when a message constant exists.

How to check

The pull request lists the suites that ran, with their test counts, for each affected repository.

CS-DOD-009: Prove a fix against the binary that contains it

Severity: major · Applies to: service, library, api-client, blazor, template · Enforced by: manual · Status: active

Why

A red-then-green proof means nothing when the run used a binary built before the change. Restored files keep old modification times and skip incremental builds, conflicting output paths start a different binary than the one built, and --no-build runs ignore edits to files the build copies.

Do

  • Build before each half of the proof, and touch files restored by a move or a copy.
  • Confirm that the running binary contains the change, for example by its module path and a marker of the change.

Don't

  • Run the proof with --no-build after edits.
  • Combine a custom output path with --artifacts-path.

How to check

The verification evidence names the binary that ran and shows that it contains the change.