Skip to content

fix: resolve issues #883 #884 #885 #886 — fuzz, mutation, disabled-tests checklist, JSDoc - #972

Merged
fejilaup-cloud merged 1 commit into
AtomicIP:mainfrom
OLAK6828:fix/issues-883-884-885-886
Sep 4, 2026
Merged

fix: resolve issues #883 #884 #885 #886 — fuzz, mutation, disabled-tests checklist, JSDoc#972
fejilaup-cloud merged 1 commit into
AtomicIP:mainfrom
OLAK6828:fix/issues-883-884-885-886

Conversation

@OLAK6828

@OLAK6828 OLAK6828 commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Resolves #883, #884, #885, #886.

#886 — Fuzz testing for validation layer

  • api-server/src/validation_fuzz_tests.rs — added 13 per-schema integration fuzz tests covering every public request schema in schemas.rs.
  • .github/workflows/nightly-fuzz.yml — new scheduled workflow (daily at 02:00 UTC) that runs the fuzz unit tests and cargo-fuzz libFuzzer targets with a 5-minute time-box each; logs uploaded as artifacts.

#885 — Mutation test coverage for IP Registry

Extended contracts/ip_registry/src/mutation_tests.rs with targeted mutation-killing tests for:

  • Co-ownership: add_co_owner (percentage transferred, zero/overflow guard), remove_co_owner (entry removed, unknown co-owner panics)
  • Versioning: create_ip_version (parent link set, zero-hash/duplicate rejected, sequential ID, get_ip_versions list updated)
  • Notarization: guard paths for missing key and wrong-length signature; get_ip_notary_signature returns None before notarization
  • Ownership challenges: issue_ownership_challenge (stored, ID ≥ 1), respond_to_ownership_challenge (response hash stored), verify_ownership_challenge (wrong response → false), expire_challenge (panics before TTL, removes from storage after TTL)

#884 — Tracked checklist for disabled test modules

  • scripts/check-disabled-tests.sh — widened scope from contracts/ip_registry to all contracts/ so atomic_swap is now included.
  • .github/workflows/ci.yml — replaced the simple grep with a count-gate step that allowlists benchmarks.rs and invariant_tests.rs, enforces a baseline of 0 new FIXME merge-conflict comments elsewhere, and fails the build if the count rises.

#883 — JSDoc annotations across src/ JS modules

Added @param/@returns/@typedef JSDoc to all previously-unannotated exported functions in src/batch, src/insurance, src/matching, src/reputation, src/royalty. Added JSDoc vs TypeScript migration decision to README.md.

Checklist

AtomicIP#886 — Fuzz testing for validation layer
- Extend validation_fuzz_tests.rs with per-schema integration fuzz tests
  for all 13 public request schemas (CommitIp, TransferIp, VerifyCommitment,
  InitiateSwap, BatchInitiateSwap, AcceptSwap, RevealKey, CancelSwap,
  CancelExpiredSwap, RegisterWebhook, BulkCommitIp, BulkInitiateSwap,
  PaginationParams, CursorPaginationParams)
- Add .github/workflows/nightly-fuzz.yml: scheduled at 02:00 UTC daily,
  runs the fuzz unit tests + cargo-fuzz targets with a 5 min time-box each

AtomicIP#885 — Mutation test coverage for IP Registry
- Extend contracts/ip_registry/src/mutation_tests.rs with targeted tests
  for co-ownership (add_co_owner / remove_co_owner),
  versioning (create_ip_version, sequential IDs, get_ip_versions),
  notarization guard paths (no key configured, wrong sig length,
  notary sig absent before notarization),
  and ownership challenges (issue / respond / verify / expire)

AtomicIP#884 — Tracked checklist for disabled test modules
- Extend scripts/check-disabled-tests.sh from ip_registry-only scope
  to cover all contracts/ (atomic_swap now included)
- Replace the stale-FIXME grep in ci.yml with a count-gate step that:
  - allowlists benchmarks.rs and invariant_tests.rs (legitimate debt)
  - fails if any other file introduces a new FIXME merge-conflict comment
  - documents the baseline so it decreases as modules are re-enabled

AtomicIP#883 — JSDoc annotations across src/ JS modules
- Add @PARAM / @returns JSDoc to all exported functions that were missing
  annotations in: src/batch (batchMatcher, batchRoyaltyDistributor),
  src/insurance (assessRiskFactor in swapInsurance),
  src/matching (haversineKm, scoreMatch, findMatchesForBuyer, batchMatch
    in swapMatchingEngine),
  src/reputation (recencyWeight, scoreTier, batchCalculateReputation,
    getPersistedReputationScore in swapReputationScorer),
  src/royalty (validateRoyaltyConfig, getPendingRoyalties in
    swapRoyaltyTracker)
- Document JSDoc vs full TypeScript migration decision in README.md
@drips-wave

drips-wave Bot commented Sep 4, 2026

Copy link
Copy Markdown

@OLAK6828 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@fejilaup-cloud
fejilaup-cloud merged commit 4ffd388 into AtomicIP:main Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants