Skip to content

refactor: remove success bool from ResumeAttempt#12

Merged
maxence2997 merged 1 commit intomainfrom
refactor/remove-resume-success-bool
Mar 27, 2026
Merged

refactor: remove success bool from ResumeAttempt#12
maxence2997 merged 1 commit intomainfrom
refactor/remove-resume-success-bool

Conversation

@maxence2997
Copy link
Contributor

@maxence2997 maxence2997 commented Mar 26, 2026

Summary

  • Remove unused success bool parameter from MetricsCollector.ResumeAttempt — resume success rate is derivable from existing metrics (ResumeAttempt count vs ConnectionClosed(graceExpired) count)
  • Update hub call site, unit tests, and integration test assertions
  • Clear resolved TODOS entry

Test plan

  • make check passes (fmt, lint, unit tests with race detector)
  • make test-integration passes
  • Metrics adapters updated in parallel PRs

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings March 26, 2026 23:54
@github-actions github-actions bot added the refactor Code restructuring without behaviour change label Mar 26, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.ResumeAttempt and NoopCollector.ResumeAttempt to 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)”.

@maxence2997 maxence2997 merged commit cbf3d01 into main Mar 27, 2026
9 checks passed
@maxence2997 maxence2997 deleted the refactor/remove-resume-success-bool branch March 27, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behaviour change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants