Skip to content

fix(config): make external profile cleanup timeout configurable - #510

Merged
EyJunge1 merged 1 commit into
mainfrom
fix/user-profile-cleanup-timeout
Nov 18, 2026
Merged

EyJunge1 merged 1 commit into
mainfrom
fix/user-profile-cleanup-timeout

Conversation

@EyJunge1

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes [Bug] AI profile cleanup aborts at hardcoded 60s external timeout, no config key (frontend allows 180s) #507: external AI profile cleanup no longer dies at a hardcoded 60 s AbortSignal while the Web UI already waited 180 s
  • Adds userProfileCleanupTimeoutMs (default 60000, clamp 10000..600000, numeric strings coerced) and wires it into the external cleanup fetch
  • Derives Node HTTP idle timeout as max(userProfileCleanupTimeoutMs, 300000) + 30000; raises Web UI /ai-cleanup fetch to 630 s so frontend/server never undercut a raised backend deadline
  • Documents the hierarchy in README (+ i18n) and opencode-mem.example.jsonc

Test plan

  • bun test tests/config-resolution.test.ts tests/web-server-request-lifecycle.test.ts tests/ai-cleanup.test.ts tests/config.test.ts
  • bun run typecheck
  • Set "userProfileCleanupTimeoutMs": 180000 with a slow external provider and confirm Web UI AI Cleanup completes past 60 s
  • Leave unset and confirm default still aborts around 60 s for a deliberately slow provider

Hardcoded 60s aborted slow OpenAI-compatible cleanup before the Web UI's
180s budget. Add userProfileCleanupTimeoutMs (default 60s, clamp
10s..600s), derive Node HTTP idle from it, and raise the /ai-cleanup
frontend fetch to cover the max backend deadline.
@EyJunge1
EyJunge1 merged commit e704b90 into main Nov 18, 2026
9 checks passed
@EyJunge1
EyJunge1 deleted the fix/user-profile-cleanup-timeout branch November 18, 2026 13:26
@EyJunge1 EyJunge1 mentioned this pull request Nov 18, 2026
3 tasks done
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.

[Bug] AI profile cleanup aborts at hardcoded 60s external timeout, no config key (frontend allows 180s)

1 participant