Skip to content

fix(webapp): guard workload auth gate metric against dev HMR re-registration#4339

Merged
kathiekiwi merged 1 commit into
mainfrom
fix/workload-auth-gate-metric-hmr
Jul 22, 2026
Merged

fix(webapp): guard workload auth gate metric against dev HMR re-registration#4339
kathiekiwi merged 1 commit into
mainfrom
fix/workload-auth-gate-metric-hmr

Conversation

@kathiekiwi

Copy link
Copy Markdown
Collaborator

Wraps the workload_auth_gate_total Counter in the singleton helper (same pattern as reloadingRegistry.server.ts) so a dev hot reload doesn't crash with "A metric with the name workload_auth_gate_total has already been registered". No production behavior change.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6017944

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The worker group token service now registers workloadAuthGateCounter through singleton(...) rather than direct module-load instantiation. The counter’s metric name, help text, label names, and metricsRegister binding remain unchanged.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the change and rationale, but it omits required template sections like Closes #issue, checklist, testing, changelog, and screenshots. Add the missing template sections, include the issue reference, and briefly document testing, changelog, and screenshots if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: preventing dev HMR metric re-registration.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/workload-auth-gate-metric-hmr

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kathiekiwi
kathiekiwi marked this pull request as ready for review July 22, 2026 13:13

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@kathiekiwi
kathiekiwi merged commit b3b1441 into main Jul 22, 2026
37 checks passed
@kathiekiwi
kathiekiwi deleted the fix/workload-auth-gate-metric-hmr branch July 22, 2026 13:54
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.

2 participants