mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-06 08:18:58 +00:00
parent
879b2fe739
commit
b9d3818a44
3 changed files with 64 additions and 10 deletions
|
|
@ -1,28 +1,32 @@
|
|||
{
|
||||
"timestamp": "2026-03-16T12:00:02.779002Z",
|
||||
"current_node": "setup",
|
||||
"timestamp": "2026-03-16T12:01:42.187700Z",
|
||||
"current_node": "solve",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
"setup"
|
||||
"setup",
|
||||
"solve"
|
||||
],
|
||||
"node_retries": {
|
||||
"solve": 4,
|
||||
"setup": 1,
|
||||
"start": 1
|
||||
},
|
||||
"context_values": {
|
||||
"current.preamble": "Goal: When DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response\nDescription\n\t\nThis is the response I get (plain text): \nA server error occurred. Please contact the administrator.\nI understand a ValueError should be raised which tells the URL resolver \"this path does not match, try next one\" but Http404 is what came to my mind intuitively and the error message was not very helpful.\nOne could also make a point that raising a Http404 should be valid way to tell the resolver \"this is indeed the right path but the current parameter value does not match anything so stop what you are doing and let the handler return the 404 page (including a helpful error message when DEBUG is True instead of the default 'Django tried these URL patterns')\".\nThis would prove useful for example to implement a path converter that uses get_object_or_404.\n\n\n\n## Additional Context\n\nIt seems that other exceptions correctly result in a technical 500 response.\nThe technical_404_response view performs a new URL resolving (cf https://github.com/django/django/blob/a8e492bc81fca829f5d270e2d57703c02e58701e/django/views/debug.py#L482) which will obviously raise a new Http404 which won't be caught as only Resolver404 is checked. That means the WSGI handler fails and the WSGI server returns the previously described default error message (indeed the error message is the default one from wsgiref.handlers.BaseHandler https://docs.python.org/3.6/library/wsgiref.html#wsgiref.handlers.BaseHandler.error_body). The solution seems to be to catch Http404 instead of Resolver404 in technical_404_response. This will result in a technical 404 page with the Http404's message displayed and will match the behaviour of when DEBUG is False.\nCreated PR , but I am not sure how to write the tests. I've looking about the response before and after catch Http404 instead of Resolver404, and there is no difference. Should I also change the technical_404.html for response?\nI've added test to the patch, but not sure if it is correct.\nI have made the requested changes; please review again\n",
|
||||
"current.preamble": "Goal: When DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response\nDescription\n\t\nThis is the response I get (plain text): \nA server error occurred. Please contact the administrator.\nI understand a ValueError should be raised which tells the URL resolver \"this path does not match, try next one\" but Http404 is what came to my mind intuitively and the error message was not very helpful.\nOne could also make a point that raising a Http404 should be valid way to tell the resolver \"this is indeed the right path but the current parameter value does not match anything so stop what you are doing and let the handler return the 404 page (including a helpful error message when DEBUG is True instead of the default 'Django tried these URL patterns')\".\nThis would prove useful for example to implement a path converter that uses get_object_or_404.\n\n\n\n## Additional Context\n\nIt seems that other exceptions correctly result in a technical 500 response.\nThe technical_404_response view performs a new URL resolving (cf https://github.com/django/django/blob/a8e492bc81fca829f5d270e2d57703c02e58701e/django/views/debug.py#L482) which will obviously raise a new Http404 which won't be caught as only Resolver404 is checked. That means the WSGI handler fails and the WSGI server returns the previously described default error message (indeed the error message is the default one from wsgiref.handlers.BaseHandler https://docs.python.org/3.6/library/wsgiref.html#wsgiref.handlers.BaseHandler.error_body). The solution seems to be to catch Http404 instead of Resolver404 in technical_404_response. This will result in a technical 404 page with the Http404's message displayed and will match the behaviour of when DEBUG is False.\nCreated PR , but I am not sure how to write the tests. I've looking about the response before and after catch Http404 instead of Resolver404, and there is no difference. Should I also change the technical_404.html for response?\nI've added test to the patch, but not sure if it is correct.\nI have made the requested changes; please review again\n\n## Completed stages\n- **setup**: fail\n - Script: `git clone https://github.com/django/django.git . && git checkout 514efa3129792ec2abb2444f3e7aeb3f21a38386 && python -m pip install -e .`\n - Stdout:\n ```\n fatal: destination path '.' already exists and is not an empty directory.\n ```\n - Stderr: (empty)\n\n## Context\n- failure_class: deterministic\n- failure_signature: setup|deterministic|script failed with exit code: <n> ## stdout fatal: destination path '.' already exists and is not an empty directory.\n",
|
||||
"internal.retry_count.start": 1,
|
||||
"graph.goal": "When DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response\nDescription\n\t\nThis is the response I get (plain text): \nA server error occurred. Please contact the administrator.\nI understand a ValueError should be raised which tells the URL resolver \"this path does not match, try next one\" but Http404 is what came to my mind intuitively and the error message was not very helpful.\nOne could also make a point that raising a Http404 should be valid way to tell the resolver \"this is indeed the right path but the current parameter value does not match anything so stop what you are doing and let the handler return the 404 page (including a helpful error message when DEBUG is True instead of the default 'Django tried these URL patterns')\".\nThis would prove useful for example to implement a path converter that uses get_object_or_404.\n\n\n\n## Additional Context\n\nIt seems that other exceptions correctly result in a technical 500 response.\nThe technical_404_response view performs a new URL resolving (cf https://github.com/django/django/blob/a8e492bc81fca829f5d270e2d57703c02e58701e/django/views/debug.py#L482) which will obviously raise a new Http404 which won't be caught as only Resolver404 is checked. That means the WSGI handler fails and the WSGI server returns the previously described default error message (indeed the error message is the default one from wsgiref.handlers.BaseHandler https://docs.python.org/3.6/library/wsgiref.html#wsgiref.handlers.BaseHandler.error_body). The solution seems to be to catch Http404 instead of Resolver404 in technical_404_response. This will result in a technical 404 page with the Http404's message displayed and will match the behaviour of when DEBUG is False.\nCreated PR , but I am not sure how to write the tests. I've looking about the response before and after catch Http404 instead of Resolver404, and there is no difference. Should I also change the technical_404.html for response?\nI've added test to the patch, but not sure if it is correct.\nI have made the requested changes; please review again",
|
||||
"command.stderr": "",
|
||||
"current_node": "setup",
|
||||
"failure_class": "deterministic",
|
||||
"current_node": "solve",
|
||||
"failure_class": "transient_infra",
|
||||
"graph.rankdir": "LR",
|
||||
"internal.retry_count.setup": 1,
|
||||
"internal.run_id": "01KKV88R5QJHD88WHFFXQVP3S8",
|
||||
"internal.node_visit_count": 1,
|
||||
"internal.fidelity": "compact",
|
||||
"failure_signature": "setup|deterministic|script failed with exit code: <n> ## stdout fatal: destination path '.' already exists and is not an empty directory.",
|
||||
"internal.thread_id": "start",
|
||||
"thread.setup.current_node": "solve",
|
||||
"internal.retry_count.solve": 4,
|
||||
"failure_signature": "solve|transient_infra|api_transient|gemini|rate_limited",
|
||||
"internal.thread_id": "setup",
|
||||
"command.output": "fatal: destination path '.' already exists and is not an empty directory.\n",
|
||||
"outcome": "fail",
|
||||
"thread.start.current_node": "setup"
|
||||
|
|
@ -44,14 +48,24 @@
|
|||
"start": {
|
||||
"status": "success",
|
||||
"duration_ms": 0
|
||||
},
|
||||
"solve": {
|
||||
"status": "fail",
|
||||
"failure": {
|
||||
"message": "LLM error: Rate limited by gemini: You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_requests_per_model, limit: 25, model: gemini-3.1-pro\nPlease retry in 17.809074514s.",
|
||||
"failure_class": "transient_infra",
|
||||
"failure_signature": "api_transient|gemini|rate_limited"
|
||||
},
|
||||
"duration_ms": 96499
|
||||
}
|
||||
},
|
||||
"next_node_id": "solve",
|
||||
"next_node_id": "extract_patch",
|
||||
"loop_failure_signatures": {
|
||||
"setup|deterministic|script failed with exit code: <n> ## stdout fatal: destination path '.' already exists and is not an empty directory.": 1
|
||||
},
|
||||
"node_visits": {
|
||||
"start": 1,
|
||||
"setup": 1
|
||||
"setup": 1,
|
||||
"solve": 1
|
||||
}
|
||||
}
|
||||
34
nodes/solve/prompt.md
Normal file
34
nodes/solve/prompt.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
Goal: When DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response
|
||||
Description
|
||||
|
||||
This is the response I get (plain text):
|
||||
A server error occurred. Please contact the administrator.
|
||||
I understand a ValueError should be raised which tells the URL resolver "this path does not match, try next one" but Http404 is what came to my mind intuitively and the error message was not very helpful.
|
||||
One could also make a point that raising a Http404 should be valid way to tell the resolver "this is indeed the right path but the current parameter value does not match anything so stop what you are doing and let the handler return the 404 page (including a helpful error message when DEBUG is True instead of the default 'Django tried these URL patterns')".
|
||||
This would prove useful for example to implement a path converter that uses get_object_or_404.
|
||||
|
||||
|
||||
|
||||
## Additional Context
|
||||
|
||||
It seems that other exceptions correctly result in a technical 500 response.
|
||||
The technical_404_response view performs a new URL resolving (cf https://github.com/django/django/blob/a8e492bc81fca829f5d270e2d57703c02e58701e/django/views/debug.py#L482) which will obviously raise a new Http404 which won't be caught as only Resolver404 is checked. That means the WSGI handler fails and the WSGI server returns the previously described default error message (indeed the error message is the default one from wsgiref.handlers.BaseHandler https://docs.python.org/3.6/library/wsgiref.html#wsgiref.handlers.BaseHandler.error_body). The solution seems to be to catch Http404 instead of Resolver404 in technical_404_response. This will result in a technical 404 page with the Http404's message displayed and will match the behaviour of when DEBUG is False.
|
||||
Created PR , but I am not sure how to write the tests. I've looking about the response before and after catch Http404 instead of Resolver404, and there is no difference. Should I also change the technical_404.html for response?
|
||||
I've added test to the patch, but not sure if it is correct.
|
||||
I have made the requested changes; please review again
|
||||
|
||||
## Completed stages
|
||||
- **setup**: fail
|
||||
- Script: `git clone https://github.com/django/django.git . && git checkout 514efa3129792ec2abb2444f3e7aeb3f21a38386 && python -m pip install -e .`
|
||||
- Stdout:
|
||||
```
|
||||
fatal: destination path '.' already exists and is not an empty directory.
|
||||
```
|
||||
- Stderr: (empty)
|
||||
|
||||
## Context
|
||||
- failure_class: deterministic
|
||||
- failure_signature: setup|deterministic|script failed with exit code: <n> ## stdout fatal: destination path '.' already exists and is not an empty directory.
|
||||
|
||||
|
||||
Fix this GitHub issue in the repository. Make the minimal code change needed.
|
||||
6
nodes/solve/status.json
Normal file
6
nodes/solve/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"status": "fail",
|
||||
"notes": null,
|
||||
"failure_reason": "LLM error: Rate limited by gemini: You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_requests_per_model, limit: 25, model: gemini-3.1-pro\nPlease retry in 17.809074514s.",
|
||||
"timestamp": "2026-03-16T12:01:42.186848+00:00"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue