Skip to content

Harden and standardize BTMS packages - #352

Merged
ty-everett merged 3 commits into
mainfrom
codex/program-wave-10-btms-profiles
Jul 26, 2026
Merged

Harden and standardize BTMS packages#352
ty-everett merged 3 commits into
mainfrom
codex/program-wave-10-btms-profiles

Conversation

@ty-everett

@ty-everett ty-everett commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • modernize @bsv/btms as a Node 22 dual ESM/CommonJS package with strict artifact and clean-consumer validation
  • bring @bsv/btms-permission-module onto the public package profile with enforced coverage and exact transaction-signing digest authorization
  • add the missing private-library format/typecheck controls to @bsv/btms-backend and clean its docs and lint surface
  • remove 11 repository-health findings while preserving the canonical Open BSV License Version 6 policy

Security and quality

The permission module now fails closed on malformed transaction capture, binds each approved signable transaction to the SHA-256 digest of every exact BIP-143 input preimage, verifies the 32-byte digest actually emitted by SDK PushDrop, prevents token-access grants from authorizing unbound signatures, and makes unbound signature approval one-shot.

The quality pass decomposes BTMS topic admission into bounded stages, addresses every Sonar issue reported on the first head, and adds focused branch coverage for malformed inputs, detached BEEF sources, allowance enforcement, metadata parsing, bounded preimage parsing, PushDrop unlock configuration, history selection, storage binding, and randomized change conservation.

Verification

  • repository build, lint, and test suites passed
  • repository health: 83 findings, 11 active exceptions, 0 control errors
  • pnpm audit: no known vulnerabilities
  • 46 manifests and 30 public tarballs verified with canonical Open BSV License Version 6
  • docs frontmatter and links: 95 files passed
  • conformance validate-only: 74 files / 6,650 vectors passed
  • BTMS: 97 tests; ESM/CommonJS build and strict package consumer checks passed
  • permission module: 36 tests; 87.63% statements, 83.67% branches, 94.73% functions, 90.05% lines; ESM package consumer checks passed
  • backend: 51 tests; topic manager 92.85% lines; lint, typecheck, coverage, and build passed
  • local changed-line estimate: 95.93% before the exact-head Codecov recomputation

Tracks #324.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.37668% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/wallet/btms/src/BTMS.ts 54.28% 10 Missing and 6 partials ⚠️
...tms-backend/src/topic-managers/BTMSTopicManager.ts 98.61% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@ty-everett

Copy link
Copy Markdown
Collaborator Author

Approval in substance for exact head f3b034a: I reviewed the complete patch and its security-sensitive authorization changes. All exact-head required and advisory checks are green, CodeQL and Socket pass, Codecov patch passes at 92.37668%, Sonar reports 0 open/confirmed issues and 0 security hotspots, the Open BSV License Version 6 policy verifies all 46 manifests, package artifacts and consumers pass, and there are no unresolved review threads. GitHub does not permit a pull request author to submit a formal approval on their own PR, so this ty-everett maintainer comment records the equivalent approval for this exact commit before admin merge.

@ty-everett
ty-everett merged commit ee40cf7 into main Jul 26, 2026
31 checks passed
@ty-everett
ty-everett deleted the codex/program-wave-10-btms-profiles branch July 26, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant