Skip to content

Commit 1872fc3

Browse files
test(docs): update docs
Statistics: 6 files changed, 135 insertions, 221 deletions Summary: - Dirs: .=4, regix=1, tests=1 - Exts: .md=2, .py=2, .yml=1, .json=1 - A/M/D: 0/6/0 - Symbols: test_signature_break_detected, _check_signature_break, _check_mock_inflation, class TestSmellsInReport Modified files: - README.md (+4/-4) - SUMD.md (+54/-30) - Taskfile.yml (+15/-2) - regix/smells.py (+31/-0) - sumd.json (+25/-185) - tests/test_smells.py (+6/-0) Changes (notes): - README.md (+4/-4): update documentation - SUMD.md (+54/-30): update - Taskfile.yml (+15/-2): update - regix/smells.py (+31/-0): add functions: _check_signature_break - sumd.json (+25/-185): update - tests/test_smells.py (+6/-0): add functions: test_signature_break_detected Implementation notes (heuristics): - Type inferred from file paths + diff keywords + add/delete ratio - Scope prefers 'goal' when goal/* is touched; otherwise based on top-level dirs - For <=6 files: generate short per-file notes from added lines (defs/classes/click options/headings) - A/M/D derived from git name-status; per-file +X/-X from git numstat
1 parent 9abd6ab commit 1872fc3

11 files changed

Lines changed: 153 additions & 225 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
## [Unreleased]
44

5+
## [0.1.26] - 2026-05-27
6+
7+
### Docs
8+
- Update README.md
9+
- Update SUMD.md
10+
11+
### Test
12+
- Update tests/test_smells.py
13+
14+
### Other
15+
- Update Taskfile.yml
16+
- Update regix/smells.py
17+
- Update sumd.json
18+
519
## [0.1.25] - 2026-05-27
620

721
### Docs

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## AI Cost Tracking
22

3-
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.25-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
4-
![AI Cost](https://img.shields.io/badge/AI%20Cost-$2.71-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-14.2h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
3+
![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.26-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
4+
![AI Cost](https://img.shields.io/badge/AI%20Cost-$2.92-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-14.7h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)
55

6-
- 🤖 **LLM usage:** $2.7136 (35 commits)
7-
- 👤 **Human dev:** ~$1417 (14.2h @ $100/h, 30min dedup)
6+
- 🤖 **LLM usage:** $2.9201 (36 commits)
7+
- 👤 **Human dev:** ~$1467 (14.7h @ $100/h, 30min dedup)
88

99
Generated on 2026-05-27 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
1010

SUMD.md

Lines changed: 54 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Regression Index — detect and measure code quality regressions between git ver
1313
## Metadata
1414

1515
- **name**: `regix`
16-
- **version**: `0.1.24`
16+
- **version**: `0.1.25`
1717
- **python_requires**: `>=3.10`
1818
- **license**: Apache-2.0
1919
- **ecosystem**: SUMD + DOQL + testql + taskfile
@@ -27,41 +27,65 @@ SUMD (description) → DOQL/source (code) → taskfile (automation) → testql (
2727

2828
## Dependencies
2929

30-
- **runtime**: `pyyaml>=6.0`, `typer>=0.12`, `rich>=13.0`
31-
- **analysis (optional)**: `lizard>=1.17`, `radon>=6.0`, `coverage[toml]>=7.0`, `vallm>=0.1`
32-
- **dev/test**: `pytest>=8.0`, `pytest-cov>=5.0`, `mypy`, `ruff`, `tox`
30+
- **runtime**: pyyaml>=6.0, typer>=0.12, rich>=13.0
31+
- **analysis (optional)**: lizard, radon, coverage[toml], vallm
32+
- **dev/test**: pytest, pytest-cov, tox, ruff, mypy
3333

3434
## Source Map
3535

36-
- regix/cli.py
37-
- regix/compare.py
38-
- regix/config.py
39-
- regix/git.py
40-
- regix/history.py
41-
- regix/impact.py
42-
- regix/models.py
43-
- regix/report.py
44-
- regix/smells.py
45-
- regix/snapshot.py
36+
- tests/test_gates.py
37+
- tests/test_backends.py
38+
- tests/test_history.py
39+
- tests/test_exceptions.py
40+
- tests/conftest.py
41+
- tests/test_report.py
42+
- tests/test_config_full.py
43+
- tests/test_smells.py
44+
- tests/test_git.py
45+
- tests/__init__.py
46+
- tests/test_impact.py
47+
- tests/test_config.py
48+
- tests/test_code2llm_backend.py
49+
- tests/test_benchmark.py
50+
- tests/test_regix_class.py
51+
- tests/test_models.py
52+
- tests/test_cache.py
53+
- tests/test_report_full.py
54+
- tests/test_compare.py
55+
- tests/test_compare_full.py
56+
- tests/test_snapshot.py
57+
- tests/test_cli.py
58+
- tests/test_integrations.py
59+
- tests/test_regix.py
60+
- scripts/check_regression.py
4661
- regix/backends/architecture_backend.py
47-
- regix/backends/structure_backend.py
48-
- regix/backends/lizard_backend.py
49-
- regix/backends/radon_backend.py
50-
- regix/backends/coverage_backend.py
62+
- regix/backends/base.py
5163
- regix/backends/docstring_backend.py
64+
- regix/backends/radon_backend.py
5265
- regix/backends/vallm_backend.py
53-
- tests/test_cli.py
54-
- tests/test_compare.py
55-
- tests/test_git.py
56-
- tests/test_smells.py
57-
- tests/test_snapshot.py
58-
- tests/test_report.py
59-
- tests/test_backends.py
60-
- tests/test_history.py
66+
- regix/backends/__init__.py
67+
- regix/backends/structure_backend.py
68+
- regix/backends/code2llm_backend.py
69+
- regix/backends/coverage_backend.py
70+
- regix/backends/lizard_backend.py
71+
- regix/config.py
72+
- regix/exceptions.py
73+
- regix/cli.py
74+
- regix/impact.py
75+
- regix/gates.py
76+
- regix/__init__.py
77+
- regix/compare.py
78+
- regix/benchmark/cli.py
79+
- regix/benchmark/reporter.py
80+
- regix/benchmark/__init__.py
81+
- regix/benchmark/__main__.py
82+
- regix/benchmark/models.py
83+
- regix/benchmark/suite.py
84+
- regix/benchmark/factory.py
85+
- regix/benchmark/probes.py
6186

6287
## Intent
6388

64-
- Track code-quality regressions between refs, not only absolute threshold violations.
65-
- Provide diff-scoped LLM regression gating via `regix review`.
66-
- Use dependency-aware impact analysis (`regix impact`) to run only relevant tests.
67-
- Emit machine-readable outputs for CI, quality gates, and automation loops.
89+
- Track code-quality regressions between refs.
90+
- Support LLM patch validation via diff-scoped `regix review`.
91+
- Target selective tests using impact + dependency analysis.

Taskfile.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,32 @@ tasks:
192192
echo "- **name**: \`$(basename $(pwd))\`" >> SUMD.md
193193
echo "- **version**: \`$(python3 -c "import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('version','unknown'))" 2>/dev/null || echo 'unknown')\`" >> SUMD.md
194194
echo "- **python_requires**: \`>=$(python3 -c "import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('requires-python','3.10').replace('>=','').replace('^',''))" 2>/dev/null || echo '3.10')\`" >> SUMD.md
195-
echo "- **license**: $(python3 -c "import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); print(d.get('project',{}).get('license',{}).get('text','MIT'))" 2>/dev/null || echo 'MIT')" >> SUMD.md
195+
echo "- **license**: $(python3 -c "import tomllib; f=open('pyproject.toml','rb'); d=tomllib.load(f); lic=d.get('project',{}).get('license','MIT'); print(lic if isinstance(lic,str) else lic.get('text','MIT'))" 2>/dev/null || echo 'MIT')" >> SUMD.md
196196
echo "- **ecosystem**: SUMD + DOQL + testql + taskfile" >> SUMD.md
197-
echo "- **generated_from**: pyproject.toml, Taskfile.yml, Makefile, src/" >> SUMD.md
197+
echo "- **generated_from**: pyproject.toml, Taskfile.yml, Makefile, regix/" >> SUMD.md
198198
echo "" >> SUMD.md
199199
echo "## Architecture" >> SUMD.md
200200
echo "" >> SUMD.md
201201
echo '```' >> SUMD.md
202202
echo "SUMD (description) → DOQL/source (code) → taskfile (automation) → testql (verification)" >> SUMD.md
203203
echo '```' >> SUMD.md
204204
echo "" >> SUMD.md
205+
echo "## Dependencies" >> SUMD.md
206+
echo "" >> SUMD.md
207+
runtime_deps=$(python3 -c 'import tomllib; f=open("pyproject.toml","rb"); d=tomllib.load(f); print(", ".join(d.get("project",{}).get("dependencies",[])) or "none")' 2>/dev/null || echo 'none')
208+
echo "- **runtime**: ${runtime_deps}" >> SUMD.md
209+
echo "- **analysis (optional)**: lizard, radon, coverage[toml], vallm" >> SUMD.md
210+
echo "- **dev/test**: pytest, pytest-cov, tox, ruff, mypy" >> SUMD.md
211+
echo "" >> SUMD.md
205212
echo "## Source Map" >> SUMD.md
206213
echo "" >> SUMD.md
207214
find . -name '*.py' -not -path './.venv/*' -not -path './venv/*' -not -path './__pycache__/*' -not -path './.git/*' -not -path './.tox/*' -not -path './dist/*' -not -path './build/*' -not -path './.pytest_cache/*' -not -path './.ruff_cache/*' -not -path './.coverage/*' -not -path './.code2llm_cache/*' -not -path './.taskill/*' | head -50 | sed 's|^./||' | sed 's|^|- |' >> SUMD.md
215+
echo "" >> SUMD.md
216+
echo "## Intent" >> SUMD.md
217+
echo "" >> SUMD.md
218+
echo "- Track code-quality regressions between refs." >> SUMD.md
219+
echo '- Support LLM patch validation via diff-scoped `regix review`.' >> SUMD.md
220+
echo "- Target selective tests using impact + dependency analysis." >> SUMD.md
208221
echo "Generated SUMD.md"
209222
- |
210223
python3 -c "

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.25
1+
0.1.26

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "regix"
7-
version = "0.1.25"
7+
version = "0.1.26"
88
description = "Regression Index — detect and measure code quality regressions between git versions"
99
readme = "README.md"
1010
license = "Apache-2.0"

regix/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ def check_gates(self, ref: str = "HEAD") -> GateResult:
129129
"ArchSmell",
130130
]
131131

132-
__version__ = "0.1.25"
132+
__version__ = "0.1.26"

regix/smells.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def _check_symbol_smells(
9797
_check_logic_density_drop,
9898
_check_cohesion_loss,
9999
_check_no_delegation,
100+
_check_signature_break,
100101
_check_assertion_loss,
101102
_check_mock_inflation,
102103
_check_dead_branch,
@@ -426,6 +427,36 @@ def _check_assertion_loss(
426427
)
427428

428429

430+
def _check_signature_break(
431+
file: str,
432+
sym: str,
433+
m_before: SymbolMetrics,
434+
m_after: SymbolMetrics,
435+
config: RegressionConfig,
436+
ref_b: str,
437+
ref_a: str,
438+
) -> ArchSmell | None:
439+
"""Detect parameter-count inflation that may break call sites."""
440+
before = m_before.param_count
441+
after = m_after.param_count
442+
if before is None or after is None:
443+
return None
444+
if after <= before:
445+
return None
446+
delta = after - before
447+
severity = "error" if delta >= 2 else "warning"
448+
return ArchSmell(
449+
smell="signature_break",
450+
file=file,
451+
symbol=sym,
452+
line=m_after.line_start,
453+
severity=severity,
454+
detail=f"Parameter count increased {before}{after} (+{delta}) in '{sym}'",
455+
ref_before=ref_b,
456+
ref_after=ref_a,
457+
)
458+
459+
429460
def _check_mock_inflation(
430461
file: str,
431462
sym: str,

0 commit comments

Comments
 (0)