Task · MDE-0009

Give collector admission one honest wall-clock budget

Description

PR #733 P1.6 and P2.8 remain in collectors/manager.py:800-965. Admission can wait collector_timeout and execution can then consume collector_timeout again, while TaskExpiredBeforeStartError increments collector failure_streak and total_failures even though it proves exporter saturation rather than collector health. Keep the derived-capacity warning required by D10, but make one run use one wall-clock budget and separate admission-pressure accounting from endpoint health. Coordinate with MDE-0001 because both inspect collector admission and duration evidence.

Acceptance Criteria

Definition of Done

Implementation Plan

  1. Add concurrent failing tests proving queue expiry never starts the collector or mutates endpoint health, and queue wait plus execution share one monotonic deadline. 2. Pass the remaining run budget from admission into execution, retain task-admission saturation metrics, and remove pre-start failure accounting from collector health while clarifying utilization semantics. 3. Run focused concurrency/utilization tests, regenerate metric docs if help text changes, then CodeRabbit and make check before finalizing.

Final Summary

Implemented one monotonic collector-run deadline across admission and execution in 223b5f2. Admission expiry now remains visible through shared saturation metrics without mutating collector endpoint health; execution utilization excludes queue wait. Concurrent regressions prove an expired queued body never starts and that queue wait plus execution stop at the original deadline. Verified with focused admission/concurrency/utilization/tracing tests, make docgen, a clean CodeRabbit re-review (0 findings), and make check (Ruff, format, mypy, 2,744 tests passed). No metric or label names changed, so Grafana query updates were not applicable.

References

View the source file on GitHub