Skip to content

feat: add chaos/contract/load tests for issues #810 #811 #812 #805 - #832

Open
Ebuka042-pixel wants to merge 1 commit into
harystyleseze:mainfrom
Ebuka042-pixel:feat/chaos-contract-load-tests-810-811-812-805
Open

feat: add chaos/contract/load tests for issues #810 #811 #812 #805#832
Ebuka042-pixel wants to merge 1 commit into
harystyleseze:mainfrom
Ebuka042-pixel:feat/chaos-contract-load-tests-810-811-812-805

Conversation

@Ebuka042-pixel

Copy link
Copy Markdown

#810 – Chaos: x402 facilitator network partition mid-payment

  • shared/tests/x402-network-partition-chaos.test.ts
  • Partitions after verify-but-before-settle → 503, no phantom settlement
  • checkFacilitatorHealth flips healthy→false; protected routes 503+Retry-After
  • No order/tx recorded when settle cannot be confirmed
  • Partition healing: health check restores healthy state and routes resume
  • Facilitator errors not swallowed by global unhandledRejection handler

#811 – Chaos: audit-log disk pressure during rotation

  • shared/tests/audit-log-disk-pressure-chaos.test.ts
  • renameSync failure (ENOSPC) during rotation: hash chain stays valid
  • appendFileSync ENOSPC surfaces to stderr; records not silently dropped
  • Post-rotation-failure appends continue on existing file
  • Verify path detects gap/tamper introduced by interrupted rotation
  • Recovery: rotation succeeds once space returns; chain remains continuous

#812 – Contract test: x402 Facilitator getSupported payment-kinds

  • shared/tests/x402-get-supported-contract.test.ts
  • Pins OZ x402 Facilitator getSupported fixture (kinds/scheme/network shape)
  • Empty or missing kinds array triggers boot-time fail-closed path
  • Missing required fields (network, scheme) fail the contract
  • Configured NETWORK must match at least one supported kind
  • Provider-change detection: rename of 'kinds'/'scheme' caught in CI
  • Documents how to refresh the fixture (curl + jq one-liner in header)

#805 – k6 load test: POST /agent/dispute-letter PDF generation

  • load/dispute-letter.js
  • Ramps VUs posting realistic audit results to /agent/dispute-letter
  • Thresholds: p95 < 8000 ms, zero 5xx, zero empty/partial PDFs
  • Health-check probe per iteration detects memory pressure / leaks
  • Parameterized by BASE_URL, CAREGIVER_TOKEN, P95_LATENCY_MS
  • Documented for manual and CI runs; three audit result variants

.gitignore: add generated/temp/snapshot/profile exclusions

  • k6 results, vitest snapshots, test-data-*, PDFs, heap profiles

Closes #
closes #810
closes #811
closes #812
closes #805

What changed

How to test

Checklist

  • CI passes (typecheck, lint, tests)
  • No sensitive data files (data/spending.json, data/orders.json) committed
  • PR linked to an issue

…styleseze#811 harystyleseze#812 harystyleseze#805

harystyleseze#810 – Chaos: x402 facilitator network partition mid-payment
  - shared/__tests__/x402-network-partition-chaos.test.ts
  - Partitions after verify-but-before-settle → 503, no phantom settlement
  - checkFacilitatorHealth flips healthy→false; protected routes 503+Retry-After
  - No order/tx recorded when settle cannot be confirmed
  - Partition healing: health check restores healthy state and routes resume
  - Facilitator errors not swallowed by global unhandledRejection handler

harystyleseze#811 – Chaos: audit-log disk pressure during rotation
  - shared/__tests__/audit-log-disk-pressure-chaos.test.ts
  - renameSync failure (ENOSPC) during rotation: hash chain stays valid
  - appendFileSync ENOSPC surfaces to stderr; records not silently dropped
  - Post-rotation-failure appends continue on existing file
  - Verify path detects gap/tamper introduced by interrupted rotation
  - Recovery: rotation succeeds once space returns; chain remains continuous

harystyleseze#812 – Contract test: x402 Facilitator getSupported payment-kinds
  - shared/__tests__/x402-get-supported-contract.test.ts
  - Pins OZ x402 Facilitator getSupported fixture (kinds/scheme/network shape)
  - Empty or missing kinds array triggers boot-time fail-closed path
  - Missing required fields (network, scheme) fail the contract
  - Configured NETWORK must match at least one supported kind
  - Provider-change detection: rename of 'kinds'/'scheme' caught in CI
  - Documents how to refresh the fixture (curl + jq one-liner in header)

harystyleseze#805 – k6 load test: POST /agent/dispute-letter PDF generation
  - load/dispute-letter.js
  - Ramps VUs posting realistic audit results to /agent/dispute-letter
  - Thresholds: p95 < 8000 ms, zero 5xx, zero empty/partial PDFs
  - Health-check probe per iteration detects memory pressure / leaks
  - Parameterized by BASE_URL, CAREGIVER_TOKEN, P95_LATENCY_MS
  - Documented for manual and CI runs; three audit result variants

.gitignore: add generated/temp/snapshot/profile exclusions
  - k6 results, vitest snapshots, test-data-*, PDFs, heap profiles
@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Ebuka042-pixel 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

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@Ebuka042-pixel is attempting to deploy a commit to the Harrison Eze's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant