You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security:
- Hash instruction in trace attributes (no raw text leak)
- Sanitize error returns: type(e).__name__ instead of str(e)
- Remove raw instruction from error dict
Correctness:
- Move trace/metrics inside try block (prevent gauge/trace leak)
- Add execution_latency.observe() on both success and error paths
- Fix trace_async to set root span status='error' on exceptions
- Preserve span status in finish_trace() (don't overwrite error→ok)
Thread safety:
- Add threading.Lock to ExecutionTracer ring buffer
- Switch ring buffer from list to collections.deque(maxlen=N)
Bounds:
- Add max_spans_per_trace (500) to prevent unbounded span growth
- Add _sanitize_label helper for Prometheus label values
Health:
- Cache SkillStore in health probe (no new instance per check)
- Remove hardcoded tool count from health probe detail
Tests (14 new, 1827 total passed):
- 3 untested metrics: execution_iterations, skill_misses, skill_search_latency
- In-flight gauge lifecycle (inc/dec on success + error)
- track_execution latency recording
- trace_async child-span path + error status propagation
- Thread safety concurrent finish_trace
- Health: 50% boundary, probe exception, unregister noop
- Span auto-create trace, finish_trace with no active trace
- Rename stale test_registers_four_tools → test_registers_seven_tools
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments