refactor: remove success bool from ResumeAttempt#12
Merged
maxence2997 merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
1.Success rate derivable from existing metrics → removed unused parameter 2.Updated hub call site and test assertions 3.Cleared resolved TODOS entry Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the metrics instrumentation API by removing the unused success bool parameter from MetricsCollector.ResumeAttempt, and updates the server, tests, and TODO tracking to match.
Changes:
- Update
MetricsCollector.ResumeAttemptandNoopCollector.ResumeAttemptto take only(roomID, connectionID string). - Update the hub resume path and related unit/integration tests to call/assert the new signature.
- Remove the now-obsolete TODO entry describing
ResumeAttempt(..., false)and replace the TODO list with “(none)”.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| metrics.go | Changes the exported MetricsCollector interface and NoopCollector method signature; updates doc comment semantics. |
| hub.go | Updates the resume-path metric emission to use the new ResumeAttempt signature. |
| metrics_test.go | Updates unit tests and the recording collector helper to match the new signature. |
| metrics_integration_test.go | Removes assertions tied to the former success field for resume metrics. |
| TODOS.md | Removes the TODO entry about failed-resume detection and marks the file as “(none)”. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
success boolparameter fromMetricsCollector.ResumeAttempt— resume success rate is derivable from existing metrics (ResumeAttemptcount vsConnectionClosed(graceExpired)count)Test plan
make checkpasses (fmt, lint, unit tests with race detector)make test-integrationpasses🤖 Generated with Claude Code