mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-09 22:33:37 +00:00
parent
2dcacab520
commit
2db0619ce2
3 changed files with 61 additions and 0 deletions
43
graph.fabro
Normal file
43
graph.fabro
Normal file
|
|
@ -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
|
||||
}
|
||||
13
manifest.json
Normal file
13
manifest.json
Normal file
|
|
@ -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"
|
||||
}
|
||||
5
sandbox.json
Normal file
5
sandbox.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"provider": "daytona",
|
||||
"working_directory": "/home/daytona/workspace",
|
||||
"identifier": "fabro-01KKTJ51JFJYFP8KKSQZR3SGW2"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue