gabriel / musehub public
refactor BREAKING task/coord-server-cleanup #1 / 1
AI Agent gabriel · 131 days ago · May 4, 2026 · Diff

refactor: remove fake_id from production path in coord_server

- Replace fake_id(record_id) fallbacks with record_id directly — the record ID is already a valid sha256: content-addressed string; no re-hashing needed - Fix agent_id fallback: was incorrectly using record_id as an agent identifier; now correctly falls back to empty string when run_id is absent from payload - Drop fake_id import from musehub_coord_server (it is test-only by definition) - Update test_musehub_coord.py: rename all record_uuid field references to record_id, update validation tests to match the new _SAFE_RECORD_ID_RE pattern (accepts alphanum/hyphens/underscores/colons up to 128 chars)

sha256:c7ebc9c66df79cd822ea2a38a4f085480a0409373a387e346aaa9297c756efd8 sha
+7 ~33 −8 symbols
sha256:8fff499719c5fb7ee027dce2906c88fad79593e145363aacdff17fbb1a5da415 snapshot
+7
symbols added
~33
symbols modified
−8
symbols removed
0
dead code introduced
Semantic Changes 48 symbols
~ musehub/services/musehub_coord_server.py .py 1 symbol removed, 3 symbols modified
fake_id import import fake_id L26–26
~ tests/test_musehub_coord.py .py 7 symbols added, 7 symbols removed, 30 symbols modified
test_non_uuid4_rejected method method test_non_uuid4_rejected L140–142
test_null_byte_in_uuid_rejected method method test_null_byte_in_uuid_rejected L148–150
test_path_traversal_in_uuid_rejected method method test_path_traversal_in_uuid_rejected L144–146
test_uuid4_normalized_to_lowercase method method test_uuid4_normalized_to_lowercase L169–172
test_null_byte_in_uuid_rejected method async_method test_null_byte_in_uuid_rejected L745–757
test_path_traversal_in_uuid_rejected method async_method test_path_traversal_in_uuid_rejected L731–743
test_push_bad_uuid_returns_422 method async_method test_push_bad_uuid_returns_422 L415–428
+ test_invalid_record_id_rejected method method test_invalid_record_id_rejected L140–142
+ test_null_byte_in_record_id_rejected method method test_null_byte_in_record_id_rejected L148–150
+ test_path_traversal_in_record_id_rejected method method test_path_traversal_in_record_id_rejected L144–146
+ test_uppercase_record_id_accepted method method test_uppercase_record_id_accepted L169–172
+ test_null_byte_in_record_id_rejected method async_method test_null_byte_in_record_id_rejected L745–757
+ test_path_traversal_in_record_id_rejected method async_method test_path_traversal_in_record_id_rejected L731–743
+ test_push_bad_record_id_returns_422 method async_method test_push_bad_record_id_returns_422 L415–428
← Older Oldest on task/coord-server-cleanup
All commits
Newer → Latest on task/coord-server-cleanup

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