Repository navigation
feat: decode errors that are safe to log - #96
Merged
Merged
Annotations
2 errors and 1 notice
|
Check package, types, unit tests and live dialect
Process completed with exit code 1.
|
|
Check package, types, unit tests and live dialect:
tests/fuzz/harness.ts#L155
Error: [fuzz] generated fixtures: union results agree (postgres) failed after 15 runs (27 shrinks)
replay: FUZZ_SEED=1302758654 FUZZ_PATH=14:2:1:1:1:1:1:1:1:8:1:1:1:1:1:1:1:3:0:1:1:1:1:0:0:0:0:0 bun run fuzz -t 'generated fixtures: union results agree \(postgres\)'
--- input (shrunk)
{"fixture":{"orders":[],"customers":[]},"plan":{"orgId":"org_1","branches":[{"orgId":"org_1","join":undefined,"where":[{"k":"null","op":"isNull","e":{"k":"str","v":"org_1"}}],"shape":{"k":"rows","select":[["id",{"k":"col","col":"Id"}],["e0",{"k":"col","col":"Note"}],["e1",{"k":"col","col":"Id"}]],"distinct":false,"orderBy":[],"limit":undefined,"offset":undefined},"wrap":false,"crossTenant":false},{"orgId":"org_1","join":undefined,"where":[],"shape":{"k":"rows","select":[["id",{"k":"col","col":"Id"}],["e0",{"k":"col","col":"Note"}],["e1",{"k":"col","col":"Id"}]],"distinct":false,"orderBy":[],"limit":undefined,"offset":undefined},"wrap":false,"crossTenant":false},{"orgId":"org_1","join":"inner","where":[],"shape":{"k":"rows","select":[["id",{"k":"col","col":"Id"}],["e0",{"k":"col","col":"Note"}],["e1",{"k":"arith","op":"add","l":{"k":"arith","op":"div","l":{"k":"arith","op":"add","l":{"k":"col","col":"Id"},"r":{"k":"num","v":0}},"r":{"k":"num","v":0}},"r":-1}]],"distinct":false,"orderBy":[],"limit":undefined,"offset":undefined},"wrap":false,"crossTenant":false}],"crossTenant":true,"orderBy":[["e1","asc"]],"limit":undefined,"offset":undefined}}
--- error
expected 'DatabaseError' to be 'Rows' // Object.is equality
--- sql
SELECT * FROM (
(
WITH "orders" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS int4) AS "Id", CAST(NULL AS text) AS "Customer", CAST(NULL AS int8) AS "Amount", CAST(NULL AS text) AS "Status", CAST(NULL AS text) AS "Note", CAST(NULL AS timestamptz) AS "Created" WHERE 1 = 0
),
"customers" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS text) AS "Name", CAST(NULL AS text) AS "Tier" WHERE 1 = 0
)
SELECT
"orders"."Id" AS "id",
"orders"."Note" AS "e0",
"orders"."Id" AS "e1"
FROM "orders"
WHERE 'org_1' IS NULL
)
UNION ALL
(
WITH "orders" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS int4) AS "Id", CAST(NULL AS text) AS "Customer", CAST(NULL AS int8) AS "Amount", CAST(NULL AS text) AS "Status", CAST(NULL AS text) AS "Note", CAST(NULL AS timestamptz) AS "Created" WHERE 1 = 0
),
"customers" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS text) AS "Name", CAST(NULL AS text) AS "Tier" WHERE 1 = 0
)
SELECT
"orders"."Id" AS "id",
"orders"."Note" AS "e0",
"orders"."Id" AS "e1"
FROM "orders"
)
UNION ALL
(
WITH "orders" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS int4) AS "Id", CAST(NULL AS text) AS "Customer", CAST(NULL AS int8) AS "Amount", CAST(NULL AS text) AS "Status", CAST(NULL AS text) AS "Note", CAST(NULL AS timestamptz) AS "Created" WHERE 1 = 0
),
"customers" AS (
SELECT CAST(NULL AS text) AS "OrgId", CAST(NULL AS text) AS "Name", CAST(NULL AS text) AS "Tier" WHERE 1 = 0
)
SELECT
"orders"."Id" AS "id",
"orders"."Note" AS "e0",
"orders"."Id" + 0 / 0 + -1 AS "e1"
FROM "orders"
INNER JOIN "customers" AS "c" ON ("orders"."Customer" = "c"."Name" AND "orders"."OrgId" = "c"."OrgId")
)
) AS "__union"
ORDER BY "e1" ASC
--- parameters
[]
--- tenantScope
cross-tenant
--- outcome
{"_tag":"DatabaseError","message":"division by zero"}
--- expected
[]
--- pin it: add the input above to tests/fuzz/regressions.ts under a key matching "generated fixtures: union results agree (postgres)"
❯ property tests/fuzz/harness.ts:155:8
|
|
"The ubuntu-latest label will migrate to Ubuntu 26 beginning October 19, 2026. For more information, see https://github.com/actions/runner-images/issues/14748"
|
background
wait
wait-all
cancel
parallel
Loading