gabriel / musehub public
feat patch dev
AI Agent gabriel · 157 days ago · Apr 21, 2026 · Diff

feat: algo-agnostic canonical ID validators + Tier 3b Pydantic boundary tests

- Change _GENESIS_ID_RE and _OBJECT_ID_RE from sha256-only to ^[a-z][a-z0-9]*:[0-9a-f]{32,}$ so future hash upgrades (blake3, sha3-256, …) require no validator change - Add missing @field_validator to ProposalReviewResponse, ReleaseAssetResponse, WireTagInput, CreateRepoRequest.template_repo_id, IssueCommentCreate.parent_id, ProposalCommentCreate.parent_comment_id, WireFetchRequest, WireNegotiateRequest - Add Tier 3b test class (TestPydanticBoundaryWireModels, TestPydanticBoundaryResponseModels, TestPydanticBoundaryOptionalFields) verifying canonical-ID enforcement at the Pydantic validation boundary - Fix missing datetime import in test file - 72 passed, 4 skipped (Tier 4 skipped pending muse.core.genesis CLI module)

sha256:5956c96de2415b19a6bf7d4b4b1c3950b1d9dea47a2f33b561bb3befbbc354f8 sha
+62 ~13 −2 symbols
sha256:11c8d315a42e37b448f1b091ce8e11ac2aaf5396282e1523e3e17fc655813a7d snapshot
+62
symbols added
~13
symbols modified
−2
symbols removed
0
dead code introduced
Semantic Changes 77 symbols
~ musehub/models/musehub.py .py 6 symbols added, 7 symbols modified
+ _check_template_repo_id method method _check_template_repo_id L199–202
+ _check_parent_id method method _check_parent_id L755–758
+ _check_parent_comment_id method method _check_parent_comment_id L1043–1046
+ _check_genesis_ids method method _check_genesis_ids L1148–1149
+ _check_genesis_ids method method _check_genesis_ids L1382–1383
+ _check_genesis_ids method method _check_genesis_ids L2776–2777
~ musehub/models/wire.py .py 2 symbols added, 4 symbols modified
+ _check_commit_ids method method _check_commit_ids L256–257
+ _check_commit_ids method method _check_commit_ids L294–295
~ tests/test_genesis_ids.py .py 54 symbols added, 2 symbols removed, 2 symbols modified
− cli_compute_release_id import import cli_compute_release_id L57–57
− cli_compute_tag_id import import cli_compute_tag_id L57–57
+ TestPydanticBoundaryOptionalFields class class TestPydanticBoundaryOptionalFields L400–450
+ test_create_repo_template_bad method method test_create_repo_template_bad L415–417
+ test_create_repo_template_future_algo method method test_create_repo_template_future_algo L411–413
+ test_create_repo_template_none method method test_create_repo_template_none L403–405
+ test_create_repo_template_valid method method test_create_repo_template_valid L407–409
+ test_issue_comment_parent_bad method method test_issue_comment_parent_bad L430–432
+ test_issue_comment_parent_future_algo method method test_issue_comment_parent_future_algo L426–428
+ test_issue_comment_parent_none method method test_issue_comment_parent_none L419–420
+ test_issue_comment_parent_valid method method test_issue_comment_parent_valid L422–424
+ test_proposal_comment_parent_bad_uuid method method test_proposal_comment_parent_bad_uuid L445–450
+ test_proposal_comment_parent_future_algo method method test_proposal_comment_parent_future_algo L441–443
+ test_proposal_comment_parent_none method method test_proposal_comment_parent_none L434–435
+ test_proposal_comment_parent_valid method method test_proposal_comment_parent_valid L437–439
+ TestPydanticBoundaryResponseModels class class TestPydanticBoundaryResponseModels L342–397
+ test_proposal_review_accepts_future_algo method method test_proposal_review_accepts_future_algo L359–364
+ test_proposal_review_rejects_bad_id method method test_proposal_review_rejects_bad_id L345–350
+ test_proposal_review_rejects_bad_proposal_id method method test_proposal_review_rejects_bad_proposal_id L352–357
+ test_release_asset_accepts_future_algo method method test_release_asset_accepts_future_algo L380–385
+ test_release_asset_rejects_bad_asset_id method method test_release_asset_rejects_bad_asset_id L366–371
+ test_release_asset_rejects_bad_release_id method method test_release_asset_rejects_bad_release_id L373–378
+ test_wire_tag_accepts_future_algo method method test_wire_tag_accepts_future_algo L395–397
+ test_wire_tag_rejects_bad_commit_id method method test_wire_tag_rejects_bad_commit_id L391–393
+ test_wire_tag_rejects_bad_tag_id method method test_wire_tag_rejects_bad_tag_id L387–389
+ TestPydanticBoundaryWireModels class class TestPydanticBoundaryWireModels L289–339
+ test_fetch_request_accepts_valid_and_future_ids method method test_fetch_request_accepts_valid_and_future_ids L325–327
+ test_fetch_request_rejects_bad_have method method test_fetch_request_rejects_bad_have L321–323
+ test_fetch_request_rejects_bad_want method method test_fetch_request_rejects_bad_want L317–319
+ test_negotiate_request_accepts_future_algo method method test_negotiate_request_accepts_future_algo L337–339
+ test_negotiate_request_rejects_bad_have method method test_negotiate_request_rejects_bad_have L329–331
+ test_negotiate_request_rejects_bad_want method method test_negotiate_request_rejects_bad_want L333–335
+ test_wire_commit_accepts_future_algo method method test_wire_commit_accepts_future_algo L297–299
+ test_wire_commit_rejects_bad_commit_id method method test_wire_commit_rejects_bad_commit_id L292–295
+ test_wire_object_accepts_future_algo method method test_wire_object_accepts_future_algo L313–315
+ test_wire_object_rejects_bad_object_id method method test_wire_object_rejects_bad_object_id L309–311
+ test_wire_snapshot_accepts_future_algo method method test_wire_snapshot_accepts_future_algo L305–307
+ test_wire_snapshot_rejects_bad_id method method test_wire_snapshot_rejects_bad_id L301–303
+ _BAD_IDS variable variable _BAD_IDS L278–285
+ _DT variable variable _DT L286–286
+ _FUTURE_ID variable variable _FUTURE_ID L277–277
+ _VALID_ID variable variable _VALID_ID L276–276
+ CreateRepoRequest import import CreateRepoRequest L260–260
+ IssueCommentCreate import import IssueCommentCreate L260–260
+ ProposalCommentCreate import import ProposalCommentCreate L260–260
+ ProposalReviewResponse import import ProposalReviewResponse L260–260
+ ReleaseAssetResponse import import ReleaseAssetResponse L260–260
+ ValidationError import import ValidationError L258–258
+ WireCommit import import WireCommit L268–268
+ WireFetchRequest import import WireFetchRequest L268–268
+ WireNegotiateRequest import import WireNegotiateRequest L268–268
+ WireObject import import WireObject L268–268
+ WireSnapshot import import WireSnapshot L268–268
+ WireTagInput import import WireTagInput L260–260
+ datetime import import datetime L256–256
+ timezone import import timezone L256–256
← Older Oldest on dev
All commits
Newer → Latest on dev

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