Repository navigation
feat(integrations): WooCommerce gateway with integer-paise amounts and signed webhooks - #137
manish-9245 wants to merge 54 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
@coderabbitai full review |
Rate Limit Exceeded
|
|
@coderabbitai full review |
Rate Limit Exceeded
|
* feat(server): single-binary skeleton with three listeners Public, ingest and admin listeners with graceful shutdown, JSON config with env overrides, loopback-only admin, /healthz, subcommand stubs and a static cross-platform build matrix. * fix: reject serve args, surface listener failures, shut down listeners concurrently
…ges and docs (#125) * chore(review): CodeRabbit rules for money path, security, customer pages and docs * fix: supported locale, no auto-pause, any base branch, parser fixtures stay in review
* feat(server): embedded SQLite with migrations WAL, STRICT tables, foreign keys, single BEGIN IMMEDIATE writer with a separate read pool, embedded numbered migrations and kaasu migrate. * fix: read-only reader pool, rollback on panic, isolate reservation test * fix(deps): build with Go 1.27.3 to clear standard library vulnerabilities
* ci: lint, test with race and coverage gate, fuzz, and cross-build jobs * fix: fuzz script stops if package discovery fails (coverage YAML comment is stale: go.yml has no such line)
* test: clock, id and test helpers with golden files and migrated store * fix: valid YAML for coverage step, drop package-level base32 encoder
* feat(security): envelope-encrypted secrets, API keys and master key rotation * fix: check rows.Err in RotateAll
* feat(server): receiving accounts * fix: microsecond timestamps keep account list order * test: expect microsecond timestamp
* feat(security): hash-chained append-only ledger and kaasu verify * fix: reject separator byte in ledger fields; document truncation limit * test: cover separator guard and Describe so the ledger clears the 85% gate
* feat(api): orders API with idempotency, UPI links and API-key auth * fix: surface openApp errors, bound limit and expiry inputs, log 500s, context-aware test calls
* feat(pool): unique amount pool with queue fallback * fix: check rows.Err in pool, skip full ranges when promoting, no link for queued orders, promote older queued orders first
* feat(states): order state machine with ledgered transitions * fix: set queued_at when an order enters the queue; FIFO promotion test
) * fix(server): keep cancelled amounts held through grace and hide queued links * test(states): cover the refund path that frees a slot deterministically * fix: payable link only while awaiting, queued orders keep waiting past original expiry, docs wording (scheduler wiring lands in #104) * test: FIFO promotion test frees the slot directly (rejected orders keep theirs through grace) * test: orders cover queue fairness and unknown-order errors (coverage gate)
* feat(alerts): evidence store and cross-source dedupe * fix: fingerprint ignores UTR so a UTR-less alert and a later UTR alert are one payment
* feat(alerts): bank alert parsers with golden fixtures and fuzzing * fix: UTR must end at a word boundary (13-digit refs rejected)
* feat(alerts): device pairing and signed ingest * fix: keep signed non-JSON bodies as evidence, any parser failure is unparsed, pairing host setting, wrap device errors
* feat(alerts): matcher, scorer and policy * chore(match): remove unused test helpers * fix: match inside the ingest transaction, closed orders only inside their grace window, lint nits in tests
* feat(alerts): IMAP email observer with DKIM verification * chore(email): remove placeholder * fix: re-run matching for duplicate evidence, decode base64/QP and nested MIME, mark handled mail seen, cap IMAP batch/size, honour ctx
* feat(server): persistent background scheduler with built-in expiry and sweep jobs * fix: scheduler registration errors, rows.Err checks, jobs purge, ExpireDue tolerates raced orders, stop scheduler before closing store * test: orders error paths (coverage gate)
* feat(webhooks): signed webhooks through a transactional outbox * fix: seven-wait backoff without package global, check rows.Err on outbox read
* feat(refunds): refund log with paid-amount limits * chore(refunds): simplify a query string * fix: list refunds in insertion order; document partial refunds keep state
* feat(recon): statement import and reconciliation buckets * fix: statements belong to an account, UTR matches before amount fallback, short CSV rows rejected, rows.Err checks, docs * test: fuzz account insert is idempotent
* feat(admin): TOTP sign-in, sessions, lockout, fresh re-auth and owner-only writes * fix: admin init arg validation, row-before-secret, reauth lockout, lock check inside the login tx, escape otpauth label
* feat(http): security headers, limits, panic recovery and rate limiting on every listener * fix: apply per-address rate limits on every listener, with 429 + Retry-After test * fix: rate limits sized for the 50 orders/s load shape
* feat(ops): redacted JSON logs, request ids and Prometheus metrics on admin * fix: redact request id and error attributes, request id on every listener, context-aware panic log
* feat(admin): merchant dashboard with sign-in, today's totals, source health and masked orders * fix: dashboard reports query errors, no-store, one payer per recent order
* feat(review): review queue with owner-only, fresh-auth decisions * fix: review decisions need a held match, known errors only to the browser, redirect to /admin/, docs for the owner exception
* feat(paisu): mood rules for merchant screens, happy only after a confirmation * fix: paisu mood labels in every catalogue, test rejects raw keys
* test(a11y): template and stylesheet checks; pay page heading and focus ring * fix: a11y tests check every svg tag and the .btn focus ring rule
…nd healthcheck (#126) * feat(install): installer, hardened systemd unit, Docker image, doctor and healthcheck * fix(deps): build with Go 1.27.3 to clear standard library vulnerabilities * fix: install and container hardening, read-only doctor migrations, secrets excluded from build context
* feat(infra): Railway template configuration and deploy guide * docs: Railway health-check port, tailnet admin access, template settings
* docs(legal): privacy and trademark drafts, bank terms guidance, all marked as drafts * docs: AI integration is planned not shipped; stricter draft-banner test
…129) * ci: conventional PR titles, area labels and contributor conventions * fix: PR title passed as data, whitespace-only subject rejected, labeler syncs labels
…ng (#130) * test(security): attack suite over real HTTP; fix date-only alert timing * fix: forged-sender attack reuses one body, k6 sizing and thresholds
… and ledger (#131) * feat(ai): optional provider layer with masking, schema checks, budget and ledger * fix: case-insensitive masking, IST-month usage bounds, unique usage ids, reject trailing JSON
* feat(ai): structured extraction for unknown alert formats; AI reads never auto-confirm * fix: extraction asks for RFC 3339 timestamps
…rites (#133) * feat(ai): read-only questions over fixed queries; read pool refuses writes at the connection * fix: ask windows keep the current second, whole-second UTC bounds, test-order marker in totals
…d setup-help shape (#135)
Bumps [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) from 3.15.0 to 4.1.3. - [Release notes](https://github.com/cloudflare/wrangler-action/releases) - [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md) - [Commits](cloudflare/wrangler-action@9acf94a...953926a) --- updated-dependencies: - dependency-name: cloudflare/wrangler-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.4.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@11d5960...3d3c42e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 7.0.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@ea165f8...cf430e0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…d signed webhooks
3aa272a to
a9075e2
Compare
|
Superseded: the WooCommerce gateway and the AWS module shipped together in #136 (they shared one branch), now merged. |
What
Gateway creates a Kaasu order with an idempotency key per WooCommerce order, sends the shopper to the pay page, and marks the order paid only on a verified order.confirmed webhook (deduped by event id, 5-minute tolerance, constant-time compare). Amounts converted to paise from the decimal string with no floats. Plain PHP tests cover amounts and the signature vector shared with the Go verifier; php -l runs in CI. Settings never echo the stored key. PUBLISHING.md is the human checklist.
Closes #27
Type
Money path
AI assistance (policy)
Checklist
make testpasses offline (race detector on)Notes
Stacked: base is
feat/44-aws. PARTIAL against card 33: the WordPress and WooCommerce runtime was not run (only php -l and plain tests); the settings screen was not seen in a browser; directory publication is a human step, not done.