fix(migration): korrigiere fehlverknüpften chargebackBankTx (buy_crypto 124581)#3941
Open
TaprootFreak wants to merge 1 commit into
Open
fix(migration): korrigiere fehlverknüpften chargebackBankTx (buy_crypto 124581)#3941TaprootFreak wants to merge 1 commit into
TaprootFreak wants to merge 1 commit into
Conversation
…pto 124581) Der lose `LIKE '%ref%'`-Match aus #3896 hat bei der Chargeback-Completion ueber `ORDER BY id DESC` die neueste passende bank_tx geliefert statt der eigenen Auszahlung. Dadurch zeigte buy_crypto 124581.chargebackBankTx auf die fremde Repeat-Auszahlung 203191 (bank_tx_repeat 195) statt auf die eigene 202384, und 203191 behielt den Typ BuyCryptoReturn statt BankTxRepeat-Chargeback. Reine Metadaten-/Reconciliation-Korrektur, kein Geldeffekt (Cashflow netto null: ein 201836, aus 202384, Rueckbuchung 202543, aus 203191). Env-gated No-op, wo der korrupte Zustand fehlt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was
Einmalige Reconciliation-Korrektur (Migration) für den Fehl-Link aus dem #3896-Zeitfenster, der mit #3928 (Revert auf exakten Match) im Code bereits behoben ist. Dies ist die in #3928 §1 angekündigte separate Daten-Korrektur.
Betroffener Record:
buy_crypto 124581Während #3896 den Lookup auf
LIKE '%ref%'gelockert hatte, lieferte die Chargeback-Completion über das abschliessendeORDER BY id DESCdie neueste passendebank_txstatt der eigenen Auszahlung:202384203191bank_tx_repeat 195(sourceBankTx=202384); gleicher Betrag, gleicher Referenz-Anfang, aber von der Bank um Kundentext ergänzt und bei 140 Zeichen (SEPA-Ustrd-Maximum) gekappt → matchte nur als Substring und war neuerFolge:
buy_crypto 124581.chargebackBankTx→203191(fremde Wiederholungs-Auszahlung) statt202384. Das verletzt die mit fix(buy-crypto): complete bank chargebacks from chargebackOutput #3906 eingeführte InvariantechargebackBankTx === chargebackOutput.bankTx.bank_tx 203191.type=BuyCryptoReturnstattBankTxRepeat-Chargeback.Scope / Verifikation (DB-Abgleich PRD)
buy_crypto 124581ist all-time der einzige Record, der die fix(buy-crypto): complete bank chargebacks from chargebackOutput #3906-Invariante verletzt (chargebackBankTxId <> chargebackOutput.bankTxId, beide gesetzt, completed). Die analoge Prüfung fürbank_tx_returnundbank_tx_repeatergibt 0 weitere Treffer.BankTxRepeat-Chargebackist gegen 37 saubere Repeat-Auszahlungen belegt;203191ist der einzige fehlgetypte von insgesamt 38.202384ist aktuell nirgends alschargebackBankTxbelegt → keine Verletzung der@OneToOne-Unique-Constraint beim Umhängen.Kein Geldeffekt
Cashflow netto null: ein
201836(+6500), aus202384(−6500), Rückbuchung202543(+6500), aus203191(−6500). Der Kunde wurde genau einmal erstattet (erste Auszahlung zurückgewiesen, korrigiert erneut gesendet). Die Korrektur betrifft ausschliesslich Metadaten/Reconciliation.Korrektur (
up)buy_crypto 124581.chargebackBankTxId:203191→202384bank_tx 203191.type:BuyCryptoReturn→BankTxRepeat-ChargebackJeder Schritt ist per Pre-Check auf den exakten korrupten Zustand gegated → No-op auf DEV/Staging (Record fehlt dort), idempotent, re-runnable.
down()stellt den Vorzustand gegated wieder her.Testplan
buy_crypto 124581.chargebackBankTxId = 202384undbank_tx 203191.type = BankTxRepeat-Chargebackverifizieren