{
	"system": "lucos_media_weightings",
	"ci": {
		"circle": "gh/lucas42/lucos_media_weightings"
	},
	"checks": {
		"media-api-reachable": {
			"techDetail": "Calls fetchTrack() against https://media-api.l42.eu/v3/tracks/1 with a 1.0s timeout \u2014 exercises the same authenticated GET path as the webhook handler",
			"ok": true,
			"failThreshold": 2,
			"dependsOn": "lucos_media_metadata_api"
		},
		"time-api-reachable": {
			"techDetail": "Calls getCurrentItems() with a 1.0s timeout \u2014 exercises the same /current-items call as updateWeighting",
			"ok": true,
			"failThreshold": 2,
			"dependsOn": "lucos_time"
		},
		"worker-alive": {
			"techDetail": "Background worker thread is alive and able to process queued events. ok=False means no events can be processed \u2014 the queue will fill and /weight-track will return 503 Service Unavailable.",
			"ok": true
		},
		"drain-liveness": {
			"techDetail": "Queue is draining: ok=False when queue depth is non-zero and no successful event has been processed for 120s (staleness measured from max(last_weighting_update, process_start) to avoid fresh-boot false-positives). Covers both a wedged worker and a hard-down downstream dependency. Self-heals when the queue drains or a successful event advances the clock.",
			"ok": true
		}
	},
	"metrics": {
		"last-weighting-update": {
			"value": 0,
			"techDetail": "Unix timestamp (seconds) of the most recent successful weighting update by the background worker since this process started. 0 means none yet \u2014 fresh boots will read 0 until the first webhook fires."
		},
		"queue-depth": {
			"value": 0,
			"techDetail": "Current number of events waiting in the internal queue for background processing. Non-zero during normal drain; sustained growth with a frozen last-weighting-update indicates a stall."
		},
		"processing-failures": {
			"value": 0,
			"techDetail": "Total number of events the background worker failed to process since process start. Useful for dashboard trend and log correlation; each failure also emits an ERROR log line with the event URL."
		}
	},
	"network_only": true,
	"show_on_homepage": false
}

