Skip to content

Fix/test enforcement transfer#258

Merged
Junman140 merged 15 commits intoPi-Defi-world:devfrom
michaelvic123:fix/test-enforcement-transfer
Apr 29, 2026
Merged

Fix/test enforcement transfer#258
Junman140 merged 15 commits intoPi-Defi-world:devfrom
michaelvic123:fix/test-enforcement-transfer

Conversation

@michaelvic123
Copy link
Copy Markdown
Contributor

closes #152

Osuochasam and others added 14 commits April 24, 2026 04:46
…ary (B-052)

Add logFinancialEvent instrumentation to the three previously uninstrumented
money-movement paths:

- mintFromUsdcInternal: emits mint.initiated / mint.completed / mint.failed
  with amount in cents (USDC), correlationId, and providerRef (blockchain hash)
- burnAcbu: emits burn.initiated / burn.processing / burn.failed with amount
  in stroops (ACBU), correlationId sourced from x-request-id header
- salaryService: emits salary.batch.initiated on creation and
  salary.batch.completed on finish, idempotencyKey propagated from batch

All events carry the full FinancialLogPayload schema: transactionId, userId,
accountId, amount, currency, idempotencyKey, correlationId, status,
timestamp, environment. Closes Pi-Defi-world#167.
…aryItem/SalarySchedule/UserDevice models, add organizationId to Transaction
…age guardrails

B-056: Add startup assertions in database.ts that detect when DATABASE_URL is
mistakenly set to a Prisma Accelerate URL (prisma://), and emit clear boot logs
indicating which connection type is active at runtime vs migration. Document the
DATABASE_URL vs PRISMA_ACCELERATE_URL matrix in README.md.

B-058: Introduce AES-256-GCM field-level encryption utility (src/utils/piiEncryption.ts)
with encrypt/decrypt helpers for string and JSON PII fields, plus a deterministic
HMAC search-token function for fields that need indexed lookups (phone, email).
Add PII_ENCRYPTION_KEY env var (64-char hex, 256-bit) to config and .env.example.

B-063: Add OpenAI usage guardrails service (src/services/ai/openaiGuard.ts) that
enforces auth context (orgId required), per-org monthly spend budget backed by
MongoDB, and a prompt injection allowlist before every OpenAI API call. Spend is
tracked per-org per-month so budget caps survive restarts. Add OPENAI_API_KEY,
OPENAI_ORG_MONTHLY_BUDGET_USD, and OPENAI_MAX_TOKENS_PER_REQUEST to env config.

Closes Pi-Defi-world#171
Closes Pi-Defi-world#173
Closes Pi-Defi-world#178
…bu116

Mint basket deposit limits use wrong USD proxy
…multi-provider-per-country

feat(fintech): multi-provider routing per country with health/failove…
feat(observability): structured financial logging for mint, burn, sal…(B-052)
…liance-and-config-guardrails

fix: Prisma URL guardrails, PII field encryption, and OpenAI usage guardrails
jest --passWithNoTests let CI pass silently with zero tests.
Switching to jest --coverage means:
- CI fails if no tests exist
- coverageThreshold for src/services/transfer/ is enforced on every run
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@michaelvic123 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 19 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9dc0c72-bac1-429e-ac26-6946e14a72ed

📥 Commits

Reviewing files that changed from the base of the PR and between b460d76 and 669257a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • src/controllers/mintController.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Junman140 Junman140 merged commit 6bcd528 into Pi-Defi-world:dev Apr 29, 2026
1 check passed
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.

B-037 — Jest passWithNoTests weak gate

6 participants