Test execution report · Release 4.2
ACME-T-327: Invoice list respects data retention
Summary
On rc1, 41 invoices whose retention had expired were still listed, counted and searchable, but could not be opened (404). Invoices within retention behaved correctly.
rc2 fixed the list but not the dashboard, report or search. rc3 fixed all four; the retest on 23 Oct with the same data passes every step.
Overview
Test data
| Tenant | Retention | Invoices | Past retention | Should be visible |
|---|---|---|---|---|
t-demo-01 | 7 years | 1,019 | – | 1,019 |
t-demo-02 | 365 days | 265 | 41 | 224 |
| Cut-off date | Test run 2026-10-20 minus 365 days = 2025-10-20 |
|---|---|
| Data source | Seed script, no production data |
| Script | check_retention.py (in acme/qa-api-tests) |
Step results (rc1)
| # | Action | Expected result | Actual result | Result |
|---|---|---|---|---|
| 1 | Record the invoice count and retention setting of each test tenant. | Counts known; at least one tenant has invoices past retention. | t-demo-01: 1,019 invoices, 7 years. t-demo-02: 265 invoices, 365 days, 41 created before 2025-10-20. | Pass |
| 2 | List all invoices with GET /invoices (all pages) for both tenants. | Only invoices within retention are listed; totalItems matches. | 1,284 listed and totalItems = 1284, including the 41 past retention. | Fail |
| 3 | Fetch each listed invoice with GET /invoices/{id}. | Every listed invoice returns 200. | 1243 return 200; the 41 past retention return 404 (3 attempts each). | Fail |
| 4 | Compare the dashboard count for t-demo-02 with the API. | Dashboard shows the number of retrievable invoices. | Dashboard shows 265, API detail works for 224. | Fail |
| 5 | Check the revenue report for September 2025 (t-demo-02). | Expired invoices are not in the report. | Report includes them (€18,940 too high). | Fail |
| 6 | Search for an expired invoice number in the UI. | Not found. | Found in search results; opening it shows 'Invoice not found'. | Fail |
Affected invoices 41 invoices, tenant t-demo-02
| # | Invoice ID | Number | Created | Retention ended | Amount | Listed | Detail | Counted |
|---|---|---|---|---|---|---|---|---|
| 1 | inv_Q9SBVD | 2025/08/100 | 2025-08-04 | 2026-08-04 | €180 | Yes | 404 | Yes |
| 2 | inv_YH4N8S | 2025/08/103 | 2025-08-05 | 2026-08-05 | €277 | Yes | 404 | Yes |
| 3 | inv_7SDZK7 | 2025/08/106 | 2025-08-07 | 2026-08-07 | €374 | Yes | 404 | Yes |
| 4 | inv_E3PBYK | 2025/08/109 | 2025-08-09 | 2026-08-09 | €471 | Yes | 404 | Yes |
| 5 | inv_NBZNBZ | 2025/08/112 | 2025-08-11 | 2026-08-11 | €568 | Yes | 404 | Yes |
| 6 | inv_WKAZPD | 2025/08/115 | 2025-08-13 | 2026-08-13 | €665 | Yes | 404 | Yes |
| 7 | inv_5VKB3S | 2025/08/118 | 2025-08-14 | 2026-08-14 | €762 | Yes | 404 | Yes |
| 8 | inv_C5WNE7 | 2025/08/121 | 2025-08-16 | 2026-08-16 | €859 | Yes | 404 | Yes |
| 9 | inv_KD7ZSK | 2025/08/124 | 2025-08-18 | 2026-08-18 | €956 | Yes | 404 | Yes |
| 10 | inv_TNGB6Z | 2025/08/127 | 2025-08-20 | 2026-08-20 | €1,053 | Yes | 404 | Yes |
| 11 | inv_3XSNHD | 2025/08/130 | 2025-08-22 | 2026-08-22 | €1,150 | Yes | 404 | Yes |
| 12 | inv_A74ZWS | 2025/08/133 | 2025-08-23 | 2026-08-23 | €1,247 | Yes | 404 | Yes |
| 13 | inv_HFDB97 | 2025/08/136 | 2025-08-25 | 2026-08-25 | €1,344 | Yes | 404 | Yes |
| 14 | inv_RQPNMK | 2025/08/139 | 2025-08-27 | 2026-08-27 | €1,441 | Yes | 404 | Yes |
| 15 | inv_ZZZZZZ | 2025/08/142 | 2025-08-29 | 2026-08-29 | €1,538 | Yes | 404 | Yes |
| 16 | inv_89ABCD | 2025/08/145 | 2025-08-31 | 2026-08-31 | €1,635 | Yes | 404 | Yes |
| 17 | inv_FHKNQS | 2025/09/148 | 2025-09-01 | 2026-09-01 | €1,732 | Yes | 404 | Yes |
| 18 | inv_PSWZ47 | 2025/09/151 | 2025-09-03 | 2026-09-03 | €1,829 | Yes | 404 | Yes |
| 19 | inv_X37BFK | 2025/09/154 | 2025-09-05 | 2026-09-05 | €1,926 | Yes | 404 | Yes |
| 20 | inv_6BGNTZ | 2025/09/157 | 2025-09-07 | 2026-09-07 | €2,023 | Yes | 404 | Yes |
| 21 | inv_DKSZ7D | 2025/09/160 | 2025-09-09 | 2026-09-09 | €2,120 | Yes | 404 | Yes |
| 22 | inv_MV4BJS | 2025/09/163 | 2025-09-10 | 2026-09-10 | €2,217 | Yes | 404 | Yes |
| 23 | inv_V5DNX7 | 2025/09/166 | 2025-09-12 | 2026-09-12 | €2,314 | Yes | 404 | Yes |
| 24 | inv_4DPZAK | 2025/09/169 | 2025-09-14 | 2026-09-14 | €2,411 | Yes | 404 | Yes |
| 25 | inv_BNZBNZ | 2025/09/172 | 2025-09-16 | 2026-09-16 | €2,508 | Yes | 404 | Yes |
| 26 | inv_JXAN2D | 2025/09/175 | 2025-09-18 | 2026-09-18 | €205 | Yes | 404 | Yes |
| 27 | inv_S7KZDS | 2025/09/178 | 2025-09-19 | 2026-09-19 | €302 | Yes | 404 | Yes |
| 28 | inv_2FWBR7 | 2025/09/181 | 2025-09-21 | 2026-09-21 | €399 | Yes | 404 | Yes |
| 29 | inv_9Q7N5K | 2025/09/184 | 2025-09-23 | 2026-09-23 | €496 | Yes | 404 | Yes |
| 30 | inv_GZGZGZ | 2025/09/187 | 2025-09-25 | 2026-09-25 | €593 | Yes | 404 | Yes |
| 31 | inv_Q9SBVD | 2025/09/190 | 2025-09-27 | 2026-09-27 | €690 | Yes | 404 | Yes |
| 32 | inv_YH4N8S | 2025/09/193 | 2025-09-28 | 2026-09-28 | €787 | Yes | 404 | Yes |
| 33 | inv_7SDZK7 | 2025/09/196 | 2025-09-30 | 2026-09-30 | €884 | Yes | 404 | Yes |
| 34 | inv_E3PBYK | 2025/10/199 | 2025-10-02 | 2026-10-02 | €981 | Yes | 404 | Yes |
| 35 | inv_NBZNBZ | 2025/10/202 | 2025-10-04 | 2026-10-04 | €1,078 | Yes | 404 | Yes |
| 36 | inv_WKAZPD | 2025/10/205 | 2025-10-06 | 2026-10-06 | €1,175 | Yes | 404 | Yes |
| 37 | inv_5VKB3S | 2025/10/208 | 2025-10-07 | 2026-10-07 | €1,272 | Yes | 404 | Yes |
| 38 | inv_C5WNE7 | 2025/10/211 | 2025-10-09 | 2026-10-09 | €1,369 | Yes | 404 | Yes |
| 39 | inv_KD7ZSK | 2025/10/214 | 2025-10-11 | 2026-10-11 | €1,466 | Yes | 404 | Yes |
| 40 | inv_TNGB6Z | 2025/10/217 | 2025-10-13 | 2026-10-13 | €1,563 | Yes | 404 | Yes |
| 41 | inv_3XSNHD | 2025/10/220 | 2025-10-15 | 2026-10-15 | €1,660 | Yes | 404 | Yes |
Evidence
Request and response for the first affected invoice (tokens and personal data removed):
GET /invoices?limit=50&cursor=eyJwIjo0fQ → 200
{ "items": [ …, { "id": "inv_Q9SBVD", "number": "2025/08/100", "createdAt": "2025-08-04T10:12:44Z", … } ],
"totalItems": 1284 }
GET /invoices/inv_Q9SBVD → 404
{ "error": "not_found", "message": "Invoice not found" }The full CSV of all checks and the script are attached to ACME-512 in Jira (acme-t-retention-evidence.csv, check_retention.py).
Defect
| Key | Summary | Severity | Status | Component | Found by | Owner | Created |
|---|---|---|---|---|---|---|---|
ACME-512 | Invoices past data retention are listed but cannot be retrieved Retested and closed on 23 Oct. | High | Fixed | Invoices API | ACME-T-327 | Backend | 20 Oct 2026 |
Observations
| ID | Area | Observation | Impact | Suggested action |
|---|---|---|---|---|
OBS-01 | Root cause | The list query filtered by deleted_at but the retention job only sets expired_at. | Info | Shared repository method for 'visible invoices' (done in rc3). |
OBS-02 | Search index | Search is served from a separate index that was not updated by the retention job. | Medium | Reindex after each retention run (done in rc3). |
OBS-03 | Test data | Only one tenant had a short retention period; the bug would not have shown with default seed data. | Coverage | Keep t-demo-02 with 365-day retention in the seed script. |
Execution history
| When | Build | By | Result | Notes |
|---|---|---|---|---|
| 20 Oct 09:30 | 4.2.0-rc1 | Tomasz Kordiak | Fail | 41 expired invoices listed; ACME-512 raised |
| 21 Oct 10:15 | 4.2.0-rc2 | Tomasz Kordiak | Fail | List fixed, dashboard and report still count expired invoices |
| 23 Oct 10:05 | 4.2.0-rc3 | Tomasz Kordiak | Pass | All steps pass; regression suites green |
Retest (rc3)
GET /invoices lists 1243 invoices, totalItems = 1243; all return 200. Dashboard for t-demo-02 shows 224, the September 2025 report excludes expired invoices and search no longer finds them.
Regression: the API smoke suite and the invoice E2E specs pass on rc3.
| # | Step | Result |
|---|---|---|
| 1 | Record the invoice count and retention setting of each test tenant. | Pass |
| 2 | List all invoices with GET /invoices (all pages) for both tenants. | Pass |
| 3 | Fetch each listed invoice with GET /invoices/{id}. | Pass |
| 4 | Compare the dashboard count for t-demo-02 with the API. | Pass |
| 5 | Check the revenue report for September 2025 (t-demo-02). | Pass |
| 6 | Search for an expired invoice number in the UI. | Pass |
Sample report. Acme Ledger, its data, people and defects are fictional. Your report shows your product, your tickets and your tools.
More sample reports · Book a 15-minute call