Skip to content

Conversation

@molon
Copy link
Collaborator

@molon molon commented Nov 15, 2025

Type of change

Description

Related issues

Notes for reviewer

Copilot AI review requested due to automatic review settings November 15, 2025 18:46
@molon molon merged commit f3bc7dc into main Nov 15, 2025
5 checks passed
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 test hooks to better represent the actual execution flow by replacing afterMarkRecentWrite with afterSingleflightEnd. The hook is moved from inside markRecentWrite (which only tracks write timestamp) to after the singleflight result is received, providing a more accurate signal for when singleflight operations complete.

  • Renamed test hook from afterMarkRecentWrite to afterSingleflightEnd for semantic clarity
  • Moved hook invocation from markRecentWrite to fetchFromUpstreamWithSFKey after receiving singleflight result
  • Updated test comments to reflect the actual behavior being tested

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
client.go Renamed test hook field and moved invocation from markRecentWrite to after singleflight completion in fetchFromUpstreamWithSFKey
double_check_test.go Updated test hook name and clarified comments to reflect testing of complete singleflight execution
ristretto.go Added documentation comments explaining cache write behavior and buffer processing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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