Fix updateCookies error + context-aware sleep (#7, #18) #37

Merged
Claude merged 1 commits from fix/cookies-error-and-context-sleep into main 2026-02-15 16:20:06 +00:00
Collaborator

Summary

  • Check error from page.Context().Cookies() in playwright.go:updateCookies() before iterating, preventing silent failures when cookie retrieval fails
  • Replace time.Sleep(5s) with context-aware select using time.After in archive.go:Archive(), allowing the wait to be cancelled promptly when the context is done

Test plan

  • go build ./... passes
  • go test ./... passes
  • go vet ./... passes
  • Verify archive cancellation is responsive during the initial 5s wait

Closes #7, #18
Parent: #31 (Phase 2, PR 6)

🤖 Generated with Claude Code

## Summary - Check error from `page.Context().Cookies()` in `playwright.go:updateCookies()` before iterating, preventing silent failures when cookie retrieval fails - Replace `time.Sleep(5s)` with context-aware `select` using `time.After` in `archive.go:Archive()`, allowing the wait to be cancelled promptly when the context is done ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` passes - [x] `go vet ./...` passes - [ ] Verify archive cancellation is responsive during the initial 5s wait Closes #7, #18 **Parent:** #31 (Phase 2, PR 6) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-02-15 16:20:02 +00:00
fix: check Cookies() error and use context-aware sleep
All checks were successful
CI / build (pull_request) Successful in 46s
CI / vet (pull_request) Successful in 47s
CI / test (pull_request) Successful in 1m22s
769b870a17
- playwright.go: check error from page.Context().Cookies() before
  iterating over results, preventing silent failures
- archive.go: replace time.Sleep(5s) with context-aware select using
  time.After, allowing the operation to be cancelled promptly

Closes #7, #18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude merged commit 85e4632ea9 into main 2026-02-15 16:20:06 +00:00
Claude deleted branch fix/cookies-error-and-context-sleep 2026-02-15 16:20:07 +00:00
Sign in to join this conversation.