Skip to content

chore: enforce helper formatting and coverage gates - #356

Merged
ty-everett merged 4 commits into
mainfrom
codex/program-wave-11-helper-coverage
Jul 26, 2026
Merged

chore: enforce helper formatting and coverage gates#356
ty-everett merged 4 commits into
mainfrom
codex/program-wave-11-helper-coverage

Conversation

@ty-everett

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

Copy link
Copy Markdown
Collaborator

Summary

Advances tracker #324 Wave 10 by completing zero-drift formatting adoption for the four legacy helper source trees, restoring dormant coverage, and remediating every Sonar and Codecov finding introduced by the wave.

  • add non-mutating, pinned-Prettier format:check contracts to @bsv/did, @bsv/did-client, @bsv/simple, and @bsv/templates
  • mechanically normalize all governed source, test, and configuration files; Prettier --debug-check confirms AST stability
  • correct @bsv/templates root test ownership from the nonexistent __tests__ path to the actual __tests directory for lint and typecheck
  • rename the ignored P2MSKH.ts suite to P2MSKH.test.ts, then replace stale chain/mock assumptions with deterministic transaction + Spend validation
  • exercise P2MSKH across 1-of-2 through 10-of-10, all output-signing scopes, ANYONECANPAY, address round-trips, guardrails, direct/missing signing context, and estimation fallback
  • add focused DID/SD-JWT, DID client, WalletCore send/funding, wallet DID state, registry/MessageBox, inscription, BSV-21/DSTAS/STAS, Mandala, MultiPushDrop, and encoding regression coverage
  • replace four newly exposed new Array(n) lint findings with explicit Array.from construction
  • modernize QR escaping and Base64URL normalization with replaceAll, tighten the QR factory option type, and use flatMap for multisig key concatenation
  • consolidate duplicated file/image hash inscription behavior behind a typed shared implementation
  • resolve all ten Sonar findings and reduce new-code duplication from 4.0% to 2.6% without exclusions or suppressions
  • ratchet repository-health findings from 70 to 66 with zero control errors
  • preserve Open BSV License Version 6 in every package and exact package tarball

Measured outcome

The four helper suites now total 251 passing tests:

  • @bsv/did: 12 tests; 90.15% lines / 73.04% branches
  • @bsv/did-client: 8 tests; 60.00% lines / 53.53% branches
  • @bsv/simple: 130 tests; 65.83% lines / 57.00% branches (from 38.63% / 27.62%)
  • @bsv/templates: 101 tests; 92.99% source lines / 78.55% source branches (from 72.67% / 59.75%)
  • P2MSKH.ts: 95% lines / 89.47% branches / 100% functions

The local LCOV-to-diff audit reports 95.96% full coverage of changed executable lines, above the existing 90% patch requirement.

Validation

  • four format:check scripts: pass
  • Prettier --debug-check over every formatted TypeScript file: pass
  • four strict typechecks and zero-warning Oxlint runs: pass
  • four coverage suites: 251 tests pass
  • four builds and ESM/CJS packed-consumer checks: pass
  • DID Client and Simple exact-tarball Vite/esbuild/UMD browser budgets: pass
  • Sonar: quality gate OK; 0 open/confirmed issues; 0 hotspots; 2.6% new-code duplication
  • repository-health control suite: 30/30 pass; 66 findings, 0 errors
  • cross-package versions and SDK peer contract: pass
  • pnpm audit --audit-level=low: no known vulnerabilities
  • all 46 manifests: canonical Open BSV License Version 6
  • all 30 public dry-pack tarballs: canonical LICENSE.txt

No package version was bumped and no artifact was published; versions remain accumulated for the final release-readiness report required by #324.

@ty-everett ty-everett changed the title chore: enforce helper formatting and restore P2MSKH coverage chore: enforce helper formatting and coverage gates Jul 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@ty-everett ty-everett left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer approval-in-substance for exact reviewed head 1e249656750c5c2e7af2f93730b31b80502d3e54 (PR patch commit 2ffee84d5c39acdedb22e52054dea8120e41775a, followed only by a clean sync of merged main).

Verified before merge:

  • all 30 exact-head check runs succeeded, including CI merge gate, Node 24, CodeQL, dependency review, Socket, browser/mobile, repository health, docs, conformance, and aggregate coverage upload;
  • Codecov measured the actual PR patch at 92.46% and passed its patch gate before the main sync;
  • SonarCloud reports quality gate OK, 0 open/confirmed issues, and 0 security hotspots on the current PR;
  • 0 unresolved or outdated review threads and no actionable maintainer comments;
  • Open BSV License v6 consistency remains enforced by repository health;
  • no package version or publication action is included.

GitHub prevents an author from self-approving, so this COMMENT review records the requested ty-everett maintainer approval-in-substance for the exact head; the merge will use the authorized admin path.

@ty-everett
ty-everett merged commit 96007cb into main Jul 26, 2026
31 checks passed
@ty-everett
ty-everett deleted the codex/program-wave-11-helper-coverage branch July 26, 2026 09:14
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