Skip to content

Wait up to 60 s for each bulk document download chunk - #331

Merged
stevevanhooser merged 4 commits into
mainfrom
claude/download-timeout-60s
Oct 15, 2026
Merged

stevevanhooser merged 4 commits into
mainfrom
claude/download-timeout-60s

Conversation

@stevevanhooser

@stevevanhooser stevevanhooser commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Raises the default timeout for bulk document downloads from 20 to 60 seconds, to match VH-Lab/NDI-matlab#1030.

Why

For each chunk of up to 2000 documents, downloadDocumentCollection polls the chunk's presigned ZIP URL while the server's background job builds the archive. That job may run for up to 15 minutes, but the client gave up after 20 seconds. A chunk of large documents can take longer than that to build, and the download then failed partway through: a TimeoutError in Python, a 404 from curl in MATLAB. This happened when downloading the calculators paper's example dataset (4549 documents).

Changes

  • src/ndi/cloud/download.py: the timeout default is 60.0 in both downloadDocumentCollection and _download_chunk_zip, and the docstring now says "Default 60 matches MATLAB".
  • src/ndi/cloud/ndi_matlab_python_bridge.yaml: the timeout default for downloadDocumentCollection is "60.0", and matlab_last_sync_hash is NDI-matlab e82a607f0 (the head of the paired NDI-matlab branch, which CI checks out).
  • src/ndi/calc/stimulus/ndi_matlab_python_bridge.yaml: tuningcurve's matlab_last_sync_hash moves to 49a875c94 (Fix tuningcurve calculator dealing over a single stimulus property VH-Lab/NDI-matlab#1029, the single-property deal fix). Nothing to port, because the Python calculate is still a stub with no deal loop. The decision_log records this.
  • CHANGELOG.md: an entry under Unreleased / Fixed.

Merge VH-Lab/NDI-matlab#1030 first, with a merge commit, so e82a607f0 stays in NDI-matlab main history.

Testing

  • black --check and ruff check pass on download.py.
  • tests/test_matlab_bridge_hashes.py passes locally against the paired NDI-matlab branch.
  • I couldn't run the rest of the suite here, because this environment can't fetch the GitHub-archive dependencies. CI will run it.

https://claude.ai/code/session_01T41FUDkgY9DAstG7LzZHaV

🤖 Generated with Claude Code


Generated by Claude Code

downloadDocumentCollection polls each chunk's presigned ZIP URL while
the server builds the archive, and gave up after 20 s. A chunk of 2000
large documents can take longer, which surfaced as a TimeoutError partway
through downloading a dataset. Raise the default to 60 s in both
downloadDocumentCollection and _download_chunk_zip, matching
NDI-matlab#1030, and update the bridge entry's default to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T41FUDkgY9DAstG7LzZHaV
tuningcurve: NDI-matlab 49a875c94 (VH-Lab/NDI-matlab#1029) fixed the
single-property deal index in calculate; the Python calculate is still a
stub with no deal loop, so nothing to port. Recorded in decision_log.

downloadDocumentCollection: NDI-matlab 2669a8525 (the paired
claude/download-timeout-60s branch) raises the default Timeout to 60 s,
which this PR ports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T41FUDkgY9DAstG7LzZHaV
Matches NDI-matlab 5b0a3a87a on the paired branch: 60 s is still too
short for a chunk of large documents while the server builds its ZIP.
Bridge default and sync hash follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T41FUDkgY9DAstG7LzZHaV
@stevevanhooser stevevanhooser changed the title Wait up to 60 s for each bulk document download chunk Wait up to 300 s for each bulk document download chunk Oct 15, 2026
Matches NDI-matlab e82a607f0 on the paired branch. Bridge default and
sync hash follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T41FUDkgY9DAstG7LzZHaV
@stevevanhooser stevevanhooser changed the title Wait up to 300 s for each bulk document download chunk Wait up to 60 s for each bulk document download chunk Oct 15, 2026
@stevevanhooser
stevevanhooser merged commit 0dea01e into main Oct 15, 2026
10 checks passed
@stevevanhooser
stevevanhooser deleted the claude/download-timeout-60s branch October 15, 2026 12:49
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