gabriel / musehub public
test task/fix-presign-get-rewrite #3 / 3
AI Agent gabriel · 120 days ago · May 14, 2026 · Diff

test: RED tests for presign_get URL rewrite and ensure_hub_seed remote parse (issue #62 Phase 1)

T-A1 tests/test_storage_backends.py — presign_get must rewrite Docker-internal endpoint to public endpoint, matching presign_put and presign_batch. Fails RED: presign_get does not call _rewrite_presign_url.

T-B1 tests/test_bench_cli_seed.py (TestEnsureHubSeedRemoteParse) — ensure_hub_seed must not call 'muse remote add' when origin already exists in the dict-format output of muse remote --json. Fails RED: isinstance(dict, list) is False → remote_names always empty.

sha256:0b1a4bebdc192ccafc61c53c4f2036a483e0a86bbf4c10617b616d330d6ee8c2 sha
+20 symbols
sha256:ac0fd802dccf0027452bdd8e94f9165e5f70d7afb963debda6800493bc2dafed snapshot
+20
symbols added
0
dead code introduced
Semantic Changes 20 symbols
~ tests/test_storage_backends.py .py 15 symbols added
+ _INTERNAL variable variable _INTERNAL L25–25
+ _OID variable variable _OID L27–27
+ _PUBLIC variable variable _PUBLIC L26–26
+ _fake_presigned function function _fake_presigned L42–44
+ _make_backend function function _make_backend L30–39
+ BlobBackend import import BlobBackend L22–22
+ MagicMock import import MagicMock L18–18
+ annotations import import annotations L15–15
+ asyncio import import asyncio L17–17
+ patch import import patch L18–18
+ pytest import import pytest L20–20
+ test_presign_batch_get_already_rewrites function function test_presign_batch_get_already_rewrites L93–105
+ test_presign_get_no_rewrite_when_public_endpoint_unset function function test_presign_get_no_rewrite_when_public_endpoint_unset L108–131
+ test_presign_get_rewrites_internal_to_public_endpoint function function test_presign_get_rewrites_internal_to_public_endpoint L49–73
+ test_presign_put_already_rewrites function function test_presign_put_already_rewrites L78–90
~ tests/test_bench_cli_seed.py .py 5 symbols added
+ TestEnsureHubSeedRemoteParse class class TestEnsureHubSeedRemoteParse L233–399
+ _remote_json method method _remote_json L255–269
+ test_adds_remote_when_muse_remote_json_returns_empty method method test_adds_remote_when_muse_remote_json_returns_empty L366–399
+ test_skips_remote_add_when_origin_exists_in_dict_format method method test_skips_remote_add_when_origin_exists_in_dict_format L271–324
+ test_still_adds_remote_when_truly_absent method method test_still_adds_remote_when_truly_absent L326–364

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