Labelton.sol landed in #48 without a same-PR test suite. Every other contract in this repo (MUSD / MuzixCatalog / MuzixAIProvenance / MuzixStreamingOracle #36 / MuzixRightsOffering #37) shipped with tests in the same PR. This issue closes that gap.
Scope
test/Labelton.t.sol covering:
registerMaster happy path (single + multi-holder cap-table) — verifies storage of all Master fields, _capTables length + content, masterByIsrcRoot / masterByUpc / masterByIswc reverse lookups, dataHash matches keccak256(abi.encode(p, capTable)), root variant minted with ERC-1155 balances == shareBps per holder.
registerMaster every revert: LabeltonPaused, CapTableSizeOutOfRange (0 + 65), IsrcRootEmpty, IsrcRootAlreadyRegistered, UpcAlreadyRegistered, IswcAlreadyRegistered, CapTableHolderInvalid, CapTableShareInvalid, CapTableSharesDoNotSum (over + under).
mintVariant happy path — variant kind toggle on, cap-table-member call, ERC-1155 balances fanned correctly, variantByIsrc reverse lookup, event emitted.
mintVariant every revert: LabeltonPaused, MasterDoesNotExist, VariantKindNotAllowed, NotMasterMember, VariantIsrcAlreadyRegistered.
- DAO config endpoints:
setVariantKindAllowed, setMirVerifier, setLegalIdVerifier, setFinancialIdVerifier, setPaused — owner-only access, event emission, state change observed.
- Invariants (fuzz where applicable): sum of
balanceOf(holder, variantId) across cap-table holders == VARIANT_SUPPLY_BPS (10000); masterOf(variantId) round-trips.
capTableOf / capTableOfVariant reads — including the minor nit that capTableOfVariant currently reverts with MasterDoesNotExist when the variant doesn't exist (fix or rename in this PR).
Target: forge suite stays green; new tests pass; no regressions in the 15 existing tests.
Labelton.sol landed in #48 without a same-PR test suite. Every other contract in this repo (MUSD / MuzixCatalog / MuzixAIProvenance / MuzixStreamingOracle #36 / MuzixRightsOffering #37) shipped with tests in the same PR. This issue closes that gap.
Scope
test/Labelton.t.solcovering:registerMasterhappy path (single + multi-holder cap-table) — verifies storage of all Master fields,_capTableslength + content,masterByIsrcRoot/masterByUpc/masterByIswcreverse lookups,dataHashmatcheskeccak256(abi.encode(p, capTable)), root variant minted with ERC-1155 balances == shareBps per holder.registerMasterevery revert:LabeltonPaused,CapTableSizeOutOfRange(0 + 65),IsrcRootEmpty,IsrcRootAlreadyRegistered,UpcAlreadyRegistered,IswcAlreadyRegistered,CapTableHolderInvalid,CapTableShareInvalid,CapTableSharesDoNotSum(over + under).mintVarianthappy path — variant kind toggle on, cap-table-member call, ERC-1155 balances fanned correctly,variantByIsrcreverse lookup, event emitted.mintVariantevery revert:LabeltonPaused,MasterDoesNotExist,VariantKindNotAllowed,NotMasterMember,VariantIsrcAlreadyRegistered.setVariantKindAllowed,setMirVerifier,setLegalIdVerifier,setFinancialIdVerifier,setPaused— owner-only access, event emission, state change observed.balanceOf(holder, variantId)across cap-table holders ==VARIANT_SUPPLY_BPS(10000);masterOf(variantId)round-trips.capTableOf/capTableOfVariantreads — including the minor nit thatcapTableOfVariantcurrently reverts withMasterDoesNotExistwhen the variant doesn't exist (fix or rename in this PR).Target: forge suite stays green; new tests pass; no regressions in the 15 existing tests.