fleet-memory/hindsight-docs/docs/developer
Petr Plenkov 8ce06e3e7c
Add wall-clock timeout to reflect operations (#643)
* Initial plan

* feat: add wall-clock timeout to reflect operations (fixes vectorize-io/hindsight#642)

Add a configurable wall-clock timeout (default: 300s / 5 minutes) for
the entire reflect operation. This prevents reflect calls from hanging
for up to 40 minutes when LLM calls are slow or iteration counts are
high.

Changes:
- Add DEFAULT_REFLECT_WALL_TIMEOUT (300s) config constant
- Add HINDSIGHT_API_REFLECT_WALL_TIMEOUT env variable support
- Wrap run_reflect_agent() with asyncio.wait_for() in reflect_async()
- Return HTTP 504 on timeout in the reflect HTTP endpoint
- Add unit test for wall-clock timeout enforcement

Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ThePlenkov/hindsight/sessions/a123d68b-aca1-4040-8bba-8c4f0fab2e2c

* fix: address PR review findings (OpenAPI 504, docs, type hints, main.py TypeError, overlapping exceptions, lazy logging)

Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ThePlenkov/hindsight/sessions/dd574a88-53a3-4f9e-bba7-5a40b0eddb99

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
2026-03-23 09:19:26 +01:00
..
api feat(docs): Integrations Hub + unified page hero (#620) 2026-03-19 20:29:55 +01:00
admin-cli.md Fix run-db-migration for all-tenant upgrades (#530) 2026-03-10 10:10:03 +01:00
configuration.md Add wall-clock timeout to reflect operations (#643) 2026-03-23 09:19:26 +01:00
development.md rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
extensions.md feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
index.mdx feat(docs): Integrations Hub + unified page hero (#620) 2026-03-19 20:29:55 +01:00
installation.md doc: fix build 2026-03-13 15:19:56 +01:00
mcp-server.md feat: expand MCP tool surface area with 18 new tools and enhanced parameters (#435) 2026-02-25 10:26:46 +01:00
models.mdx feat: upgrade MiniMax default model from M2.5 to M2.7 (#606) 2026-03-18 17:15:20 +01:00
monitoring.md feat: add otel traceability (#330) 2026-02-10 12:20:48 +01:00
multilingual.md chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
observations.mdx feat: observation_scopes field to drive observations granularity (#447) 2026-02-28 10:46:21 +01:00
performance.md doc: changelog for 0.4.12 (#397) 2026-02-18 14:55:19 +01:00
rag-vs-hindsight.md doc: mental models (#199) 2026-01-26 14:27:08 +01:00
reflect.mdx feat: increase customization for reflect, retain and consolidation (#419) 2026-02-23 20:35:32 +01:00
retain.md docs: entities vs tags vs metadata (#466) 2026-03-02 14:47:40 +01:00
retrieval.md chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
services.md doc: mental models (#199) 2026-01-26 14:27:08 +01:00
storage.md bump pg0 0.11.x and improve documentation (#33) 2025-12-16 13:33:01 +01:00