Skip to content

Task 011: Thin http-client to Bun fetch wrapper - #20

Merged
Igloczek merged 1 commit into
masterfrom
task/011-thin-http-client
Jun 30, 2026
Merged

Igloczek merged 1 commit into
masterfrom
task/011-thin-http-client

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/011-thin-http-client.md from the ponytail audit backlog.

Goal

Shrink the Axios-shaped HTTP client while keeping the public API used by monitors and notifications.

Scope

  • Remove dead httpAgent / httpsAgent guards and axios-only code paths in src/server/http-client.ts.
  • Use native redirect: "follow" where safe instead of manual redirect loop (keep override for monitors that need custom redirect handling, if any).
  • Keep get / post / request exports and HttpClientError shape stable for callers.
  • Do not change proxy behavior (Bun fetch proxy option).

Acceptance criteria

  • http-client.ts is at least 25% smaller than baseline (~336 LOC → ≤250 LOC).
  • test/backend-test/http-client.test.ts passes without weakening assertions.
  • bun run test:backend passes.
  • bun run build succeeds.
  • No new dependencies added.

Depends on

Task 001 (proxy agents removed).

Verification

bun run test:backend
bun run build
wc -l src/server/http-client.ts

Audit reference

Finding #9 — Axios-shaped http-client.

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

http-client.ts: 336 → 250 LOC. Native redirect: "follow" when unset; compact manual loop when maxRedirects set. Stable API preserved.

Lean already. Ship.

1 file changed, 76 insertions(+), 161 deletions(-)

Remove verbose JSDoc and axios-shaped redirect loop for the default
path. Use native redirect: "follow" when maxRedirects is unset; keep a
compact manual redirect path for monitors that set a limit. Preserve
get/post/request exports, HttpClientError shape, proxy/TLS transport,
and explicit rejection of dead axios agent options.
@Igloczek
Igloczek force-pushed the task/011-thin-http-client branch from a01b35b to dafc1e3 Compare June 30, 2026 11:55
@Igloczek
Igloczek merged commit 244ed68 into master Jun 30, 2026
1 check passed
Igloczek added a commit that referenced this pull request Jun 30, 2026
Add shared notification-provider-metadata module as the single source of
truth for provider module paths, display labels, and dropdown categories.
Refactor NotificationDialog to render optgroups from registry data instead
of a large hardcoded computed property.

Task 023 — ponytail audit finding #20.
@Igloczek
Igloczek deleted the task/011-thin-http-client branch June 30, 2026 12:58
Igloczek added a commit that referenced this pull request Aug 8, 2026
Task 011: Thin http-client to Bun fetch wrapper
Igloczek added a commit that referenced this pull request Aug 8, 2026
Add shared notification-provider-metadata module as the single source of
truth for provider module paths, display labels, and dropdown categories.
Refactor NotificationDialog to render optgroups from registry data instead
of a large hardcoded computed property.

Task 023 — ponytail audit finding #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.

1 participant