Skip to content

fix(hover): preserve warm probe cancellation#39

Merged
intel352 merged 3 commits into
mainfrom
codex/hover-session-cancel-v057
Jun 6, 2026
Merged

fix(hover): preserve warm probe cancellation#39
intel352 merged 3 commits into
mainfrom
codex/hover-session-cancel-v057

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 6, 2026

Summary

  • preserve context cancellation/deadline errors from warm-session probes instead of falling through to credential login
  • preserve cancellation/deadline errors that surface after the probe response is returned, including body decode/read failures
  • make warm-profile login tests race-safe with atomic counters
  • bump plugin metadata to 0.5.7 for release

Verification

  • GOWORK=off go test ./pkg/hoverclient -run 'TestBrowserBackend_ProbeExistingSessionReturnsContextCancellation|TestBrowserBackend_ProbeExistingSessionReturnsContextCancellationFromBodyRead|TestBrowserBackend_LoginReusesWarmBrowserProfileSession|TestBrowserBackend_LoginFallsBackWhenWarmProfileUnauthenticated' -count=1 -v
  • GOWORK=off go test ./pkg/hoverclient -count=1
  • GOWORK=off go test ./... -count=1
  • wfctl plugin validate-contract --for-publish --tag v0.5.7 .
  • git diff --check

Regression proof

With fix reverted:

  • GOWORK=off go test ./pkg/hoverclient -run TestBrowserBackend_ProbeExistingSessionReturnsContextCancellationFromBodyRead -count=1 -v failed with probeExistingSession error = <nil>, want context.Canceled.

With fix restored:

  • GOWORK=off go test ./pkg/hoverclient -run TestBrowserBackend_ProbeExistingSessionReturnsContextCancellationFromBodyRead -count=1 -v passed.

Notes

This carries forward the post-merge Copilot follow-up from PR #38 so the DNS workflow should consume a release that includes the cancellation fix, not only the initial warm-profile reuse change.

intel352 added 2 commits June 6, 2026 00:02
Keep canceled or expired warm-session probes from falling through to the slower browser login path.

Use atomic counters in warm-profile tests so httptest handler assertions stay race-free.
Copilot AI review requested due to automatic review settings June 6, 2026 04:03
Copy link
Copy Markdown

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 improves the warm-session reuse flow in pkg/hoverclient by ensuring context cancellation/deadline errors from the warm-session probe are preserved (instead of falling through into credential login), makes the warm-profile login tests race-safe, and bumps plugin metadata for the next release.

Changes:

  • Preserve context.Canceled / context.DeadlineExceeded from the warm-session probe path.
  • Make browser-backend login tests race-safe by switching hit counters to sync/atomic.
  • Bump plugin.json version to 0.5.7.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
plugin.json Bumps plugin version to 0.5.7 for the release.
pkg/hoverclient/browser_backend.go Updates warm-session probe error handling to preserve cancellation/deadline behavior.
pkg/hoverclient/browser_backend_test.go Converts request-hit counters to atomics and adds a cancellation-specific probe test.

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

Comment thread pkg/hoverclient/browser_backend.go
@intel352 intel352 merged commit 03df64c into main Jun 6, 2026
4 checks passed
@intel352 intel352 deleted the codex/hover-session-cancel-v057 branch June 6, 2026 04:20
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