You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RV-F12: T&E row errors point to wrong source record numbers (survivor-list position) #189
External repo review at commit c7bebd1 reproduced: rows failing client-side casting are removed before DB insertion; DB errors then use the survivor-list position as the row number. Reproduced: invalid number in data row 1 and invalid foreign key in data row 2 both reported as row 1.
Code path: api/services/te_loader.py L273–290.
Why this matters
The error report tells the user "row 1 failed FK validation" when it was actually row 2. For a reviewer looking at a 10,000-row file, this makes the error report unusable — the row numbers in the error message don't match the row numbers in the source CSV.
Interacts with M4 review screen (#142 shipped) which displays row-level errors — review currently shows the wrong row for FK/CHECK failures.
Proposed
Retain original CSV row number alongside each candidate throughout validation and batching.
DB-error path reports the stored original row number, not the survivor-list position.
Reproduction test: CSV with row 1 invalid number and row 2 invalid FK; error report must show "row 2 failed FK", not "row 1".
Done when
Reproduction test passes.
Review screen shows correct row numbers for both client-side casting failures and DB-side constraint failures.
Regression test: pre-existing error cases still show correct row numbers.
Reference
Tracker row G55. Repo review finding RV-F12. Interacts with M4 review screen (#108, #142, #143 already shipped). Should land before clients review real T&E uploads.
Activity