gabriel / muse public
feat patch musehub#193 feat/193-collaborator-accept-cli #1 / 1
AI Agent gabriel · 3 days ago · Sep 11, 2026 · Diff

feat(musehub#193): muse hub collaborator accept

Adds the client-side counterpart to musehub's new POST /repos/{repo_id}/collaborators/accept endpoint. Before this, an invited collaborator's granted permission was permanently unusable -- accepted_at gated all non-owner writes (per musehub#131) but nothing could ever set it. Self-service: no target handle, accepts the invitation addressed to the caller's own authenticated identity. Idempotent.

Tests: no prior test file existed for muse/cli/commands/hub/collaborators.py at all -- added tests/test_cmd_hub_collaborator_accept.py covering flag registration (no positional arg, --json, --hub override), the correct POST path is called, JSON envelope output, and text-mode stderr confirmation. 6/6 passing. tests/test_app.py (27 tests) still green.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

sha256:f0e66c9b996b798fb99b1fe8cc7ef318784f5285940729f796e0f789fab79ea5 sha
+17 ~1 symbols
2 changed · 1185 in snapshot files
sha256:3adfa61516a1ac432d944a9165c30097856c386d9eadfe530e916cf07fecfec0 snapshot
+17
symbols added
~1
symbol modified
2
files changed
1185
files in snapshot
0
dead code introduced
Semantic Changes 18 symbols
+ TestRegisterFlags class class TestRegisterFlags L20–37
+ _parse method method _parse L21–25
+ test_hub_override_flag method method test_hub_override_flag L35–37
+ test_json_flag method method test_json_flag L31–33
+ test_no_positional_arg_required method method test_no_positional_arg_required L27–29
+ TestRunCollaboratorAccept class class TestRunCollaboratorAccept L40–82
+ test_calls_accept_endpoint method method test_calls_accept_endpoint L41–54
+ test_json_output_includes_envelope_and_data method method test_json_output_includes_envelope_and_data L56–69
+ test_text_mode_prints_confirmation_to_stderr method method test_text_mode_prints_confirmation_to_stderr L71–82
+ MagicMock import import MagicMock L13–13
+ annotations import import annotations L9–9
+ argparse import import argparse L11–11
+ collaborators import import collaborators L17–17
+ json import import json L12–12
+ patch import import patch L13–13
+ pytest import import pytest L15–15
~ muse/cli/commands/hub/collaborators.py .py 1 symbol added, 1 symbol modified
+ run_collaborator_accept function function run_collaborator_accept L93–131
Files Changed
+1 ~1
1185 in snapshot
← Older Oldest on feat/193-collaborator-accept-cli
All commits
Newer → Latest on feat/193-collaborator-accept-cli

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:f0e66c9b996b798fb99b1fe8cc7ef318784f5285940729f796e0f789fab79ea5 --body "your comment"