Backlog t53. breakpilot-invoice-intake fails every run (every 10 min, 144 ERROR lines in 24 h, handled: 0):
list Contact: HTTP 500: pymysql.err.OperationalError: (1052, "Column 'creation' in ORDER BY is ambiguous")
The supplier lookup lists Contacts filtered on the child table Contact Email; Frappe joins tabContact Email, and the bare order_by=creation asc exists in both tables. So nothing sent to invoice@ became an E Invoice Import / draft Purchase Invoice / ToDo.
Fix:list() orders by `tab<Doctype>`.`creation` asc.
Test: the fake ERP now answers like MariaDB (child-table filter + unqualified order_by → 500 with that error). Without the fix 6 intake tests fail, with it all pass (-race); golangci-lint 0 issues.
After merge: the intake image redeploys on the infra cluster; its next run works through every mail since INTAKE_SINCE (it keeps no state). Check in ERPNext: E Invoice Import, Purchase Invoice drafts, ToDo „prüfen“.
Backlog t53. `breakpilot-invoice-intake` fails **every run** (every 10 min, 144 ERROR lines in 24 h, `handled: 0`):
```
list Contact: HTTP 500: pymysql.err.OperationalError: (1052, "Column 'creation' in ORDER BY is ambiguous")
```
The supplier lookup lists Contacts filtered on the child table **Contact Email**; Frappe joins `tabContact Email`, and the bare `order_by=creation asc` exists in both tables. So nothing sent to invoice@ became an E Invoice Import / draft Purchase Invoice / ToDo.
**Fix:** `list()` orders by `` `tab<Doctype>`.`creation` asc ``.
**Test:** the fake ERP now answers like MariaDB (child-table filter + unqualified order_by → 500 with that error). Without the fix 6 intake tests fail, with it all pass (`-race`); `golangci-lint` 0 issues.
**After merge:** the intake image redeploys on the infra cluster; its next run works through every mail since `INTAKE_SINCE` (it keeps no state). Check in ERPNext: E Invoice Import, Purchase Invoice drafts, ToDo „prüfen“.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
Every intake run failed with "list Contact: HTTP 500: (1052, Column
'creation' in ORDER BY is ambiguous)": the supplier lookup filters on the
child table Contact Email, Frappe joins it, and the bare order_by column
exists in both tables. Nothing sent to invoice@ became a draft (t53).
order_by is now `tab<Doctype>`.`creation`; the fake ERP in the tests
refuses an unqualified one with a child-table filter, like MariaDB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang
merged commit ee8ae87917 into main2026-10-29 11:38:47 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Backlog t53.
breakpilot-invoice-intakefails every run (every 10 min, 144 ERROR lines in 24 h,handled: 0):The supplier lookup lists Contacts filtered on the child table Contact Email; Frappe joins
tabContact Email, and the bareorder_by=creation ascexists in both tables. So nothing sent to invoice@ became an E Invoice Import / draft Purchase Invoice / ToDo.Fix:
list()orders by`tab<Doctype>`.`creation` asc.Test: the fake ERP now answers like MariaDB (child-table filter + unqualified order_by → 500 with that error). Without the fix 6 intake tests fail, with it all pass (
-race);golangci-lint0 issues.After merge: the intake image redeploys on the infra cluster; its next run works through every mail since
INTAKE_SINCE(it keeps no state). Check in ERPNext: E Invoice Import, Purchase Invoice drafts, ToDo „prüfen“.🤖 Generated with Claude Code
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4