From 2db0619ce2de75f6af015ffab230adc8476ea41c Mon Sep 17 00:00:00 2001 From: Fabro Date: Mon, 16 Mar 2026 01:33:34 -0400 Subject: [PATCH] init run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⚒️ Generated with [Fabro](https://fabro.sh) --- graph.fabro | 43 +++++++++++++++++++++++++++++++++++++++++++ manifest.json | 13 +++++++++++++ sandbox.json | 5 +++++ 3 files changed, 61 insertions(+) create mode 100644 graph.fabro create mode 100644 manifest.json create mode 100644 sandbox.json diff --git a/graph.fabro b/graph.fabro new file mode 100644 index 000000000..73431b7bc --- /dev/null +++ b/graph.fabro @@ -0,0 +1,43 @@ +digraph SWEBench { + graph [goal="Using __isnull=True on a KeyTransform should not match JSON null on SQLite and Oracle +Description + +The KeyTransformIsNull lookup borrows the logic from HasKey for isnull=False, which is correct. If isnull=True, the query should only match objects that do not have the key. The query is correct for MariaDB, MySQL, and PostgreSQL. However, on SQLite and Oracle, the query also matches objects that have the key with the value null, which is incorrect. +To confirm, edit tests.model_fields.test_jsonfield.TestQuerying.test_isnull_key. For the first assertion, change + self.assertSequenceEqual( + NullableJSONModel.objects.filter(value__a__isnull=True), + self.objs[:3] + self.objs[5:], + ) +to + self.assertSequenceEqual( + NullableJSONModel.objects.filter(value__j__isnull=True), + self.objs[:4] + self.objs[5:], + ) +The test previously only checks with value__a which could not catch this behavior because the value is not JSON null. +"] + rankdir=LR + + start [shape=Mdiamond] + exit [shape=Msquare] + + setup [label="Setup", shape=parallelogram, script="git clone https://github.com/django/django.git . && git checkout 3f140dde51c0fe6c350acb7727bbe489a99f0632 && python -m pip install -e ."] + solve [label="Solve", prompt="Fix this GitHub issue in the repository. Make the minimal code change needed.\n\nUsing __isnull=True on a KeyTransform should not match JSON null on SQLite and Oracle +Description + +The KeyTransformIsNull lookup borrows the logic from HasKey for isnull=False, which is correct. If isnull=True, the query should only match objects that do not have the key. The query is correct for MariaDB, MySQL, and PostgreSQL. However, on SQLite and Oracle, the query also matches objects that have the key with the value null, which is incorrect. +To confirm, edit tests.model_fields.test_jsonfield.TestQuerying.test_isnull_key. For the first assertion, change + self.assertSequenceEqual( + NullableJSONModel.objects.filter(value__a__isnull=True), + self.objs[:3] + self.objs[5:], + ) +to + self.assertSequenceEqual( + NullableJSONModel.objects.filter(value__j__isnull=True), + self.objs[:4] + self.objs[5:], + ) +The test previously only checks with value__a which could not catch this behavior because the value is not JSON null. +"] + extract_patch [label="Extract Patch", shape=parallelogram, script="git diff"] + + start -> setup -> solve -> extract_patch -> exit +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 000000000..7edc31a6e --- /dev/null +++ b/manifest.json @@ -0,0 +1,13 @@ +{ + "run_id": "01KKTJ51JFJYFP8KKSQZR3SGW2", + "workflow_name": "SWEBench", + "goal": "Using __isnull=True on a KeyTransform should not match JSON null on SQLite and Oracle\nDescription\n\t\nThe KeyTransformIsNull lookup borrows the logic from HasKey for isnull=False, which is correct. If isnull=True, the query should only match objects that do not have the key. The query is correct for MariaDB, MySQL, and PostgreSQL. However, on SQLite and Oracle, the query also matches objects that have the key with the value null, which is incorrect.\nTo confirm, edit tests.model_fields.test_jsonfield.TestQuerying.test_isnull_key. For the first assertion, change\n\t\tself.assertSequenceEqual(\n\t\t\tNullableJSONModel.objects.filter(value__a__isnull=True),\n\t\t\tself.objs[:3] + self.objs[5:],\n\t\t)\nto\n\t\tself.assertSequenceEqual(\n\t\t\tNullableJSONModel.objects.filter(value__j__isnull=True),\n\t\t\tself.objs[:4] + self.objs[5:],\n\t\t)\nThe test previously only checks with value__a which could not catch this behavior because the value is not JSON null.\n", + "start_time": "2026-03-16T05:33:34.170136Z", + "node_count": 5, + "edge_count": 4, + "run_branch": "fabro/run/01KKTJ51JFJYFP8KKSQZR3SGW2", + "base_sha": "470fcfe1200b2102c0cdf91c73b0ed8d925f258a", + "base_branch": "main", + "workflow_slug": "django__django-13757", + "host_repo_path": "/Users/bhelmkamp/p/fabro-sh/fabro/evals/swe-bench/results/haiku-baseline/runs/django__django-13757" +} \ No newline at end of file diff --git a/sandbox.json b/sandbox.json new file mode 100644 index 000000000..e76c89d0d --- /dev/null +++ b/sandbox.json @@ -0,0 +1,5 @@ +{ + "provider": "daytona", + "working_directory": "/home/daytona/workspace", + "identifier": "fabro-01KKTJ51JFJYFP8KKSQZR3SGW2" +} \ No newline at end of file