Closes gap-analysis v2 §4 partial (canonical "Execution Reference Set")
and §10.6 SWIFT message ID persistence.
- Migration 006 adds swift_message_id + swift_message_type columns to
executions, with a partial index on swift_message_id for
acknowledgment ingest (camt.025/054 -> original MT760/MT202 lookup).
- db/executions.ts: recordExecution() UPSERT helper, getExecution(),
findBySwiftMessageId() — the three queries the bank-instruction phase
and SWIFT gateway need.
- services/bank.ts.commitBankInstruction now emits a SWIFT reference
alongside the ISO-20022 envelope: MT760 for plans carrying an
issueInstrument step (real generateMt760 output, messageReference
field), MT202 for payment-only plans (synthetic ref).
- services/execution.ts persists the reference set at bank_instruction
complete-time via recordExecution (best-effort; logs on failure,
does not abort the leg).
- 5 unit tests covering MT760 vs MT202 branching, reference uniqueness
across calls, and SQL shape of the UPSERT + SELECT.