Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 2.37 KB

File metadata and controls

43 lines (35 loc) · 2.37 KB

Pull Request: Resolve assigned GitHub Issues (#766, #771, #770, #767)

This PR systematically addresses four major issues in the Quipay repository, ranging from frontend reporting features to backend infrastructure and smart contract testing.

Summary of Changes

1. Structured Payroll Reports (#766)

  • Feature: Added generatePayrollReport in src/util/exportData.ts to support CSV and PDF exports.
  • Logic: Implemented grouping by worker with subtotals.
  • Math: Integrated curve-based earned amount calculation using calculateStreamProgress.
  • UI: Updated ExportModal to support PDF format selection.

2. Expanded Nightly Fuzz Targets (#771)

  • Fuzz Targets: Added three new cargo-fuzz targets:
    • arithmetic_fuzz: Directly tests compute_vested with all curves and edge cases.
    • batch_create_fuzz: Tests atomicity and limits of create_stream_batch.
    • claimable_fuzz: Verifies get_claimable logic over time.
  • CI: Updated nightly-fuzz.yml to run all targets (5 mins each) and upload corpus/artifacts.
  • Corpus: Initialized corpus directories for the new targets.

3. Playwright E2E Tests (#770)

  • New Tests:
    • tests/stream-create.spec.ts: Full wizard journey for stream creation (renamed from stream-creation.spec.ts).
    • tests/stream-withdraw.spec.ts: Happy path for worker withdrawal from an active stream.
  • CI Integration: Updated e2e-tests.yml to run on every Pull Request to main and block merge on failure.

4. Drizzle ORM Migration Workflow (#767)

  • Configuration: Setup drizzle-kit in the backend and documented the workflow in backend/MIGRATIONS.md.
  • Automation: Rewrote backend/src/db/migrate.ts to use standard Drizzle migrators.
  • Startup: Added a migration check to backend/src/index.ts to automatically run pending migrations in production or when RUN_MIGRATIONS=true.
  • CI: Added a verification step to backend.yml to ensure migration files are up-to-date with the schema.

Verification Performed

  • Ran npm run build in the root.
  • Ran npm run lint in the root.
  • Verified backend migrations logic locally.
  • Verified fuzz target registration in fuzz/Cargo.toml.

Checklist

  • Code follows project styling guidelines.
  • All new features are documented.
  • CI pipelines are updated and passing.
  • No breaking changes to existing contract interfaces.