Skip to content

Feature: change safety testability refactors - #69

Merged
alxxjohn merged 22 commits into
mainfrom
feature/change-safety-testability-refactors
Jul 27, 2026
Merged

Feature: change safety testability refactors#69
alxxjohn merged 22 commits into
mainfrom
feature/change-safety-testability-refactors

Conversation

@alxxjohn

Copy link
Copy Markdown
Contributor

Summary

This branch expands CodeGuard from static code-quality scanning into PR-level change-safety analysis. It adds a new Change Safety check family with config/profile support, detector coverage, PR-summary metrics, local quality precision rules, and
user-facing documentation.

What changed

  • Added a new checks.change configuration section and ChangeRulesConfig.
  • Added profile behavior:
    • startup keeps change-safety off by default
    • strict and enterprise enable change-safety
    • AI-safe applies tighter change-size/test-ratio thresholds
  • Added rule catalog metadata and fix templates for:
    • change.*
    • testing.*
    • refactor.*
    • naming/function/error/defensive/maintainability precision rules
  • Added a diff-mode Change Safety runner gated by cfg.Checks.Change.
  • Added change concentration detectors for:
    • oversized diffs
    • mixed concerns
    • too many concern families
    • mixed refactor and behavior changes
    • unnecessary public-surface expansion
    • moves without verification
  • Added testability detectors for:
    • behavior changes without tests
    • missing failure-path tests
    • hardwired dependencies in business logic
    • nondeterministic domain logic
  • Added local quality precision rules for:
    • ambiguous/generic names
    • function responsibility issues
    • weak error handling
    • defensive-programming gaps
    • maintainability regressions
  • Added additive pr_summary metrics for:
    • change_safety
    • maintainability_delta
    • refactor_confidence
  • Updated docs and examples with the new change-safety configuration and check glossary.

Testing

Verified with targeted detector, PR-summary, metadata/docs, and broad internal package test gates.

Notes

  • The new change/testability checks are intentionally diff-first.
  • Full scans no-op for the Change Safety section unless future rules add safe repo-level diagnostics.
  • Refactor confidence is heuristic/evidence-based; this branch does not claim semantic equivalence proof.

@alxxjohn
alxxjohn merged commit 9081ad3 into main Jul 27, 2026
16 checks passed
alxxjohn added a commit that referenced this pull request Jul 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](v1.2.2...v1.3.0)
(2026-07-27)


### Features

* add abstraction quality checks
([fc5a7ec](fc5a7ec))
* add change safety diff detectors
([ebc2f80](ebc2f80))
* add change safety PR summary metrics
([5b10ecd](5b10ecd))
* add delivery governance checks
([eb1b803](eb1b803))
* add local quality precision rules
([dd75b79](dd75b79))
* add local quality precision rules
([00c493e](00c493e))
* add observability and operations checks
([3e8713c](3e8713c))
* add operability, design, and delivery governance checks
([#70](#70))
([a52199a](a52199a))
* add opt-in recommended check defaults
([1680b21](1680b21))
* add opt-in recommended check defaults
([#66](#66))
([67510e3](67510e3))
* add production readiness rule families
([d58e8eb](d58e8eb))
* Add production reliability and data-readiness checks across languages
([#67](#67))
([c243ead](c243ead))
* add refused bequest smell detection
([053cb1a](053cb1a))
* add refused bequest smell detection
([#72](#72))
([4423aa4](4423aa4))
* add structural smell quality rules
([eefd8bd](eefd8bd))
* change safety testability refactors
([#69](#69))
([9081ad3](9081ad3))
* deepen code smell and maintainability precision checks
([#71](#71))
([d554347](d554347))
* deepen reliability parity checks
([fc8d769](fc8d769))
* expand production readiness language coverage
([588bf19](588bf19))
* scaffold change safety checks
([0b313d9](0b313d9))


### Bug Fixes

* dogfood production readiness coverage
([1110f4f](1110f4f))
* restore change testability detectors
([88f6df0](88f6df0))
* satisfy strict lint for change safety
([311716c](311716c))
* satisfy strict lint for operability governance
([abc9fd1](abc9fd1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@alxxjohn
alxxjohn deleted the feature/change-safety-testability-refactors branch July 28, 2026 14:04
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