Skip to content

fix(http): add start_operations for progress reporting#7355

Merged
jdx merged 4 commits into
mainfrom
feat/http-start-operations
Dec 17, 2025
Merged

fix(http): add start_operations for progress reporting#7355
jdx merged 4 commits into
mainfrom
feat/http-start-operations

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Dec 17, 2025

Summary

  • Implement start_operations call in the http backend to improve progress bar display during tool installation
  • Follows the same pattern used by the GitHub and aqua backends

The operation count is calculated dynamically:

  • 1 for download (always)
  • +1 if checksum option is set
  • +1 for extraction (always)

Test plan

  • Install an http tool with checksum and verify smoother progress bar
  • Install an http tool without checksum and verify progress works

🤖 Generated with Claude Code


Note

Adds dynamic operation counting with start_operations and propagates progress reporting through download, checksum, extraction, and cache-hit paths, including in raw/compressed extraction routines.

  • Backend › HTTP:
    • Progress reporting:
      • Compute dynamic op count (download, optional checksum, extraction, optional lockfile checksum) and call start_operations.
      • On cache hit, mark extraction step complete via set_length(1)/set_position(1).
      • Propagate pr into extract_compressed_binary and extract_raw_file; set extraction messages, lengths, and completion positions.
    • Lockfile/metadata:
      • Record URL in tv.lock_platforms using cloned platform_key.

Written by Cursor Bugbot for commit a1c0ae5. This will update automatically on new commits. Configure here.

Implement start_operations call in the http backend to improve progress
bar display during tool installation.

The operation count is calculated dynamically:
- 1 for download (always)
- +1 if checksum option is set
- +1 for extraction (always)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings December 17, 2025 16:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements progress reporting for the HTTP backend by adding a start_operations call that calculates and reports the total number of operations during tool installation. This brings the HTTP backend in line with the GitHub and aqua backends' progress reporting implementation.

Key changes:

  • Added dynamic operation count calculation (download + optional checksum + extraction)
  • Called start_operations with the calculated count before beginning download

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/backend/http.rs
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 17, 2025

Hyperfine Performance

xtasks/test/perf

Command mise-2025.12.10 mise Variance
install (cached) 112ms 109ms +2%
ls (cached) 66ms 66ms +0%
bin-paths (cached) 73ms 73ms +0%
task-ls (cached) 282ms 278ms +1%

Previously, extraction operation was counted in op_count but progress
was only reported for archive files on cache miss. This caused the
progress bar to not complete properly for compressed binaries, raw
files, and cached installations.

- Add progress reporting to extract_compressed_binary and extract_raw_file
- Report extraction as complete instantly on cache hit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx changed the title feat(http): add start_operations for progress reporting fix(http): add start_operations for progress reporting Dec 17, 2025
Comment thread src/backend/http.rs
autofix-ci Bot and others added 2 commits December 17, 2025 16:50
The operation count only accounted for download, user-provided checksum,
and extraction. However, verify_checksum() also performs hash operations
that call set_length() when verifying/generating lockfile checksums.
This caused the progress bar to overshoot 100%.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx enabled auto-merge (squash) December 17, 2025 17:13
@jdx jdx merged commit 0294d82 into main Dec 17, 2025
41 of 43 checks passed
@jdx jdx deleted the feat/http-start-operations branch December 17, 2025 18:41
jdx pushed a commit that referenced this pull request Dec 18, 2025
### 🚀 Features

- **(alias)** rename alias to tool-alias, add shell-alias command by
@jdx in [#7357](#7357)
- **(upgrade)** display summary of upgraded tools by @jdx in
[#7372](#7372)
- **(vfox)** embed vfox plugin Lua code in binary by @jdx in
[#7369](#7369)

### 🐛 Bug Fixes

- **(aqua)** add start_operations for progress reporting by @jdx in
[#7354](#7354)
- **(github)** improve asset detection for distro-specific and Swift
artifacts by @jdx in [#7347](#7347)
- **(github)** clean up static_helpers.rs and fix archive bin= option by
@jdx in [#7366](#7366)
- **(http)** add start_operations for progress reporting by @jdx in
[#7355](#7355)
- **(lockfile)** place lockfile alongside config file by @jdx in
[#7360](#7360)
- **(progress)** add start_operations to core plugins by @jdx in
[#7351](#7351)
- **(ruby-install)** Use ruby_install_bin to update by @calebhearth in
[#7350](#7350)
- **(rust)** add release_url for rust versions by @jdx in
[#7373](#7373)
- **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in
[#7358](#7358)
- **(toolset)** filter tools by OS in list_current_versions by @jdx in
[#7356](#7356)
- **(ubi)** only show deprecation warning during installation by @jdx in
[#7380](#7380)
- **(ui)** remove noisy "record size" message during install by @jdx in
[#7381](#7381)
- update mise-versions URL to use /tools/ prefix by @jdx in
[#7378](#7378)

### 🚜 Refactor

- **(backend)** unified AssetMatcher with checksum fetching by @jdx in
[#7370](#7370)
- **(backend)** deprecate ubi backend in favor of github by @jdx in
[#7374](#7374)
- **(toolset)** decompose mod.rs into smaller modules by @jdx in
[#7371](#7371)

### 🧪 Testing

- **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx
in
[052ea40](052ea40)

### 📦 Registry

- add vfox-gcloud backend for gcloud by @jdx in
[#7349](#7349)
- convert amplify to use github backend by @jdx in
[#7365](#7365)
- add github backend for djinni tool by @jdx in
[#7363](#7363)
- switch glab to native gitlab backend by @jdx in
[#7364](#7364)
- add s5cmd by @jdx in [#7376](#7376)

### Chore

- **(registry)** disable flaky tests for gitu and ktlint by @jdx in
[64151cb](64151cb)
- resolve clippy warnings and add stricter CI check by @jdx in
[#7367](#7367)
- suppress dead_code warnings in asset_matcher module by @jdx in
[#7377](#7377)

### New Contributors

- @calebhearth made their first contribution in
[#7350](#7350)
jekis913 added a commit to jekis913/mise that referenced this pull request Dec 18, 2025
* upstream/main:
  fix(http): add start_operations for progress reporting (jdx#7355)
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