Skip to content

feat: make bootstrapper initialiser timeouts configurable (#874)#999

Merged
cybermaggedon merged 2 commits into
trustgraph-ai:release/v2.6from
corvus-0x:feat/configurable-bootstrap-timeouts
Jun 30, 2026
Merged

feat: make bootstrapper initialiser timeouts configurable (#874)#999
cybermaggedon merged 2 commits into
trustgraph-ai:release/v2.6from
corvus-0x:feat/configurable-bootstrap-timeouts

Conversation

@corvus-0x

Copy link
Copy Markdown
Contributor

Summary

Addresses part of #874. The bootstrapper initialisers hardcoded the request timeouts for their flow-svc and IAM calls, so operators had no way to tune them for high-latency environments (e.g. cross-region Cassandra, overloaded message bus).

Per the issue's guidance ("pick one area to start with"), this PR covers the bootstrapper area only. The remaining areas (config client, librarian RAG fetch, gateway) are intentionally left for follow-up PRs to keep this change focused and easy to review.

Changes

Each timeout is now a constructor parameter, threaded through the existing initialiser params: mechanism (bootstrapper/service.py instantiates each initialiser via cls(**entry.get("params", {}))). Defaults preserve the current values exactly, so behaviour is unchanged unless an operator explicitly overrides them.

  • DefaultFlowStartlist_timeout (default 10, for list-flows) and start_timeout (default 30, for start-flow). Kept as two separate params so each call's current value is preserved rather than collapsing both to a single timeout.
  • WorkspaceInitiam_timeout (default 10, for the IAM create-workspace request).

Example operator override in an initialisers file:

initialisers:
  - class: trustgraph.bootstrap.initialisers.DefaultFlowStart
    name: default-flow
    flag: v1
    params:
      blueprint: document-rag
      list_timeout: 20
      start_timeout: 60

Tests

Adds tests/unit/test_bootstrap/ with unit tests covering:

  • the defaults land on the instance,
  • operator overrides are stored,
  • the configured values actually reach the underlying request(..., timeout=...) calls (behavioural test for DefaultFlowStart, which guards the wiring against future regressions).

Notes

  • No validation is added on the timeout values, matching the surrounding "trust the operator" style of these initialisers (existing params like description are likewise unvalidated). Happy to add bounds-checking if preferred.

DefaultFlowStart and WorkspaceInit hardcoded the request timeouts for
their flow-svc and IAM calls, leaving operators no way to tune them for
high-latency environments (trustgraph-ai#874).

Expose them as constructor parameters threaded through the existing
initialiser `params:` mechanism, defaulting to the current values so
behaviour is unchanged unless explicitly overridden:

- DefaultFlowStart: list_timeout=10 (list-flows), start_timeout=30 (start-flow)
- WorkspaceInit: iam_timeout=10 (create-workspace)

Add unit tests for the defaults, override storage, and that configured
values reach the underlying request calls.
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Contributor License Agreement ✅

All contributors have signed the CLA. Thank you!

@corvus-0x

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@cybermaggedon cybermaggedon self-assigned this Jun 29, 2026

@cybermaggedon cybermaggedon 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.

Thanks! Nicely scoped change, extra tests are appreciated!

Comment thread tests/unit/test_bootstrap/test_default_flow_start.py
corvus-0x added a commit to corvus-0x/trustgraph that referenced this pull request Jun 29, 2026
Addresses review feedback on PR trustgraph-ai#999: add the explicit
@pytest.mark.asyncio decorator to test_run_forwards_configured_timeouts
so it does not rely on asyncio_mode=auto and stays consistent with the
rest of the suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses review feedback on PR trustgraph-ai#999: add the explicit
@pytest.mark.asyncio decorator to test_run_forwards_configured_timeouts
so it does not rely on asyncio_mode=auto and stays consistent with the
rest of the suite.
@corvus-0x corvus-0x force-pushed the feat/configurable-bootstrap-timeouts branch from 50fe637 to f4cdab3 Compare June 29, 2026 17:43
@cybermaggedon

Copy link
Copy Markdown
Contributor

Thanks for the quick update, much apprecated!

@cybermaggedon cybermaggedon merged commit 1aa9549 into trustgraph-ai:release/v2.6 Jun 30, 2026
3 checks passed
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.

2 participants