Quality is not a phase that follows development — it is a property that is either built into the delivery process or absent from the product. A "QA week" at the end of a sprint finds problems at the most expensive point in the cycle: after the code is written, reviewed, and integrated, when the cost of a fix is highest and the cognitive context of the original author is lowest. We wire automated quality and security checks into the merge process so problems are found at the cheapest point — in the PR, before merge, while the context is still live.

Test gates that engineering teams actually keep

The test pyramid applies to ML and backend services alike: fast, isolated unit tests on every PR; integration tests against real dependencies on merge to main; end-to-end tests on a staging environment before promotion to production. The pyramid fails when the layers are inverted — when teams rely on slow end-to-end tests in CI because there are no fast unit tests — producing CI runs that take 40 minutes and that engineers learn to merge around rather than wait for.

Flaky tests are treated as bugs, not as background noise. A test that sometimes passes and sometimes fails without any change in the code it covers provides negative value: it trains engineers to ignore test failures and reduces confidence in the entire test suite. When a flaky test is identified, it is fixed or quarantined within the same sprint it is found. A quarantined test is tracked as a backlog item with a deadline, not as permanent infrastructure.

Contract tests between services prevent the integration failures that unit tests cannot catch. A unit test verifies that code behaves correctly in isolation; a contract test verifies that the producer and consumer of an API agree on the shape and semantics of the interface. In a multi-service architecture, contract test failures in CI prevent the class of production incident where a service update silently breaks a downstream consumer.

Test coverage metrics are a useful floor, not a quality indicator. 80% line coverage means 20% of the code is untested; it says nothing about whether the tested 80% is tested meaningfully or whether the untested 20% is the most critical path. We use coverage as a minimum bar and mutation testing periodically to assess whether the test suite actually catches the defects it claims to catch.

Security integrated into the pipeline, not reviewed at the end

Secret scanning on every commit, not just at code review. Credentials and API keys committed to a repository become a permanent part of the git history even after they are deleted. Detecting the commit at the moment it happens — before it is pushed, before it is reviewed — means the credential is rotated before it enters any persistent log. Detection after the fact requires audit of who had access to the history and rotation of any credential that was committed.

Dependency vulnerability scanning on every build, with a defined policy for severity levels. A critical CVE in a direct dependency blocks the build; a high CVE in a transitive dependency creates a tracked issue with a resolution deadline. The policy is defined once and applied consistently — not evaluated case by case at release time when the pressure to ship creates exceptions that become permanent.

Static analysis for common vulnerability patterns — injection, XSS, insecure deserialization, broken access control — runs as part of the PR gate rather than as a periodic scan. A security finding that blocks a merge is addressed immediately by the author while the context is live. A security finding from a periodic scan requires triage, assignment, and context reconstruction by someone who may not be the original author.

Infrastructure security is validated by policy-as-code tools that run in CI against the IaC before it is applied. A Terraform plan that opens port 22 to the public internet should fail a policy check before the infrastructure is created — not be discovered in a quarterly security review after the configuration has been in place for three months.

Release management without heroics

A release process that requires a specific engineer to be available, specific steps to be executed in a specific order from memory, and judgment calls about readiness criteria is a process that creates heroism — and heroism in release management is a warning sign, not a compliment. A scripted, documented, and rehearsed release process can be executed by any engineer on the team without escalation.

Promotion pipelines move builds from staging to production through a defined sequence of automated checks and explicit approvals. The promotion is triggered by a build artifact, not by a manual deployment. The readiness criteria — passing integration tests, passing contract tests, manual smoke test sign-off from a product owner — are the same for every release and are verified by the pipeline before promotion proceeds.

Rollback procedures are rehearsed quarterly, not documented theoretically. A rollback procedure that has never been executed under realistic conditions will take longer than expected during an actual incident. Quarterly rollback drills in a production-equivalent environment establish the actual rollback time, surface tooling gaps, and build team confidence in the procedure before it is needed under pressure.

Changelogs are generated automatically from PR titles and conventional commit messages rather than written manually at release time. An automatically generated changelog that reflects every merged PR from the release window is more complete than a manually written one assembled under time pressure and almost always more accurate. The investment is in enforcing the commit and PR title conventions throughout the development cycle — not in changelog writing at the end.