refactor: tidy tbank-sync claim comments (WealthLedger/backend#166)
Backend verify / commits (pull_request) Successful in 1m31s
Backend verify / security (pull_request) Successful in 1m18s
Backend verify / verify (pull_request) Successful in 6m15s

This commit is contained in:
2026-11-04 17:59:42 +03:00
parent 812b989130
commit a2b5306a4c
+1 -5
View File
@@ -3,17 +3,13 @@ import type { TbankSyncAttempt } from './tbank-access.service';
const NO_UPDATED_ROWS = 0; const NO_UPDATED_ROWS = 0;
// Shared owners for the tbank-sync DB claim/lock protocol (backend#166). // Shared owners for the tbank-sync DB claim/lock protocol.
// Both helpers are CAS fences: they run inside the caller's transaction and // Both helpers are CAS fences: they run inside the caller's transaction and
// keep the exact where/data shapes they replaced. Callers keep deciding // keep the exact where/data shapes they replaced. Callers keep deciding
// success from the claim count exactly as before. // success from the claim count exactly as before.
// Claims the active TbankSyncWork row: only the still-running attempt of a // Claims the active TbankSyncWork row: only the still-running attempt of a
// valid connection may transition. `data` is the state transition to apply. // valid connection may transition. `data` is the state transition to apply.
// `state` overrides the default 'running' fence (e.g. an initiator row also
// accepts 'complete'); `withoutConnectionFence` drops the
// `connection: { invalidToken: false }` guard for fences that must also fire
// on an invalidated connection.
export type ClaimOptions = { export type ClaimOptions = {
// Overrides the default 'running' fence (e.g. an initiator row also // Overrides the default 'running' fence (e.g. an initiator row also
// accepts 'complete'). // accepts 'complete').