#6946 uncached-var dedupe: every uncached var is re-sent once right after hydrate, dict key order defeats the dedupe, and the _UNKEYABLE_VALUE branch is unreachable
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design, testing-qa
Línea de trabajo
Start with State.hydrate, _get_resolved_delta, and _delta_value_key, then reproduce the behavior using event_loop/scripts/wsdrive.py and the /dedupe page, including Unkeyable.u_obj. Compare the hydrate and subsequent frames, dict ordering, and null-serializing values; done means the three reported cases match the expected behavior and the existing #6946 scenarios remain valid.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Three polish items in the #6946 delta dedupe for @rx.var(cache=False), found while verifying it end to end (the feature itself works: ~42% fewer inbound websocket bytes on the campaign's click sequence, correct per client token, survives reload and redis multi-worker).
- Every uncached var is re-sent once right after hydrate.
State.hydrateemitsself.dict(), which does not go through the delta recording, so the very next event (on_load_internal, fired immediately) re-sends all of them: a 3 318 B hydrate frame followed by a 447 B frame containing only the uncached vars. One redundant frame per page load; on reconnect with a warm memo it does not appear. - Dict key order defeats the dedupe.
_delta_value_keydigests the JSON text, so{"a": 1, "b": 2}and{"b": 2, "a": 1}have different keys and such a var is re-sent on every event, while the changelog says the value is "only included in the delta when it actually changed". Either canonicalize (sort_keys=True) or document it. - The
_UNKEYABLE_VALUEbranch is dead, and unserializable values dedupe against each other._delta_value_keytreats ajson_dumpsexception as "always send", but reflex'sjson_dumpsnever raises for unknown types; it returnsnullforcomplex, a bareobject()or an arbitrary class instance. Two different unserializable values therefore key identically: acomplex(n, 1)var is never re-sent across three bumps.
To Reproduce
The campaign's elapp app and websocket-frame driver: event_loop/ (scripts/wsdrive.py, the /dedupe page; the Unkeyable.u_obj var for item 3), NOTES.md sections "#6946" and "anomalies" 1 to 3.
Expected behavior
Hydrate records what it sends (or on_load_internal skips values the hydrate frame carried); dict values are keyed canonically or the changelog states the limitation; values that serialize to null are either always sent or keyed by identity.
Specifics
- Reflex 0.9.12a1 and 0.9.12a2 (#6946 is new in 0.9.12, so no baseline); after #7216 the recording moved to
_get_resolved_delta, which does not change any of the three - Python 3.11.15, Linux
Additional context
0.9.12a1 pre-release QA, event_loop cluster, LOW. Full write-up: FINDINGS.md.
- Lenguaje dominante
- Python
- Estrellas
- 28.9k
- Forks
- 1.8k
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 215
Preparar el entorno
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
- 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 reflex-dev/reflex
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
reflex-dev/reflex#7509 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
PageContext.get() / CompileContext.get() outside a compile raise a bare `LookupError: <ContextVar name='PageContext' ...>` instead of a messagePosiblemente ocupada @harsh21234i la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
reflex-dev/reflex#7489 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
window.onerror in utils/state.js throws when the error event carries no Error object (e.g. the benign ResizeObserver loop), so nothing reaches handle_frontend_exceptionPosiblemente ocupada @flcrom la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
reflex-dev/reflex#7482 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
reflex-dev/reflex#7480 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
rx.input(auto_complete=...): a bool is dropped by React, and a string raises a TypeErrorPosiblemente ocupada @benedikt-bartscher la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
reflex-dev/reflex#7417 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de reflex-dev/reflex
Issues similares
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
darnitdevorg/darnit#587 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
accessibility good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
llm translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug bug-hunt
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día