gabriel / muse public
fix patch fix/hub-user-read-update-path #2 / 2
AI Agent gabriel · 10 days ago · Jul 7, 2026 · Diff

fix: muse hub user read/update call a non-existent /profile URL suffix (issue #79)

Found while checking whether aaronrene had a registered MuseHub account before inviting him as a collaborator. muse hub user read aaronrene returned 404 despite his profile page loading fine in a browser.

The real routes are GET/PUT /api/users/{username} -- no /profile suffix; 'profile' only appears in the operation_id (getUserProfile/ updateUserProfile), describing the data returned, not an extra URL segment. run_user_update had a second bug: PATCH instead of the route's actual PUT.

Confirmed via direct curl before touching code: /api/users/aaronrene -> 200, /api/users/aaronrene/profile -> 404.

Added TestHubUserReadUpdateCommands asserting exact path and HTTP method via mocked _hub_api -- the style of test that would have caught this originally. Verified live against staging post-fix: aaronrene resolves correctly (3 repos, sessionCredits, etc). Full test_cli_hub.py green (105/105).

sha256:11a08fe9350605388693843e3c1cd12d114576763cbd6e8a3cc232884bddafec sha
+3 ~2 symbols
sha256:0c2e49a075e794eb393ddee6381e1310cea57a8d443c62ebfc7642cb00ca8e4c snapshot
+3
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 5 symbols
~ tests/test_cli_hub.py .py 3 symbols added
+ TestHubUserReadUpdateCommands class class TestHubUserReadUpdateCommands L1605–1664
+ test_user_read_calls_correct_path_and_method method method test_user_read_calls_correct_path_and_method L1617–1636
+ test_user_update_calls_correct_path_and_method method method test_user_update_calls_correct_path_and_method L1638–1664

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:11a08fe9350605388693843e3c1cd12d114576763cbd6e8a3cc232884bddafec --body "your comment"