Skip to content

feat: CI/CD pipeline, WASM size checks, nutrition outcomes, claim reconciliation (#392-#395)#1

Closed
hartz0 wants to merge 1 commit into
mainfrom
feat/issues-392-393-394-395
Closed

feat: CI/CD pipeline, WASM size checks, nutrition outcomes, claim reconciliation (#392-#395)#1
hartz0 wants to merge 1 commit into
mainfrom
feat/issues-392-393-394-395

Conversation

@hartz0

@hartz0 hartz0 commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

Implements issues #392, #393, #394, and #395.

#394 — CI/CD pipeline

  • ci.yml: added cargo fmt --check, cargo clippy -- -D warnings, and binaryen install; tests now run with --workspace
  • deploy-testnet.yml: builds optimized WASM binaries, deploys each contract to Stellar testnet using STELLAR_SECRET_KEY secret, posts deployment summary to PR comments
  • security-audit.yml: weekly cargo audit on a cron schedule

#395 — WASM binary size profiling

  • Makefile with build, optimize (wasm-opt -O4), check-size (500 KB limit per binary), test, fmt, clippy, audit targets
  • CI runs make check-size after compilation; fails if any binary exceeds the limit

#393 — Nutrition care outcomes

  • New nutrition_care contract: create_plan, link_outcome (emits NutrOut event, links to active plan version), get_plan_outcomes (chronological), update_plan_version
  • Only the plan's provider can record outcomes; outcomes carry the plan version at time of recording

#392 — Financial claim reconciliation

  • New medical_claims contract: submit_claim, reconcile_claim (transactional paid/outstanding update, emits ClaimRcn event with claim amount, payment amount, outstanding balance), get_unreconciled_claims (insurer + configurable age threshold), dispute_claim
  • New financial_records contract: record_payment, get_payment
  • Status lifecycle: Pending → PartiallyPaid → FullyReconciled / Disputed

Testing

Each new contract includes inline unit tests covering the happy path, partial payments, chronological ordering, age-threshold filtering, and unauthorized-access panics.

#394 - CI/CD pipeline: add fmt/clippy to ci.yml, add deploy-testnet.yml
  (optimized WASM deploy with PR comment summary), add weekly security-audit.yml

#395 - Makefile: build/optimize/check-size/test/fmt/clippy/audit targets;
  ci.yml now runs wasm-opt -O4 and enforces 500 KB per-binary size limit

#393 - nutrition_care contract: create_plan, link_outcome (emits NutrOut
  event), get_plan_outcomes (chronological, version-linked), update_plan_version

#392 - medical_claims contract: submit_claim, reconcile_claim (transactional,
  emits ClaimRcn event with amounts + outstanding), get_unreconciled_claims
  (configurable age threshold), dispute_claim; financial_records contract:
  record_payment, get_payment
@hartz0 hartz0 closed this May 30, 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

Development

Successfully merging this pull request may close these issues.

1 participant