picoclaw/pkg
ian f3c1162001
feat(skills): add retry for HTTP requests in skill installer (#261)
* feat(skills): add retry mechanism for HTTP requests

Implement a retry mechanism with exponential backoff for HTTP requests in the skill installer. This improves reliability when fetching skills from GitHub by automatically retrying failed requests up to 3 times.

Add comprehensive tests to verify retry behavior under different scenarios including success on different attempts and proper delay between retries.

* fix: improve http request retry logic with status code checks

Add shouldRetry helper function to determine retryable status codes.
Close response body between retry attempts and break early for non-retryable status codes.

* refactor: remove unused BuiltinSkill struct

The struct was not being used anywhere in the codebase, so it's safe to remove it to reduce clutter and improve maintainability.

* refactor(http): move retry logic to utils package

Extract HTTP retry functionality from skills package to utils for better reusability
Add context-aware sleep function and comprehensive tests

* refactor(http): extract retry delay unit to variable

Extract hardcoded retry delay unit to a variable for better testability and flexibility. Update tests to use milliseconds for faster execution while maintaining the same behavior.

* test(http_retry): remove t.Parallel from test cases

* test(http_retry): remove redundant test cases for retry success

The removed test cases for success on second and third attempts were redundant since the retry logic is already covered by other tests. This simplifies the test suite while maintaining coverage.
2026-02-26 20:35:26 +11:00
..
agent fix: hide compressed historical messages notification (#799) 2026-02-26 12:36:19 +08:00
auth enable misspell 2026-02-25 21:14:19 +11:00
bus Prevent panic on publish after MessageBus is closed (#223) 2026-02-16 15:04:25 +08:00
channels enable whitespace 2026-02-25 21:31:07 +11:00
config fix(providers): support per-model request_timeout in model_list (#733) 2026-02-26 19:08:19 +11:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
cron feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
devices refactor: cleanup dead code and turn on dead code detection in CI (#515) 2026-02-24 21:52:25 +08:00
health Add health check endpoints (/health and /ready) for container orchestration liveness and readiness probes. (#104) 2026-02-16 11:53:11 +08:00
heartbeat enable goprintffuncname 2026-02-25 21:14:19 +11:00
logger enable prealloc 2026-02-25 21:31:07 +11:00
migrate Merge pull request #677 from yinwm/refactor/model-to-model-name 2026-02-24 19:05:40 +08:00
providers fix(providers): support per-model request_timeout in model_list (#733) 2026-02-26 19:08:19 +11:00
routing feat: add multi-agent routing with declarative bindings 2026-02-13 12:12:33 -03:00
session feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
skills feat(skills): add retry for HTTP requests in skill installer (#261) 2026-02-26 20:35:26 +11:00
state feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
tools Update pkg/tools/web.go 2026-02-25 23:04:41 +08:00
utils feat(skills): add retry for HTTP requests in skill installer (#261) 2026-02-26 20:35:26 +11:00
voice feat(linter): Fix govet linter 2026-02-20 22:35:16 +02:00