Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECO-4985] Trigger the RETRY operation where spec says to #120

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

lawrence-forooghian
Copy link
Collaborator

@lawrence-forooghian lawrence-forooghian commented Nov 18, 2024

Note: This is based on top of #110; please review that one first.

#110 added a method for performing the RETRY room lifecycle operation but did not call it. This PR triggers it from the places where the spec says to.

Resolves #50.

Summary by CodeRabbit

  • New Features

    • Enhanced room functionalities with new properties for presence, reactions, typing, and occupancy.
    • Improved retry operation management for room status changes.
  • Bug Fixes

    • Updated method names for clarity and consistency in handling room status changes.
  • Tests

    • Expanded test cases to validate new retry operation logic and transient disconnect timeout handling.
    • Clarified method names in tests to better reflect their purpose related to room status changes.

Copy link

coderabbitai bot commented Nov 18, 2024

Walkthrough

The changes in this pull request involve significant updates to the Room protocol and its implementations, particularly in the Room.swift and RoomLifecycleManager.swift files. Key modifications include renaming methods for clarity, adding new properties, and enhancing the handling of room status changes and lifecycle operations. The DefaultRoom class has been updated to include nonisolated properties for various functionalities, while the lifecycle manager has improved its method signatures and state management. Tests have been adjusted to reflect these changes, ensuring consistency across the codebase.

Changes

File Path Change Summary
Sources/AblyChat/Room.swift Updated onStatusChange method in DefaultRoom, added properties (presence, reactions, typing, occupancy), marked status for future change.
Sources/AblyChat/RoomLifecycleManager.swift Renamed onChange to onRoomStatusChange, updated subscriptions to roomStatusChangeSubscriptions, modified Status enum for retry operations.
Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift Renamed test methods to reflect onRoomStatusChange, expanded tests for suspended states and transient disconnect timeouts.
Tests/AblyChatTests/Mocks/MockRoomLifecycleManager.swift Renamed onChange to onRoomStatusChange, no other changes made.

Assessment against linked issues

Objective Addressed Explanation
Trigger the RETRY operation where spec says to (50, ECO-4985)

Possibly related issues

Possibly related PRs

Suggested reviewers

  • umair-ably
  • maratal

Poem

In the room where status sways,
Changes dance in bright array.
With retries set and names anew,
Our chat will thrive, as friendships grew.
So hop along, let’s celebrate,
For every change, we elevate! 🐇✨

Warning

Rate limit exceeded

@lawrence-forooghian has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 057afd3 and 2923be3.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Outside diff range and nitpick comments (10)
Sources/AblyChat/Room.swift (1)

Line range hint 8-15: Consider implementing or removing unimplemented properties.

Several properties (presence, typing, occupancy) are marked as unimplemented and will trigger fatalError. This could lead to runtime crashes if these properties are accessed. Consider either:

  1. Implementing these properties
  2. Making them optional to avoid runtime crashes
  3. Removing them if they're not needed yet

Would you like me to propose a safer alternative implementation that avoids runtime crashes?

Sources/AblyChat/RoomLifecycleManager.swift (6)

48-48: Consistency in Method Naming and Protocol Conformance

The method onRoomStatusChange(bufferingPolicy:) is added to the RoomLifecycleManager protocol. Ensure this method is consistently implemented across all conforming types and that it aligns with the naming conventions used in the protocol.


91-91: Initialize Subscriptions with Proper Buffering Policy

The roomStatusChangeSubscriptions array is introduced without specifying the buffering policy for the subscriptions it will hold. Consider ensuring that all subscriptions added to this array have a consistent buffering policy to prevent unexpected behavior.


328-351: Conditional Compilation Code Organization

The #if DEBUG block contains several methods and properties related to testing. Ensure that these do not inadvertently affect the production code and that all test-only code is properly encapsulated.


361-367: Avoid Duplicate Emission of Status Changes

The check for avoiding a double emission of room status changes is implemented. Ensure that this logic is thread-safe and consider documenting the reasoning to aid future developers.


730-735: Enumerate All Possible Operation Kinds

The OperationKind enum currently has a single case .retry. If more operation kinds are expected in the future, consider adding comments or placeholders to make extending the enum clearer.


Line range hint 322-367: Duplicate Code for Emitting Status Changes

There appears to be duplicate logic for emitting status changes in both changeStatus(to:) and emitRoomStatusChange(_:). Consolidate this logic to improve maintainability.

Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (3)

Line range hint 1152-1157: Rename CHA_RL5d_JourneyToState to conform to Swift naming conventions

The enum name CHA_RL5d_JourneyToState is unusually long and includes specific test identifiers. According to Swift naming conventions, type names should be concise and descriptive. Consider renaming it to something like ContributorJourneyState for improved readability.


Line range hint 290-290: Address all TODO comments before merging

There are several TODO comments left in the code at lines 290, 313, 427, and 679, indicating pending clarifications or incomplete implementations. Please resolve these TODOs and ensure all outstanding issues are addressed prior to merging the code.

Also applies to: 313-313, 427-427, 679-679


726-727: Improve variable naming for clarity

In line 727, the variable asyncLetStatusChanges could be more descriptive. Consider renaming it to statusChanges or collectedStatusChanges to enhance readability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a1ec46f and 057afd3.

📒 Files selected for processing (4)
  • Sources/AblyChat/Room.swift (1 hunks)
  • Sources/AblyChat/RoomLifecycleManager.swift (9 hunks)
  • Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (29 hunks)
  • Tests/AblyChatTests/Mocks/MockRoomLifecycleManager.swift (1 hunks)
🧰 Additional context used
📓 Learnings (3)
Sources/AblyChat/Room.swift (1)
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#77
File: Sources/AblyChat/Room.swift:14-14
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In the codebase, the term `status` now has a new meaning, and its usage is intentional.
Sources/AblyChat/RoomLifecycleManager.swift (3)
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#67
File: Sources/AblyChat/RoomLifecycleManager.swift:217-220
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In `RoomLifecycleManager`, handling of missing `stateChange.reason` when `stateChange.resumed` is `false` is being tracked in issue #74. Future reviews should be aware of this planned work.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#85
File: Sources/AblyChat/RoomLifecycleManager.swift:140-191
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In `Sources/AblyChat/RoomLifecycleManager.swift`, all cases of the `Status` enum are exhaustively handled in switch statements, so suggesting exhaustive handling is unnecessary.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#77
File: Sources/AblyChat/Room.swift:14-14
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In the codebase, the term `status` now has a new meaning, and its usage is intentional.
Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (1)
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#54
File: Tests/AblyChatTests/RoomLifecycleManagerTests.swift:335-335
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In Swift Testing, test method names do not need to start with `test`.
🔇 Additional comments (7)
Tests/AblyChatTests/Mocks/MockRoomLifecycleManager.swift (2)

Line range hint 47-51: LGTM! Method rename improves clarity

The rename from onChange to onRoomStatusChange better describes the method's purpose and maintains consistency with the protocol changes.


Line range hint 11-11: Consider implementing subscription cleanup

The TODO comment indicates a potential memory leak as subscriptions are only added but never cleaned up. This could impact test performance and memory usage over time.

Let's check if this issue is still open and if there are any related discussions:

Consider implementing one of these approaches:

  1. Add a cleanup method to remove completed/unnecessary subscriptions
  2. Implement weak references to allow automatic cleanup
  3. Add subscription lifecycle management tied to test lifecycle
✅ Verification successful

Let me gather more information about the subscription handling in the codebase to better understand the cleanup concerns.


Subscription cleanup is a known issue with an open tracking ticket

The review comment correctly identifies a legitimate concern. The evidence shows that:

  • Issue Find a way to clean up arrays of subscriptions #36 is still open and actively tracking this problem
  • There are unimplemented unsubscribe methods in mock objects
  • A TODO comment in Subscription.swift explicitly references this issue for implementing unsubscribe functionality
  • The finish() method exists but may not fully address the cleanup needs

The architectural suggestions in the review are valid and align with the ongoing work tracked in issue #36. Since this is an acknowledged issue with an open ticket and partial implementation in progress, the review serves as a good reminder but doesn't require immediate action beyond the planned work.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the status of issue #36 and look for related discussions

# Check if issue #36 is still open
gh issue view 36

# Search for related discussions about subscription cleanup
rg -i "subscription.*cleanup|cleanup.*subscription" --type md

Length of output: 841


Script:

#!/bin/bash
# Search for subscription-related code and patterns
ast-grep --pattern 'var subscriptions'

# Look for any unsubscribe or cleanup methods
rg -i "unsubscribe|cleanup" --type swift -A 3

# Find files that might handle subscriptions
fd ".*Manager\.swift$" --exec grep -l "subscription"

Length of output: 2481

Sources/AblyChat/Room.swift (2)

Line range hint 14-14: Verify the planned status property rename.

There's a TODO comment about renaming the status property, and a learning note indicates that "status" has a new meaning in the codebase. Consider addressing this rename as part of the current changes to maintain consistency.

Let's check for other usages of this property:


177-177: LGTM! Verify consistent method naming across the codebase.

The rename from onChange to onRoomStatusChange improves clarity by being more specific about the type of change being observed.

Let's verify the consistency of this naming change across the codebase:

✅ Verification successful

Method naming is consistent across the codebase

The verification shows that the method naming is consistent throughout the codebase:

  • The Room protocol defines onStatusChange which returns Subscription<RoomStatusChange>
  • DefaultRoom implements this by delegating to lifecycleManager.onRoomStatusChange
  • RoomLifecycleManager consistently uses onRoomStatusChange in its interface and implementation
  • All mock implementations (MockRoom, MockRoomLifecycleManager) follow the same pattern
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining instances of the old method name and verify consistent usage of the new name

# Check for any remaining instances of 'onChange' that might need updating
echo "Checking for remaining 'onChange' instances..."
rg --type swift 'onChange.*Subscription<RoomStatusChange>' -l

# Verify consistent usage of 'onRoomStatusChange'
echo "Verifying 'onRoomStatusChange' usage..."
rg --type swift 'onRoomStatusChange.*Subscription<RoomStatusChange>' -l

Length of output: 4870


Script:

#!/bin/bash
# Let's try a different approach to verify the method naming consistency

# Check for any method declarations or usages related to room status changes
echo "Checking for status change related method declarations and usages..."
rg --type swift 'func (onChange|onRoomStatusChange|onStatusChange).*RoomStatusChange' -A 2 -B 2

# Also check for any Subscription<RoomStatusChange> related code
echo "Checking for RoomStatusChange subscription related code..."
rg --type swift 'Subscription<RoomStatusChange>' -A 2 -B 2

Length of output: 10782

Sources/AblyChat/RoomLifecycleManager.swift (3)

513-520: Clarify Assumptions About Task Execution Order

Comments suggest assumptions about task execution order concerning the actor model. For clarity and maintainability, explicitly ensure that tasks will execute in the expected order or adjust the code to avoid relying on specific execution timing.

Would you like to verify the execution order of tasks to ensure it aligns with Swift concurrency guarantees?


815-822: Ensure Consistent Status Transitions During RETRY Operations

In the performAttachmentCycle method, when scheduling a RETRY operation, ensure that status transitions are handled consistently to avoid race conditions or inconsistent states.

Consider reviewing the state machine to ensure all possible transitions are accounted for.


370-373: Thread Safety Concerns with Subscription Management

Access to roomStatusChangeSubscriptions in emitRoomStatusChange(_:) might not be thread-safe. Since actors serialize access to their mutable state, ensure that roomStatusChangeSubscriptions is only modified within the actor's context.

Consider adding annotations or comments to confirm that this method is safe within the actor model.

Copy link
Collaborator

@maratal maratal left a comment

Choose a reason for hiding this comment

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

Left some questions

Sources/AblyChat/RoomLifecycleManager.swift Show resolved Hide resolved
Sources/AblyChat/RoomLifecycleManager.swift Show resolved Hide resolved
For clarity and so I can add other methods with similar names.
Whem implementing #50, I intend to add further metadata to the manager’s
status, to be used by tests.
Based on spec at 8ff947d.

Resolves #50.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
Sources/AblyChat/RoomLifecycleManager.swift (1)

513-520: Consider extracting common RETRY scheduling code.

The RETRY operation scheduling code is duplicated in two locations. While the comments explain the actor isolation assumptions, consider extracting this into a helper method to maintain DRY principles.

+    private func scheduleRetryOperation(
+        triggeringContributor: Contributor,
+        errorForSuspendedStatus: ARTErrorInfo
+    ) -> Task<Void, Never> {
+        let retryOperationTask = scheduleAnOperation(
+            kind: .retry(
+                triggeringContributor: triggeringContributor,
+                errorForSuspendedStatus: errorForSuspendedStatus
+            )
+        )
+        changeStatus(to: .suspendedAwaitingStartOfRetryOperation(
+            retryOperationTask: retryOperationTask,
+            error: errorForSuspendedStatus
+        ))
+        return retryOperationTask
+    }

Also applies to: 815-822

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 057afd3 and 2923be3.

📒 Files selected for processing (4)
  • Sources/AblyChat/Room.swift (1 hunks)
  • Sources/AblyChat/RoomLifecycleManager.swift (9 hunks)
  • Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (29 hunks)
  • Tests/AblyChatTests/Mocks/MockRoomLifecycleManager.swift (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Sources/AblyChat/Room.swift
  • Tests/AblyChatTests/Mocks/MockRoomLifecycleManager.swift
🧰 Additional context used
📓 Learnings (2)
Sources/AblyChat/RoomLifecycleManager.swift (8)
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#120
File: Sources/AblyChat/RoomLifecycleManager.swift:738-749
Timestamp: 2024-11-19T13:22:17.968Z
Learning: In `Sources/AblyChat/RoomLifecycleManager.swift`, for the `scheduleAnOperation(kind:)` function in the Swift codebase, it's acceptable to capture `self` strongly within the scheduled `Task` because the task is executed almost immediately, and potential retain cycles are not a concern in this context.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#120
File: Sources/AblyChat/RoomLifecycleManager.swift:322-324
Timestamp: 2024-11-19T13:22:50.638Z
Learning: In `Sources/AblyChat/RoomLifecycleManager.swift`, the `onRoomStatusChange(bufferingPolicy:)` method already has a TODO to manage subscriptions properly. Avoid flagging this issue in future reviews.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#67
File: Sources/AblyChat/RoomLifecycleManager.swift:235-237
Timestamp: 2024-11-12T15:07:31.866Z
Learning: When code includes a TODO comment referencing an issue, it indicates that the issue is being tracked, and no further action is needed.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#9
File: Sources/AblyChat/RoomStatus.swift:3-33
Timestamp: 2024-11-12T15:07:31.865Z
Learning: When reviewing code, avoid commenting on TODOs that already have a linked GitHub issue, as per the user's preference.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#54
File: Sources/AblyChat/RoomLifecycleManager.swift:262-262
Timestamp: 2024-11-12T15:07:31.865Z
Learning: When a TODO comment references an associated GitHub issue, recognize that the issue is being tracked and avoid suggesting fixes that are already planned.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#67
File: Tests/AblyChatTests/RoomLifecycleManagerTests.swift:941-941
Timestamp: 2024-11-12T15:07:31.866Z
Learning: When a TODO comment references an existing GitHub issue, it's acceptable to leave it in the code without requesting its removal.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#67
File: Sources/AblyChat/RoomLifecycleManager.swift:217-220
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In `RoomLifecycleManager`, handling of missing `stateChange.reason` when `stateChange.resumed` is `false` is being tracked in issue #74. Future reviews should be aware of this planned work.
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#85
File: Sources/AblyChat/RoomLifecycleManager.swift:140-191
Timestamp: 2024-11-12T15:07:31.865Z
Learning: In `Sources/AblyChat/RoomLifecycleManager.swift`, all cases of the `Status` enum are exhaustively handled in switch statements, so suggesting exhaustive handling is unnecessary.
Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (1)
Learnt from: lawrence-forooghian
PR: ably-labs/ably-chat-swift#120
File: Sources/AblyChat/RoomLifecycleManager.swift:322-324
Timestamp: 2024-11-19T13:22:50.638Z
Learning: In `Sources/AblyChat/RoomLifecycleManager.swift`, the `onRoomStatusChange(bufferingPolicy:)` method already has a TODO to manage subscriptions properly. Avoid flagging this issue in future reviews.
🔇 Additional comments (7)
Sources/AblyChat/RoomLifecycleManager.swift (4)

48-48: LGTM! Method and variable renaming improves clarity.

The renaming of onChange to onRoomStatusChange and subscriptions to roomStatusChangeSubscriptions enhances code readability by being more specific about their purpose.

Also applies to: 91-91


191-192: LGTM! Well-designed status handling for RETRY operation.

The new suspendedAwaitingStartOfRetryOperation status effectively manages the intermediate state before RETRY, with proper test support via retryOperationTask. The mapping to public status maintains the correct abstraction.

Also applies to: 214-215


730-749: LGTM! Clean implementation of operation scheduling.

The operation scheduling implementation is well-structured and consistent with the codebase's patterns. The logging is comprehensive and will aid in debugging.


328-350: LGTM! Well-structured test support code.

The test-only status change subscription implementation is properly isolated using conditional compilation and well-documented. The implementation follows Swift best practices for test support code.

Tests/AblyChatTests/DefaultRoomLifecycleManagerTests.swift (3)

186-186: Method rename improves clarity and consistency

The rename from onChange to onRoomStatusChange better describes the purpose of the method and maintains consistency throughout the codebase.

Also applies to: 222-222, 245-245, 619-619, 642-642, 679-679, 726-726, 764-764, 790-790, 835-835, 867-867, 927-927, 1064-1064, 1152-1152, 1223-1223, 1269-1269, 1317-1317, 1439-1439, 1514-1514, 1610-1610, 1722-1722, 1815-1815, 1894-1894, 1932-1932


Line range hint 315-412: Well-structured test implementation for RETRY operation

The test thoroughly verifies the RETRY operation behavior when a contributor enters SUSPENDED state, including:

  1. Transition to SUSPENDED state
  2. Execution of RETRY operation
  3. Verification of detach/attach call counts for each contributor
  4. Proper state transitions

This implementation aligns well with the PR objectives and provides good coverage of the RETRY operation functionality.


Line range hint 1777-1874: Comprehensive test coverage for SUSPENDED event handling

The enhanced test thoroughly verifies the system's behavior when a contributor enters SUSPENDED state with no operation in progress, including:

  1. Proper state transitions
  2. Execution of RETRY operation
  3. Verification of detach/attach call counts
  4. Cleanup of transient disconnect timeouts

This implementation provides good coverage of the RETRY operation functionality in response to SUSPENDED events.

@lawrence-forooghian lawrence-forooghian merged commit 199c84e into 51-RETRY-operation Nov 19, 2024
12 checks passed
@lawrence-forooghian lawrence-forooghian deleted the 50-trigger-RETRY branch November 19, 2024 18:12
@lawrence-forooghian
Copy link
Collaborator Author

Hmm, I merged this one when I should have first of all merged #110 and for some reason the merge didn't cascade. Will revert this merge (i.e. force push to main) and then do another PR with same contents.

@lawrence-forooghian
Copy link
Collaborator Author

Wait, I’m talking semi-nonsense, I merged this into #110, which also wasn't my intention. Will revert #110 then do another PR for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Trigger the RETRY operation where spec says to
3 participants