Skip to content

fix: stale gauge - #2

Merged
franklinkim merged 1 commit into
mainfrom
fix/race-condition
Sep 29, 2026
Merged

franklinkim merged 1 commit into
mainfrom
fix/race-condition

Conversation

@franklinkim

Copy link
Copy Markdown
Member

Description

Make maestro.roster.players gauge observable instead of per-publish: fixes it going stale on idle soloist or resync-only rounds.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactoring
  • 🏃‍➡️ Performance
  • ✅ Tests
  • 🔐 Security
  • 🔧 Build/CI

Changes

  • Convert maestro.roster.players from a per-Publish Int64Gauge to an observable Int64ObservableGauge that reads roster.Participants() on each metric collection
  • Remove recordRoster() method; metric is now driven by callback instead of explicit recording
  • Update metrics_test.go to verify gauge follows membership changes (join, leave, expiry) without explicit Publish
  • Add coordinator_test.go acceptance test validating players report correctly after initial Publish with no subsequent ones

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

@franklinkim
franklinkim merged commit ed8b1e9 into main Sep 29, 2026
4 checks passed
@franklinkim
franklinkim deleted the fix/race-condition branch September 29, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant