Skip to content

Harden PayGate operations and recovery - #21

Merged
Phloraxx merged 1 commit into
mainfrom
hardening-v1
Aug 1, 2026
Merged

Harden PayGate operations and recovery#21
Phloraxx merged 1 commit into
mainfrom
hardening-v1

Conversation

@Phloraxx

@Phloraxx Phloraxx commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Hardens PayGate from a working SMS verifier into an operationally recoverable payment service while preserving fail-closed matching.

Payment correctness

  • classifies paid/late using the bank/provider occurrence timestamp, not delayed SMS arrival time
  • preserves exact payable amount, unique RRN and stale-evidence invariants for automatic and manual matching
  • exposes fingerprint-pool capacity and alerts at 70%/95%

Exception handling and audit

  • persistent review cases for parse errors, missing RRN, unmatched, ambiguous and contradictory evidence
  • audited operator resolution/manual matching
  • immutable evidence plus actor/entity/action audit events

Reconciliation and refunds

  • CSV/TSV/XLSX bank-statement imports with debit filtering, duplicate hashes/RRNs, conflict reports and XLSX archive limits
  • report-only reconciliation; no automatic status mutation
  • bounded/idempotent manual refund lifecycle with bank references and signed webhook events

Reliability and recovery

  • connector/capacity/webhook/reconciliation/backup alerts
  • optional signed durable operator-alert webhook with retries and dedupe
  • configurable evidence redaction/retention
  • scheduled local or S3-compatible backups
  • archive verification and temporary SQLite restore drills
  • idempotent managed rate-limit configuration across restarts

Operator UI and documentation

  • review, reconciliation, alert, refund and audit pages
  • dashboard capacity/review/alert/backup telemetry
  • backup create/verify/restore controls
  • complete operational runbook and updated acceptance plan

Verification completed

  • npm audit --audit-level=high (0 vulnerabilities)
  • frontend typecheck and production build
  • Go formatting, all tests, vet and diff checks
  • full go test -race -count=1 ./...
  • migration up -> down 1 -> up on a clean SQLite database
  • production Docker image build
  • fresh-volume HTTP/CLI acceptance covering payment, SMS, public redaction, duplicates, reviews, refunds, backups, restore drill and container recreation/persistence

@Phloraxx
Phloraxx merged commit 99d1470 into main Aug 1, 2026
1 check passed
@Phloraxx
Phloraxx deleted the hardening-v1 branch August 1, 2026 08:13
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