{"id":"XE-11745","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":930,"title":"[Minor] Handler `/metrics` menjalankan `preScrape` SEBELUM batas `MaxRequestsInFlight`, dan gauge readiness bisa terpotret sobek","area":"node-api","claimed_tier":"minor","assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-13T08:05:27.910836+00:00","updated_at":"2026-11-20T13:19:16.671926+00:00","source_created_at":null,"told_at":"2026-11-20T13:19:16.674103+00:00","status_changed_at":"2026-11-20T13:03:19.990666+00:00","url":"https://bounty.xe.network/XE-11745","body":"Judul: [Minor] Handler `/metrics` menjalankan `preScrape` SEBELUM batas `MaxRequestsInFlight`, dan gauge readiness bisa terpotret sobek\r\n\r\nLetak Bug:\r\n`xe/metrics/metrics.go:163-177` — `Handler()` memanggil `preScrape` (`publishDerived`, `node/observability.go:317-356`) sebelum `inner.ServeHTTP` yang menegakkan `MaxRequestsInFlight: 4`. Request /metrics yang langsung ditolak 503 oleh promhttp tetap membayar biaya penuh `publishDerived` (alokasi peer slice + kunci swarm libp2p lewat `o.peerCount()`). `o.publish` (`observability.go:283-315`), `o.publishDerived` (317-356), dan `Registry.Gather()` juga membaca-menulis 20+ gauge readiness tanpa mutual exclusion di tingkat kelompok gauge.\r\n\r\nSeberapa Buruk Bug nya:\r\nAmplifikasi kerja kecil pada endpoint tanpa autentikasi (biaya per request kecil, tapi cap konkurensi menjadi tidak berguna karena request yang ditolak pun tetap menjalankan `preScrape`) + snapshot readiness yang bisa kontradiktif dalam satu payload scrape (`xe_ready 1` bersama `xe_ready_check 0`). Minor — tidak ada dana atau konsensus yang bergerak.","patch_refs":[],"thread":[{"id":14697,"source":"desk","source_ref":"reply:12612","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-11745 and says what; it is read like any other.","created_at":"2026-11-20T13:19:16.671926+00:00"}]}