Repository navigation
fix(edge): a entrada que o navegador não guarda vira uma página, não um laço - #1214
Merged
Merged
Conversation
…um laço
The edge had no way out when the session cookie did not come back: every request without a
session went to the Hub, which handed a new pass, and the chain ran until the browser stopped at
"too many redirects". The redeemed pass now lands on /__conexus/entrada with the hash of the
session it set. A browser that sends that session back goes on to /; one that sends none, or a
stale one, gets a 401 page ("Este navegador não guardou a sua entrada.", "Tentar de novo") and a
log line EDGE_SESSION_NOT_KEPT with the host and the rounds. The mark travels in the address, so
it does not depend on the cookie that failed.
Founder decision 3.B of the app auth study (2026-11-21). References: oauth2-proxy and Supabase
send a failed exchange to an error page, Vouch counts tries, vibesdk answers 401.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…-pagina # Conflicts: # apps/edge/src/dispatch.ts # apps/edge/src/dispatcher-tab.test.ts # apps/edge/src/dispatcher.test.ts
This was referenced Nov 22, 2026
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.
Why
Decisão do fundador (2026-11-21, "4. B"; decisão 3.B do estudo da entrada do app): quando o navegador não guarda a sessão do app, a borda não tinha saída. Cada pedido sem sessão voltava ao Hub, que dava outra passagem, até o navegador parar em "too many redirects".
What changed
/__conexus/entrada?sessao=<sha256 da sessão>. O marcador vai no endereço, então não depende do cookie que falhou./__conexus/entrada, a borda confere o cookie recebido com o hash. Se for a sessão gravada, segue com 303 para/. Se não veio nenhuma, ou veio outra (um cookie antigo que o navegador não apaga), a segunda volta seguida vira a página 401 e não volta ao Hub.{"level":30,"msg":"EDGE_SESSION_NOT_KEPT","status":401,"host":"<rótulo>","rounds":2}.docs/explanation/app-contract-and-dispatcher.mddescreve a entrada.Textos para o fundador aprovar (página nova; a tela está
apps/edge/src/pages.ts):/): "Tentar de novo"Scope
Só a borda (
apps/edge). Hub, contrato e banco não mudam. É uma página nova sem cartão, por decisão direta do fundador, e o revisor confere as linhas abaixo (AGENTS.md).oauthproxy.go:938-946: sem o cookie na volta, página de erro "Please try again" (aberto). Vouch v0.50.0handlers/login.go:34,:76-84,:97-101: conta as voltas no próprio cookie e para em 6 com 400 (aberto); aqui o marcador vai no endereçofailurePage+ um link (retry, o botão ePageLogemapps/edge/src/pages.ts)worker/api/handlers/space-preview.ts:171-174@9da158d8, o pin dedocs/reference/stack.md(aberto)Tradeoffs
passagem → entrada → /), na mesma origem.roundsvale sempre 2 por construção: a página substitui a segunda volta. Contar mais exigiria o Hub devolver um marcador, o que muda o contrato.WWW-Authenticate, como na vibesdk.Blast Radius
Toda entrada em app publicado e na Prévia passa a ter mais um salto. Quem guarda o cookie vê o mesmo app. Quem não guarda passa a ver a página em vez do erro do navegador.
Verification
dispatcher-tab.test.tssegue os 303 como uma aba: um navegador que recusa o cookie da sessão e outro que devolve sempre o cookie antigo param na página em 4 saltos e gravam uma linha de log. Na base, os dois rodam até o limite de saltos (vermelho, conferido).main(PR 1213, as duas formas do cookie): edge 88/88.tests/e2e/app.test.tseapp-open.test.ts6/6, com o Chromium real.npm run checkverde atécheck:workflows, que precisa de Docker e não roda aqui (nenhum workflow mudou)./(5).https://claude.ai/code/session_012gWBFUCp42GkXrzUfg8PLE
Generated by Claude Code