Skip to content

refactor: split rank-E report and snapshot helpers#1196

Closed
axisrow wants to merge 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-7/issue-1131-batch1-complexity
Closed

refactor: split rank-E report and snapshot helpers#1196
axisrow wants to merge 1 commit into
mainfrom
ao/tg_content_factory_5863f66be3-7/issue-1131-batch1-complexity

Conversation

@axisrow

@axisrow axisrow commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Part of #1131

Summary

Code health delta

Before python scripts/code_health.py --top 40:

  • CC distribution: A:3483 B:502 C:221 D:34 E:8 F:0, average 3.46.
  • Targets: _publish_snapshots E(40), ChannelAnalyzer._build_report E(32).

After python scripts/code_health.py --top 40:

  • CC distribution: A:3506 B:507 C:221 D:34 E:6 F:0, average 3.44.
  • Target ranks from radon cc -s src/runtime/worker.py src/filters/analyzer.py: _publish_snapshots A(1), ChannelAnalyzer._build_report A(2).

AST proof

  • python scripts/verify_refactor_ast_equivalence.py --base-ref origin/main passed.
  • The script checks helper call order and extracted AST blocks for worker setup, snapshots, queue payload, notification payload/snapshot type, analyzer map fetch, per-flag logic, result constructor, and final report.

Validation

  • ruff check src/ tests/ conftest.py passed.
  • pytest tests/test_runtime_worker.py -v passed: 19 passed.
  • pytest tests/test_filters.py -v passed: 53 passed.
  • pytest tests/test_db_access_conventions.py tests/test_test_levels.py -q passed: 17 passed.
  • pytest tests/ -v -m aiosqlite_serial passed: 943 passed, 9266 deselected.
  • pytest tests/ -v -m "not aiosqlite_serial" -n auto completed but failed outside this refactor scope: 7 failures in tests/test_quality_scoring_service.py, tests/routes/test_debug_routes.py::test_debug_memory_returns_json, and tests/test_pipelines.py::test_pipelines_page_renders.

@axisrow

axisrow commented Jun 29, 2026

Copy link
Copy Markdown
Owner Author

Дубликат партии 1 #1131 — та же работа (split _publish_snapshots + _build_report) уже смержена через #1197 (commit 7a9ef80). Этот PR открыл воркер -7 перед зависанием; работа была забрана оркестратором, провалидирована (AST-эквивалентность + 72 теста + dual-review Claude+Codex APPROVE) и смержена как #1197 без одноразового AST-скрипта (он засорял ruff). Закрываю как superseded.

@axisrow axisrow closed this Jun 29, 2026
@axisrow axisrow deleted the ao/tg_content_factory_5863f66be3-7/issue-1131-batch1-complexity branch June 29, 2026 08:05
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