Skip to content

fix(skills): hash byte-backed bundle files - #14108

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/skills-bundle-bytes-hash-13408
Closed

fix(skills): hash byte-backed bundle files#14108
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/skills-bundle-bytes-hash-13408

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • make bundle_content_hash() accept both text and byte-backed skill bundle files
  • hash raw bytes directly while preserving the existing UTF-8 path for string content
  • add a regression test covering byte-backed bundle content

Why

Fixes #13408. SkillBundle.files is already typed as str | bytes, but bundle_content_hash() always called .encode("utf-8"), which crashes on byte content during skill update checks.

Testing

  • pytest -o addopts= tests/tools/test_skills_hub.py -k bundle_content_hash

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13531 — same fix for bundle_content_hash() bytes crash (#13408). Also overlaps with #9925 and #3751.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #13531.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: bundle_content_hash crashes with bytes values (AttributeError)

3 participants