PR N: executions.swift_message_id + SWIFT gateway wiring #18
Reference in New Issue
Block a user
Delete Branch "devin/1776881860-pr-n-swift-msgid"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes gap-analysis v2 §4 partial (canonical "Execution Reference Set") and §10.6 SWIFT message ID persistence.
What
swift_message_id+swift_message_typecolumns toexecutions, with a partial index onswift_message_idfor acknowledgment ingest (camt.025/054 → original MT760/MT202 lookup).db/executions.ts—recordExecution()UPSERT helper,getExecution(),findBySwiftMessageId(). These are the three queries the bank-instruction phase and the SWIFT gateway need.services/bank.ts.commitBankInstructionnow emits a SWIFT reference alongside the ISO-20022 envelope: MT760 for plans carrying anissueInstrumentstep (realgenerateMt760output,messageReferencefield), MT202 for payment-only plans (synthetic ref; PR R stands up the real FIN-link transport).services/execution.tspersists the reference set atbank_instructioncomplete-time viarecordExecution(best-effort; logs on failure, does not abort the leg).Verification
npx tsc --noEmitclean.npx jest85/85 green.Merge note
Migration numbered
006on this branch to keep independent of PR L (which introduces005_plans_participants). Merging PR L first needs no rebase here; merging PR N first will leave a gap that PR L closes.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.