deploy: sidecar de pairing NIP-AB (arregla el QR del móvil) - #6
Merged
Conversation
Escanear el QR en Buzz Mobile falla con 'WebSocket connection failed: HTTP error: 404 Not Found'. Causa: sin BUZZ_PAIRING_RELAY_URL, el relay omite pairing_relay_url del NIP-11 y los clientes caen al fallback legacy de mismo-host /pair — una ruta que el relay nunca sirvió. Upstream nombra la falla en crates/buzz-relay/src/nip11.rs. buzz-pair-relay ya viene en la imagen base; esto solo lo arranca. Stateless, sin volumen, sin DB. El entrypoint existe porque el default del binario (127.0.0.1:5000) es incorrecto en Railway por partida doble: loopback no es alcanzable por el edge, y el puerto llega en $PORT en runtime. Verificado con build + run reales en la caja Arch: buzz-pair-relay listening on 0.0.0.0:5055 handshake WebSocket -> HTTP 101 (upgrade aceptado) Claude-Session: https://claude.ai/code/session_012sqAd3AqBD5ZEGzt8Ewhn9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Escanear el QR en Buzz Mobile falla con
WebSocket connection failed: HTTP error: 404 Not Found.Causa raíz
Sin
BUZZ_PAIRING_RELAY_URL, el relay omitepairing_relay_urlde su NIP-11 y losclientes caen al fallback legacy de mismo-host
/pair— ruta que el relay nunca sirvió.Upstream nombra la falla en
crates/buzz-relay/src/nip11.rs:Confirmado contra el relay vivo:
Qué agrega
Un servicio Railway para
buzz-pair-relay, el sidecar NIP-AB. Stateless — sin volumen,sin DB, estado de pairing solo en memoria mientras dura el handshake.
El binario ya viene en la imagen base, así que esto no requiere el upgrade de upstream
(PR #5) — es independiente a propósito, para que el QR no quede rehén de 447 commits.
BUZZ_IMAGEqueda byte-idéntico al del relay principal: un drift entre los dos sería unaversion skew que nadie pensaría en revisar.
Por qué un entrypoint y no un ENV
El default del binario es
127.0.0.1:5000, mal por partida doble en Railway: loopback noes alcanzable por el edge (502 con el contenedor viéndose sano), y el puerto llega en
$PORTen runtime, así que no puede hornearse en build time.Verificación — build y run reales, no revisión de código
En la caja Arch, con Docker:
101 = upgrade aceptado. Es exactamente la petición que hoy devuelve 404 en el celular.
Falta después del merge
buzzapuntando a este Dockerfilewss://<host>BUZZ_PAIRING_RELAY_URL=wss://<host>en el relay principal + redeployNota de exposición
El endpoint es público y no autenticado por diseño de NIP-AB — upstream corre
wss://pairing.buzz.xyzigual. La seguridad está en el handshake, no en la alcanzabilidad.https://claude.ai/code/session_012sqAd3AqBD5ZEGzt8Ewhn9