Files
finance-app/src/__tests__/integration
siddharthd 9b59edcf48
ci / lint-test (push) Successful in 46s
reconcile: machine auth for the scheduled sweep, across all owners
I built the auto-reconcile endpoint and then left nothing calling it —
exactly the gap I had criticised reconcilePendingOrders for. Found by
tracing the pipeline end to end rather than by anything failing.

PATCH now takes two callers. A person in the browser reconciles their own
queue via the session; the scheduled sweep has no session, carries the
machine token, and sweeps EVERY owner with a queue. That distinction is
load-bearing: 169 of the 177 rows outstanding belong to the second
participant, so a sweep scoped to the session user would leave almost all
of the queue untouched.

A wrong machine token does not fail the request outright — it falls
through to session auth, so the all-owner sweep stays gated while a
browser caller is unaffected. Verified live: 403 with a bad token and no
session, dry-run OK with the real one.

3 new tests. Two test-harness bugs fixed while adding them: the request
stub had no `headers` at all, and the statement helper reused one account
number, so two owners collided on uq_statement_identity rather than
modelling two real cards.
2026-08-22 16:50:40 +10:00
..