Skip to content

Installer downloads: report progress on whole 1 MiB chunks again - #15789

Merged
danielhanchen merged 1 commit into
mainfrom
installer-download-progress-on-1mib-boundaries
Oct 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
installer-download-progress-on-1mib-boundaries

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

#15763 broke tests/python/test_windows_setup_download_progress.py on main (seen on the #15693 staging run; reproduces locally wherever pwsh is installed):

test_windows_real_download_reports_progress_while_active[node|llama|whisper]
E   assert [0.3, 5.2, 10.0, 15.0, 20.0] == [5, 10, 15, 20]

To let the new stall window fire on a trickling connection, #15763 reads real HTTP responses with read1, which returns what one receive brings. It also moved the progress update onto every receive, so the first percent line now appears at 0.3% and the milestones print at whatever receive crosses them (5.2%) instead of at the whole 1 MiB reads the installers used before. The progress text the Windows setup scripts relay changed shape, which is what this test pins.

Change

prebuilt_core.copy_response_body:

  • the chunk size is back to 1 MiB;
  • on the read1 path each read asks only for the bytes up to the next 1 MiB boundary, and progress is reported when the boundary is reached, so the updates land exactly where whole-chunk reads put them;
  • the stall window is still checked after every receive, so a trickle is still abandoned within the window;
  • plain read bodies (file:// mirrors, test doubles) read whole chunks and report each one, as before Installer downloads: retry a body cut short or trickling instead of hashing it #15763.

Testing

  • All 23 test files that touch the installer downloaders, main vs this branch: the only difference in failing IDs is the three test_windows_real_download_reports_progress_while_active cases, which now pass. The 21 tests/studio/install/test_dependency_pass_skips.py failures and the tests/utils/aime_eval.py collection error are on both sides on this host.
  • New test_progress_on_a_real_response_lands_on_whole_chunks: a real local server streams 4 MiB in 48 KiB writes and progress must be updated at exactly 1, 2, 3 and 4 MiB. It runs without pwsh, so Linux CI covers the shape too.
  • Sabotage: reporting progress on every receive again fails the new test and all three PowerShell cases.
  • The trickle tests from Installer downloads: retry a body cut short or trickling instead of hashing it #15763 still pass (the stall is detected within the shortened window), and a real nodejs.org download verifies (55.6 MiB in 0.27 s).

#15763 read real HTTP responses with read1 so the stall window can fire,
which also made progress update on every receive: the first line became
0.3% and later ones 5.2% instead of 5.0%, failing
tests/python/test_windows_setup_download_progress.py. read1 now stops at
the next 1 MiB boundary and progress is reported there, so the lines match
the whole-chunk reads again while the stall check still runs per receive.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T14:39:14.152505Z b1ce4c1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: b1ce4c1287

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 64d0e77 into main Oct 28, 2026
6 of 80 checks passed
@danielhanchen
danielhanchen deleted the installer-download-progress-on-1mib-boundaries branch October 28, 2026 14:45
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.

1 participant