Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

BUG General self-ask scorers crash when the judge returns a category

Cerrado
#2,896 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@u7k4rs6 ya está trabajando en esto.

Desde el 28/9/2026.

  • #1 de @bhargavikvmpl-2001 — abierto
  • #2897 de @u7k4rs6 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
security

Línea de trabajo

Start by locating SelfAskGeneralFloatScaleScorer, SelfAskGeneralTrueFalseScorer, and their JsonSchemaResponseHandler construction. Review the existing response-category handling and related scorer tests, then verify that these two scorers use the response category as the fallback rule describes while other handlers retain the current error behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

SelfAskGeneralFloatScaleScorer and SelfAskGeneralTrueFalseScorer crash when the judge returns a category and the scorer also has one configured.

Both docstrings say a category in the response is used, and the configured one only applies when the response has none. But they build a JsonSchemaResponseHandler that raises ValueError("Category is present in the response and an argument") when both are present. That isn't an InvalidJsonException, so there's no retry and scoring fails after one call:

category="harm", response {"score_value": "true", "rationale": "r", "category": "violence"}
-> RuntimeError ... ValueError: Category is present in the response and an argument  (target calls: 1)

Fix: let these two scorers opt into "response category wins, configured is the fallback". Other handlers and scorers keep the current error.

Lenguaje dominante
Python
Estrellas
4.6k
Forks
944
Merge medio
3 d 1 h
PR fusionados (30 d)
278

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/PyRIT

Todos los issues de microsoft/PyRIT

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.