Skip to content

Conversation

@wizzomafizzo
Copy link
Member

Summary

  • Add Zaparoo-OS, Zaparoo-Arch, and Zaparoo-Platform headers to all zaplink HTTP requests for server-side platform detection
  • Pre-warm known zaplink hosts on startup via HEAD requests to reduce first-access latency from DNS/TLS handshakes
  • Auto-prune non-supporting hosts from database after 30 days to allow re-checking hosts that may have added zaplink support
  • Store base URL (scheme + host) instead of just host to preserve original protocol when pre-warming

- Add Zaparoo-OS, Zaparoo-Arch, and Zaparoo-Platform headers to all
  zaplink HTTP requests for server-side platform detection
- Pre-warm known zaplink hosts on startup via HEAD requests to reduce
  first-access latency from DNS/TLS handshakes
- Auto-prune non-supporting hosts from database after 30 days to allow
  re-checking hosts that may have added zaplink support
- Store base URL (scheme + host) instead of just host to preserve
  original protocol when pre-warming
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 62.16216% with 42 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/zapscript/zaplinks.go 50.76% 28 Missing and 4 partials ⚠️
pkg/database/userdb/sql.go 86.66% 2 Missing and 2 partials ⚠️
pkg/database/userdb/userdb.go 0.00% 4 Missing ⚠️
pkg/service/service.go 83.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Add tests for:
- isOfflineError edge cases in zaplinks_test.go
- SQL edge cases (scan error, rows error) in sql_test.go
- pruneExpiredZapLinkHosts in service_test.go
- Add httpDoer interface for HTTP client injection in preWarmHost
- Add checkInternet parameter to PreWarmZapLinkHosts for testing
- Add comprehensive tests for PreWarmZapLinkHosts and preWarmHost
- Update service.go to pass helpers.WaitForInternet
@wizzomafizzo wizzomafizzo merged commit 0bf28df into main Dec 17, 2025
9 checks passed
@wizzomafizzo wizzomafizzo deleted the feat/zaplink-improvements branch December 17, 2025 11:31
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