BUG remove_seeds_from_memory(harm_categories=...) deletes seeds whose categories only contain the value as a substring
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 78/100
Línea de trabajo
Start at remove_seeds_from_memory and the list-filter handling for harm_categories, authors, groups, and parameters; inspect the existing _get_condition_json_array_match helper and the related seed-memory tests. Confirm that remove filters match whole list elements by default while get_seeds keeps substring behavior. Done means the reported hate example removes only the exact category and regression coverage passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
remove_seeds_from_memory(harm_categories=["hate"]) also deletes seeds tagged hate_speech, and even whatever. The list filters (harm_categories, authors, groups, parameters) go through field.contains(value), which is an unescaped LIKE '%value%' on the JSON text.
For get_seeds the substring match looks intentional (there are tests for it). But the remove methods already default value to an exact match so a short value can't wipe out more than you meant, and the list filters never got the same treatment.
seeds = [SeedPrompt(value="a", harm_categories=["hate"]),
SeedPrompt(value="b", harm_categories=["hate_speech"]),
SeedPrompt(value="c", harm_categories=["whatever"])]
await memory.add_seeds_to_memory_async(seeds=seeds, added_by="t")
memory.remove_seeds_from_memory(harm_categories=["hate"]) # removes all 3
Suggested fix: when exact=True (the default for removes), match whole list elements using the existing _get_condition_json_array_match helper, and leave get_seeds as is.
- Lenguaje dominante
- Python
- Estrellas
- 4.5k
- Forks
- 896
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 206
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/PyRIT#2888 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 91/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Bug: triage GUI help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
microsoft/PyRIT#2868 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/PyRIT
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
bot-found bug priority: P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
madenvel/KalinkaPlayer#179 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ls1intum/edutelligence#1098 ·
Los mantenedores suelen responder en 1 día