teleo-codex/ops/diagnostics/CONSOLIDATION-DIFF-LOG.md
m3taversal 5514e04498 Consolidate diagnostics Python files to ops/diagnostics/
Move vitality.py/vitality_routes.py from root diagnostics/ to ops/diagnostics/ (canonical location).
Overwrite ops/diagnostics/alerting.py and alerting_routes.py with root versions (newer: SQL injection protection via _ALLOWED_DIM_EXPRS, proper error handling + conn.close).
Remove root diagnostics/*.py — all code now in ops/diagnostics/.
Include diff log documenting resolution of each multi-copy file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:12:04 +02:00

2.3 KiB

Diagnostics Consolidation Diff Log

Branch: epimetheus/consolidate-infra

Date: 2026-04-13

Files with multiple copies — resolution

alerting.py

  • ROOT diagnostics/alerting.py (22320 bytes) — KEPT (newer: has _ALLOWED_DIM_EXPRS SQL injection protection, stricter dim_expr validation)
  • ops/diagnostics/alerting.py (22039 bytes) — OVERWRITTEN (missing SQL injection guards)
  • VPS /opt/teleo-eval/diagnostics/alerting.py (22039 bytes) — matches ops/ version, needs deploy

alerting_routes.py

  • ROOT diagnostics/alerting_routes.py (4216 bytes) — KEPT (newer: proper try/finally/conn.close, ValueError catch on hours param)
  • ops/diagnostics/alerting_routes.py (4043 bytes) — OVERWRITTEN (missing error handling, missing conn.close)
  • VPS /opt/teleo-eval/diagnostics/alerting_routes.py (4043 bytes) — matches ops/ version, needs deploy

vitality.py

  • ROOT diagnostics/vitality.py (25548 bytes) — KEPT (only copy in repo, larger than VPS)
  • VPS /opt/teleo-eval/diagnostics/vitality.py (18539 bytes) — older version, needs deploy
  • MOVED TO: ops/diagnostics/vitality.py

vitality_routes.py

  • ROOT diagnostics/vitality_routes.py (10824 bytes) — KEPT (only copy in repo, larger than VPS)
  • VPS /opt/teleo-eval/diagnostics/vitality_routes.py (9729 bytes) — older version, needs deploy
  • MOVED TO: ops/diagnostics/vitality_routes.py

Files moved

From To Reason
diagnostics/vitality.py ops/diagnostics/vitality.py Consolidate to canonical location
diagnostics/vitality_routes.py ops/diagnostics/vitality_routes.py Consolidate to canonical location
diagnostics/alerting.py ops/diagnostics/alerting.py Newer version overwrites older
diagnostics/alerting_routes.py ops/diagnostics/alerting_routes.py Newer version overwrites older

Root diagnostics/ after consolidation

  • PATCH_INSTRUCTIONS.md — kept (documentation, not code)
  • evolution.md — kept (documentation)
  • weekly/2026-03-25-week3.md — kept (report)
  • ops/sessions/*.json — kept (session data)
  • All .py files REMOVED from root diagnostics/

VPS .bak files inventory (30+ files)

All in /opt/teleo-eval/diagnostics/. Git is the backup now. Safe to delete after consolidation verified.

VPS deploy needed after merge

alerting.py, alerting_routes.py, vitality.py, vitality_routes.py — all local versions are newer than VPS.