Skip to content

fix(daemon): print a size that rounds to 1024 KB in MB - #10431

Merged
multica-eve merged 1 commit into
multica-ai:mainfrom
kevin9327:fix/format-bytes-kb-rollover
Nov 12, 2026
Merged

multica-eve merged 1 commit into
multica-ai:mainfrom
kevin9327:fix/format-bytes-kb-rollover

Conversation

@kevin9327

@kevin9327 kevin9327 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When a skill bundle download fails, the daemon's error message shows the bundle size through formatBytes. Sizes from 1,048,064 bytes up to 1,048,575 bytes (1023.5 KB to just under 1 MB) fall in the KB branch, and %.0f rounds them up, so the message reads 1024 KB instead of 1.00 MB. Anyone reading a failed-download message for a bundle near 1 MB sees a size in the wrong unit.

Goal

A size that would round to 1024 KB prints in MB, so the KB branch never shows 1024 KB.

Proposal

Move the KB/MB cut-off in formatBytes (server/internal/daemon/daemon.go) down to the first byte count that rounds to 1024 KB, which is 1 MiB minus 512 bytes. Sizes below it print exactly as before. TestFormatBytes gains three cases at the boundary: 1,048,063 bytes stays 1023 KB, and 1,048,064 and 1,048,575 bytes print 1.00 MB. The two new MB cases fail on main with "1024 KB" and pass with this change.

Screenshots

I don't have a running Multica deployment where I can make a skill download fail on purpose, so I can't attach a capture from the app. Here is the text the failure message would carry, before and after, for a declared size of 1,048,200 bytes. It comes from a standalone copy of formatBytes (old and new) dropped into the describeSkillBundleFailure format string, not from the app itself:

before: network error downloading skill "pdf-tools" (id=sk_1): no successful response from server after 30s overall; declared skill content size 1024 KB; ...
after:  network error downloading skill "pdf-tools" (id=sk_1): no successful response from server after 30s overall; declared skill content size 1.00 MB; ...

This change was written with AI assistance; I reviewed it and ran go test ./internal/daemon -run TestFormatBytes before and after the fix.


Closes MUL-9117

@vercel

vercel Bot commented Nov 11, 2026

Copy link
Copy Markdown

@kevin9327 is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@multica-eve

Copy link
Copy Markdown
Collaborator

Please add a screenshot or screen recording from the running app showing the skill-download task failure details and the affected size message. This PR changes user-visible error text from 1024 KB to 1.00 MB, so the current “N/A” does not cover the required evidence. A before/after comparison is preferred but not required.

The pull request requirements require running-app evidence for UI or interaction changes, including error messages. UI or interaction PRs are not reviewed until screenshots or a screen recording are added. Please update the PR description with the capture.

This comment was posted automatically by an agent in Multica and may contain mistakes. A maintainer will follow up.

@kevin9327

Copy link
Copy Markdown
Contributor Author

Thanks. I can't run a full Multica stack and force a skill download to fail, so I have no capture from the app itself. I added a before/after of the message text to the description instead, built from the old and new formatBytes and the existing message format. If a real app capture is still required for this one, I understand, and a maintainer is welcome to close it.

@multica-eve
multica-eve merged commit d6e5921 into multica-ai:main Nov 12, 2026
30 of 32 checks passed
pseudoyu added a commit to pseudoyu/multica that referenced this pull request Nov 12, 2026
…onnections

* upstream/main: (42 commits)
  feat(dev): realtime events, cache and agent panels in the dev toolbar (MUL-9139) (multica-ai#10470)
  MUL-9086: add Amp CLI harness support (multica-ai#10477)
  fix(autopilots): store no next run for a schedule that never fires (multica-ai#10239)
  fix(scripts): 安装脚本在查版失败和切库失败时不再谎报成功 (multica-ai#10246)
  MUL-9142: fix(zcode): run Linux desktop CLI headlessly (multica-ai#10476)
  MUL-9141 fix(hermes): preserve model discovery through confirmations (multica-ai#10478)
  feat(chat): persist optional submission acceptance receipts (multica-ai#10469)
  fix(daemon): reuse checkout when repo checkout runs from inside it (MUL-9099) (multica-ai#10465)
  fix(daemon): clear the client user id on daemon-token requests (multica-ai#10333)
  MUL-9085: add Factory Droid harness (multica-ai#10399)
  perf(web): cache locale dictionaries by language (MUL-9114) (multica-ai#10473)
  MUL-8992: fix(server): keep background runs and workspace-wide reads inside private projects (multica-ai#10329)
  feat(views): show linked pull requests across issue view layouts (multica-ai#10351)
  EDEN-20: add confirmed deletion of inbox entries (multica-ai#10356)
  fix(usage): price GLM-5.3, Kimi K3.1 Pro, Gemini 4 Carbon, and Antigravity Claude effort ids (multica-ai#10445)
  fix(agents): wake the runtime when an agent's concurrency cap changes (multica-ai#10463)
  MUL-7703 feat(issues): add Idle to Agent status filter (multica-ai#10461)
  fix(agent): probe Hermes version with acp --version (MUL-9132) (multica-ai#10468)
  feat(desktop): right-click on the issue page opens its actions menu (MUL-9093) (multica-ai#10467)
  fix(daemon): print a size that rounds to 1024 KB in MB (multica-ai#10431)
  ...

# Conflicts:
#	server/pkg/agent/zcode_invocation.go
#	server/pkg/agent/zcode_runtime_config.go
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