BUG: Memory curator misses upcoming anniversaries across year boundaries and on leap days
Los mantenedores suelen responder en 10 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 83/100
Línea de trabajo
Empieza por backend/app/utils/memory_curator.py y lee _semantic_surface_date() junto con la configuración EVENT_ANNIVERSARY_LOOKAHEAD_DAYS. Reproduce el caso del 30 de diciembre del issue y después comprueba el comportamiento de la función para el 29 de febrero en un año no bisiesto. Se considera terminado cuando ambos casos devuelven la próxima fecha de aniversario esperada y se conserva el margen de tres días.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Description
In backend/app/utils/memory_curator.py, _semantic_surface_date() computes whether a semantic event's anniversary is within EVENT_ANNIVERSARY_LOOKAHEAD_DAYS (3 days) of the reference date.
However, the calculation only evaluates event_start.date().replace(year=reference.year):
- Year Boundary: If the reference date is in late December (e.g. Dec 30) and an event happened on January 1, the upcoming anniversary on Jan 1 of the following year (2 days away) is calculated as Jan 1 of the current year (
delta = -363). This causes the lookahead condition0 <= delta <= 3to evaluate toFalse, prematurely surfacing the memory today instead of on its upcoming anniversary. - Leap Day (Feb 29): When an event occurred on Feb 29, evaluating it in a non-leap year raises a
ValueError, which immediately returnsreference.isoformat(), discarding the lookahead window instead of falling back to Feb 28.
Steps to Reproduce
- Call
_semantic_surface_date(reference=date(2026, 12, 30), event_start=datetime(2024, 1, 1)). - Notice the anniversary is 2 days away (January 1, 2027), which is within the 3-day lookahead window.
- Observe output is
"2026-12-30"(today) instead of"2027-01-01".
Expected Behavior
The function should evaluate the next upcoming anniversary in reference.year + 1 when the current year's date has passed, and map leap day anniversaries to Feb 28 in non-leap years.
Proposed Fix
Check reference.year + 1 if anniversary < reference, and catch ValueError to map Feb 29 to Feb 28.
Record
- I agree to follow this project's Code of Conduct
- Lenguaje dominante
- Python
- Estrellas
- 320
- Forks
- 771
- Merge medio
- 9 d 5 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 AOSSIE-Org/PictoPy
-
BUG: Add images to album: success message shows requested count, not number actually addedPosiblemente ocupada @avika269 la tomó hace 3 días. Abiertobug enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
AOSSIE-Org/PictoPy#1740 · 2 comentarios ·
Los mantenedores suelen responder en 10 días
-
BUG: /sync-folder does not validate the supplied folder_idPosiblemente ocupada @sathvikn113 la tomó hace 4 días. Abiertobug possible-duplicate
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AOSSIE-Org/PictoPy#1731 · 5 comentarios ·
Los mantenedores suelen responder en 10 días
-
DOC: update deprecated libgl1-mesa-glx package and stale setup.md referencesPosiblemente ocupada @avika269 la tomó hace 4 días. Abiertodocumentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 65/100
AOSSIE-Org/PictoPy#1730 · 5 comentarios ·
Los mantenedores suelen responder en 10 días
-
BUG: onSuccess in useMutationFeedback triggers repeated executions / infinite re-render loopAbiertobug possible-duplicate
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AOSSIE-Org/PictoPy#1729 · 4 comentarios ·
Los mantenedores suelen responder en 10 días
-
BUG: Album create/update accept a blank or whitespace-only namePosiblemente ocupada @sayxnn17 la tomó hace 3 días. Abiertobug possible-duplicate
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
AOSSIE-Org/PictoPy#1722 · 5 comentarios ·
Los mantenedores suelen responder en 10 días
Todos los issues de AOSSIE-Org/PictoPy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
needs-format
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Niko1221/Strata#6475 · 1 comentario ·
Los mantenedores suelen responder en 6 días
-
skills: _skill_body cuts the frontmatter short when a description contains ---Posiblemente ocupada @nurlanmnn la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zilliztech/memsearch#876 ·
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 75/100
acl-org/acl-anthology#11025 ·
Los mantenedores suelen responder en 1 día