sdk: intent/listing/bid canonical consolidation + 0416-0421 follow-up batch#241
Merged
Conversation
Post-#240 CLI follow-up audit batch. Files interleave across tickets (builders.spec.ts spans 0416/0417/0421; build.ts spans 0416/0419), so this is one commit; per-ticket breakdown: #0416 — bb build intent/listing/bid now delegate to the canonical buildIntentApproval / buildOrderbook{Listing,Bid}Approval and emit MsgSet{Outgoing,Incoming}Approval, byte-identical to bb intents create / bb nfts list|bid. FIXES the listing.ts missing-fromListId parity bug (was an under-constrained outgoing approval). Deterministic stableHashId ids; single-token (range now errors clearly); bb intents create --valid-until → canonical --expiration (--valid-until/--expiry hidden deprecated aliases); bb build intent default 7d→30d. #0417 — bounty.ts votingChallenges proposalId: uniqueId → stableHashId (last 0405/0406 nondeterminism straggler) + determinism test. #0418 — new cli/utils/approval-id-options.ts (resolveApprovalId); swept nfts/auctions/prediction-markets/intents/subscriptions off the duplicated RNG; subscriptions enable-renewal/subscribe gained a pinnable --approval-id (previously unpinnable random). #0419 — bb build send routed through the shared emit(): --browser/ --burner/--simulate/--output-file were advertised but silently ignored; now honored. #0420 — bb custom-2fa mint: command shape unit spec + emit/guard coverage + a full broadcast integration spec (was zero coverage). #0421 — 6 weak .violations.filter(standard===X) → expectCleanVerification (unmasks cross-standard violations); +5 builder determinism tests; 4 vacuous invalid-input edge tests now assert real behavior; the expect([0,tx.code]).toContain(tx.code) tautology → toBe(0). Build clean (no circular deps); unit 139 suites / 3052 tests green; integration 20/20 suites green (incl. the new custom-2fa mint broadcast). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Post-#240 CLI follow-up audit batch (tickets #0416–#0421). One PR, one commit (files interleave across tickets — see the per-area changelog).
Bug fixes
bb build listingemitted an outgoing approval with nofromListId— an under-constrained approval the chain could reject or interpret permissively. Now correctly seller-scoped (FE-canonical). (#0416)bb build sendsilently ignored--browser/--burner/--simulate/--output-file— advertised in--helpbut the command hand-rolled its own output and never hit the deploy path. Now honored. (#0419)Behavioral changes
bb build intent/build listing/build bidnow emit canonicalMsgSet{Outgoing,Incoming}Approval(was a divergent slimMsgUpdateUserApprovals). The build verb and the end-user command (bb intents create/bb nfts list/bb nfts bid) now produce a byte-identical on-chain tx (delegation-parity tests assert this). (#0416)bb build listing/build bidreject a multi-token range with a clear error (orderbook approvals are single-token) instead of silently building a non-canonical range approval. (#0416)intent,listing,bountybuilders derive approval/proposal ids from params (stableHashId) instead of random — identical inputs → byte-identical, replayable txs (lastuniqueIdstragglers from the 0405/0406 line). (#0416, #0417)bb build intentdefault--expiration7d → 30d to matchbb intents create. (#0416)Deprecations
bb intents create --valid-until→ canonical--expiration.--valid-untiland--expirystill work as hidden aliases for one release, warn once on use. (#0416)New capability
bb subscriptions enable-renewal/subscribegained--approval-id— the recurring-approval id can now be pinned for replay (was always random/unpinnable). (#0418)Refactor + test hardening (summary)
resolveApprovalIdhelper; swept 5 commands off the duplicated RNG. (#0418)bb custom-2fa mintgained unit shape + emit/guard + full broadcast integration coverage (was zero coverage from sdk: custom-2fa mint helper (#0407) + pm-intent consolidation (#0415) + --expiration rename (#0414) #240). (#0420).violations.filter(standard===X)checks upgraded toexpectCleanVerification(unmasks cross-standard violations); +5 builder determinism tests; 4 vacuous invalid-input tests now assert real behavior; theexpect([0,tx.code]).toContain(tx.code)tautology replaced withtoBe(0). (#0421)Validation
bb custom-2fa minton-chain broadcast asserting a bounded 5-min ownership window).Downstream
build-commands.mdcorrected for the newbuild intentdefault (30d) and thebuild listing/build bidsingle-token constraint (old docs showed a"1-5"range example that now errors).🤖 Generated with Claude Code