Skip to content

[codex] make request timeout configurable - #552

Open
pepepeboom wants to merge 2 commits into
HemmeligOrg:v7from
pepepeboom:fix/configurable-request-timeout
Open

[codex] make request timeout configurable#552
pepepeboom wants to merge 2 commits into
HemmeligOrg:v7from
pepepeboom:fix/configurable-request-timeout

Conversation

@pepepeboom

@pepepeboom pepepeboom commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • read HEMMELIG_REQUEST_TIMEOUT in seconds, keeping the current 15-second default
  • apply Hono's timeout middleware only when the configured value is greater than zero, so 0 disables the app-level timeout
  • document the new setting and a production example

Fixes #551

Validation

  • unset: defaults to 15 seconds
  • HEMMELIG_REQUEST_TIMEOUT=0: app timeout disabled
  • HEMMELIG_REQUEST_TIMEOUT=60: custom timeout applied
  • npm run build: passed (8,246 modules transformed)
  • git diff --check: passed

Summary by CodeRabbit

  • New Features

    • Server request timeouts can now be configured through HEMMELIG_REQUEST_TIMEOUT.
    • Timeout values are specified in seconds and default to 15 seconds.
    • Set the value to zero or a negative number to disable request timeout handling.
  • Documentation

    • Added configuration guidance, including timeout behavior and a production setup example.

@pepepeboom
pepepeboom marked this pull request as ready for review August 11, 2026 09:31
@pepepeboom
pepepeboom requested a review from bjarneo as a code owner August 11, 2026 09:31
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cbcabdff-03e5-4752-94ee-f8aad382b7a2

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3c837 and 89191af.

📒 Files selected for processing (1)
  • docs/env.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/env.md

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The API request timeout is configurable through HEMMELIG_REQUEST_TIMEOUT. It defaults to 15 seconds and is disabled for zero or negative values. The environment documentation includes the setting and a production example using 60 seconds.

Changes

API request timeout

Layer / File(s) Summary
Configurable timeout behavior
api/config.ts, api/app.ts
The server reads HEMMELIG_REQUEST_TIMEOUT with a 15-second default. The API applies timeout middleware only when the configured value is positive.
Timeout configuration reference
docs/env.md
The documentation describes timeout units, the default value, disable behavior, and a production value of 60 seconds.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 89191

The request timeout remains 15 seconds by default, supports configured values, and can be disabled with 0; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: bjarneo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the request timeout configurable.
Linked Issues check ✅ Passed The changes address issue #551 by replacing the hardcoded timeout with a configurable setting that can also disable the application-level timeout.
Out of Scope Changes check ✅ Passed All changes are directly related to configuring, applying, and documenting the request timeout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/env.md`:
- Line 19: Update the HEMMELIG_REQUEST_TIMEOUT entry in the environment
documentation to state that zero or negative values disable the application
timeout, matching api/app.ts behavior; do not imply that only zero disables it.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d92eb646-3d07-427f-ac75-b5184ee06754

📥 Commits

Reviewing files that changed from the base of the PR and between 08511da and 8c3c837.

📒 Files selected for processing (3)
  • api/app.ts
  • api/config.ts
  • docs/env.md

Comment thread docs/env.md Outdated
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] Timeout when uploading larger file. Remove hardcoded limit.

1 participant