clavitor/clavis/clavis-telemetry
James c082f84109 test: Add comprehensive error handling tests for clavis-telemetry
Adds test coverage for issues #002, #003, #004:
- TestUpdateSpan_MaintenanceModeError: Verifies ERR-TELEMETRY-010 logging
- TestUpdateSpan_UptimeSpanQueryError: Verifies ERR-TELEMETRY-011 logging
- TestSendKumaPush_DatabaseError: Verifies ERR-TELEMETRY-033 logging
- TestSendKumaPush_NetworkError: Verifies ERR-TELEMETRY-030 logging
- TestSendKumaPush_NonOKStatus: Verifies ERR-TELEMETRY-031 logging
- TestTarpit_EarlyDisconnect: Verifies tarpit handles client disconnect
- TestErrorCodes_Unique: Verifies all error codes are unique (caught duplicates!)
- TestErrorCodes_Format: Verifies error message format compliance
- TestHandleTelemetry_DatabaseInsertError: Verifies ERR-TELEMETRY-004
- TestConcurrentErrorHandling: Verifies thread-safe error logging

Also fixes duplicate error codes found by tests:
- ERR-TELEMETRY-010 -> ERR-TELEMETRY-015 for maintenance table creation
- Added ERR-TELEMETRY-034 for Kuma response body close after non-OK status

fixes #002
fixes #003
fixes #004

Author: Shakib <shakib-20250409-001>
2026-04-09 03:35:27 -04:00
..
CLAUDE.md telemetry: verify dispatcher agent spawning for Hans 2026-04-09 03:14:27 -04:00
clavis-telemetry Update all CLAUDE.md files to reference CLAVITOR-AGENT-HANDBOOK.md 2026-04-08 15:24:51 -04:00
error_handling_test.go test: Add comprehensive error handling tests for clavis-telemetry 2026-04-09 03:35:27 -04:00
go.mod Update all CLAUDE.md files to reference CLAVITOR-AGENT-HANDBOOK.md 2026-04-08 15:24:51 -04:00
go.sum Update all CLAUDE.md files to reference CLAVITOR-AGENT-HANDBOOK.md 2026-04-08 15:24:51 -04:00
kuma.go test: Add comprehensive error handling tests for clavis-telemetry 2026-04-09 03:35:27 -04:00
main.go test: Add comprehensive error handling tests for clavis-telemetry 2026-04-09 03:35:27 -04:00
main_test.go telemetry: add Prometheus metrics endpoint 2026-04-09 03:29:32 -04:00
metrics.go telemetry: add Prometheus metrics endpoint 2026-04-09 03:29:32 -04:00