fix: keep absorbed names for the post-merge report, relabel the orphan check - #2831
Merged
Conversation
…n check Two defects found while running the scripts on a staging database. Section E of 04 lists masters whose surviving name is the degraded one (words run together at import) so they can be corrected by hand. It read the absorbed records' names through a JOIN -- which returns nothing, because by then those records are deleted. The names are now captured in pm_snapshot in step 02, before the merge, and read from there. Section D counts polymorphic orphans across the WHOLE database, including ones left by earlier deletions from the interface or other scripts, but its heading read as though it reported this batch's result. On the staging run it showed 835 orphaned mail_message rows, none of them produced by the merge -- the batch's own figure is the check at the end of 03, which filters on pm_map. Heading and comment now say so. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Două defecte de raportare, găsite rulând scripturile pe baza de staging a unui client.
Ambele sunt în verificarea de după unificare — logica de merge propriu-zisă nu se schimbă.
1. Secțiunea E nu putea afișa denumirile absorbite
Masterul e ales după volumul de documente, nu după calitatea denumirii, așa că uneori
supraviețuiește fișa cu numele lipit la import. Secțiunea E le listează, ca să fie corectate
manual — și le arăta alături de denumirile de pe fișele absorbite, ca alternativă.
Doar că le citea printr-un JOIN pe acele fișe, care la momentul verificării sunt deja șterse.
Coloana ieșea mereu goală, exact în cazurile unde era utilă:
Denumirile se capturează acum în
pm_snapshotla pasul 02, înainte de merge, și se citescde acolo.
2. Secțiunea D era etichetată înșelător
D numără orfanii polimorfi din toată baza, inclusiv pe cei lăsați de ștergeri anterioare
făcute din interfață sau din alte scripturi. Titlul însă se citea ca și cum ar raporta
rezultatul lotului curent.
Pe staging a afișat 835 de rânduri orfane în
mail_message— niciunul produs de unificare.Cifra lotului e verificarea de la finalul lui 03, care filtrează pe
pm_mapși a dat zero petoate cele cinci categorii. Titlul și comentariul spun acum explicit ce măsoară și ce nu.
Context: rularea care le-a scos la iveală
Lot de 50 de grupuri, aplicat pe staging:
Zero abateri înseamnă că fiecare document și fiecare leu de sold nereconciliat de pe fișele
absorbite a ajuns pe master.