RelayRoom keeps a revoked Burrow forwarding when its sweep's row read fails
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
Start with RelayRoom.#sweep and RelayRoom.alarm in hosted/server/relay-room.ts, then read the timing constants in hosted/server/relay-room-contract.ts and the stalled row-read test in hosted/server/tests/relay-room.test.ts. Resolve the fail-open versus retry policy, update the code and test, and align the Relay boundary FAIL IF in docs/specs/security-hosted.md with the chosen behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Code: RelayRoom.#sweep in hosted/server/relay-room.ts; the alarm in RelayRoom.alarm re-arms RELAY_ROOM_SWEEP_MS (one hour, hosted/server/relay-room-contract.ts) out whatever the sweep did.
Failure path: a Burrow is removed or de-entitled by any path that does not reach closeBurrow (an entitlement change, or a removal whose closeBurrow RPC failed, which the DELETE route logs and answers 204 anyway). The next alarm calls #sweep. #rows throws (database error, or RELAY_ROW_READ_TIMEOUT_MS passes), the catch logs "could not sweep" and returns, and alarm() arms the next sweep an hour later. The socket keeps forwarding authenticated frames past the sweep it should have died at. If the database stays unreachable, it keeps forwarding through every later sweep too.
This breaks the docs/specs/security-hosted.md -> "Relay boundary" FAIL IF: "a removed or de-entitled Burrow's [socket] outlives the next sweep, at most RELAY_ROOM_SWEEP_MS while any Burrow socket is held". hosted/server/tests/relay-room.test.ts ("a stalled row read … leaves the sweep for later, the object's sockets open") pins the current behavior. Keeping sockets open on a failed read was a deliberate choice: #rows says a stalled read must not reset "the object and every socket it holds".
Suggested fix: decide the policy first, then change the code, test, and FAIL IF together. Options:
- Fail closed. On a failed sweep read, retire every held Burrow with a retryable close code. Each one reconnects through the upgrade, which rechecks its row under
blockConcurrencyWhileand is refused while the database is down. This meets the FAIL IF exactly, at the cost of dropping every session during a database blip. - Retry soon. On failure, arm the alarm at
now + RELAY_ROW_READ_TIMEOUT_MS(or about a minute), not an hour, and fail closed only after N consecutive failures or onceRELAY_ROOM_SWEEP_MShas passed since the last good sweep. Then reword the FAIL IF to "withinRELAY_ROOM_SWEEP_MSof the last successful sweep".
Option 2 keeps the bound at one sweep interval, or a small multiple of it, without resetting sockets on a single slow query.
Found while trimming #904, which had parked this as a spec "Known gap".
🤖 Generated with Claude Code
- Linguagem predominante
- TypeScript
- Estrelas
- 5
- Forks
- 1
- Merge médio
- 12h 2min
- PRs com merge (30d)
- 387
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de diffplug/dormouse
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
diffplug/dormouse#912 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 18/100
Mantenedores costumam responder em até 1 dia
-
Consider supporting OSC 7501Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
diffplug/dormouse#1079 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 18/100
diffplug/dormouse#1078 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
diffplug/dormouse#1076 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de diffplug/dormouse
Issues semelhantes
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
vicharanashala/ajrasakha#1439 ·
Mantenedores costumam responder em até 1 dia
-
Add: TV5Monde AsieAbertaapproved check:passed streams:add
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
codex-team/editor.js#3037 ·
-
complexity: trivial good first issue impact: low
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
ueberdosis/tiptap#8522 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
wormhole-foundation/wormhole#5062 ·
Mantenedores costumam responder em até 1 dia