Repository navigation
feat(E15): entrar sem entrar, do número da OAB à tela de retomada - #111
Merged
Merged
Conversation
The field existed on the form, travelled in the request and was dropped on arrival, which is worse than
not asking: it promises a check that nothing can perform. The number is now stored on lawyer accounts
only, returned by every account payload as a key that is null for whoever has no number, and carried to
the citizen beside the name of whoever sent the document, which is where it is worth anything: she got a
link from a stranger who says he is a lawyer, and the number is what she can look up at the Ordem.
The phrase `c0.sentYou` had promised `{oab}` since the first screen and had nowhere to read it from. It
now reads it, with a variant that names only the lawyer when there is no number, so the screen never
invents one.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
`ensure_recipient()` compared `visitor.email` with `inv.email`, so an account with no e-mail never passed, and the account the name confirmation creates is exactly that one. Putting the address on the invite switched off the very path this epic exists to open: the person saw the button and got a 403 on touch. The invite now remembers which account claimed it. While nobody has claimed it the old rule by address still holds, which is what remains for invites issued before this column. Claiming is a different act and does not go through the addressee rule: confirming the name IS becoming the addressee, and demanding that she already was would shut the door on whoever holds the link and the name. Undoing a link clears the claim as well. Without that, the account that was undone would keep the invite and the document would stay locked for everyone, including the right person.
…x it (E15)
The button set a local flag and nothing else. The document then sat in the panel with no hint of why it
never moved, and the one person who can fix a document sent to the wrong name had no way to learn of it.
`POST /api/t/{hash}/deny-name` only records. It creates no account, links nothing, and does not lock the
confirmation afterwards: touching the wrong button cannot shut someone out of their own document. Reading
and doubts keep working by design, because the barrier for someone on a borrowed phone is the account, not
the reading; what she loses is the receipt, which claims a name understood the document.
The client swallows a failed record: the warning serves whoever sent the document, and the person who
touched the button cannot get a red bar over a problem that is neither hers nor in her way.
… it (E15) Her account was born with no e-mail and no password, which is the whole point of getting in without typing. The bill for that comes due here: there is no "forgot my password", because there is no password, and no address to send a new link to. The link she already has is the only way back, and keeping it is something she has to do now, while the phone is in her hand. Where this person keeps things is her own WhatsApp conversation with herself, not browser bookmarks she may not know exist and that vanish with the phone. So the screen offers two things: copy and send. The message carries the address and nothing else. `resumeMessage()` accepts the document title and ignores it on purpose: the title of a legal document tends to be the worst part of it to surface in someone's chat thread, and the address alone already does the entire job. The WhatsApp link carries no destination number, so she is the one who picks who it goes to.
…that was missing Three of them already held. The fourth did not: confirming the name twice returned 409, so a double tap on a slow phone told the owner of the document that she is somebody else. The 409 is for the second person, not for the second tap of the same person, and the session handed back is the same one, so repeating the request never drops the first. On the web side the test calls the real `confirm-name` route and checks that the body carries the person and never the token, and that the cookie comes back HttpOnly. That account is the one that needs the rule most: it was born with no e-mail and no password, so the token IS the whole account, and there is no password to change afterwards. The test was checked by mutation, returning the token in the body to watch it go red.
This branch was successfully deployed
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.
Fecha a E15 em 11 de 12. A única tarefa que sobra é a T10, que é Plus: o botão do Google no painel do
advogado. Cinco commits, um por tarefa.
E15-T09 — o número da OAB
O campo existia no formulário, viajava no pedido e era descartado na chegada. Pior do que não perguntar:
promete uma conferência que nada consegue fazer.
cadastro()grava o número só em conta de advogado;public_user()devolve a chave sempre, nula paraquem não tem; a rota pública da cidadã devolve
advogado: {nome, oab}, que é onde o número serve, porqueela recebeu um link de alguém que diz ser advogado. A frase
c0.sentYouprometia{oab}desde a primeiratela e não tinha de onde ler; agora lê, com variante sem número. Mock em paridade.
Eu tinha marcado a T09 como pronta com só a coluna criada. O texto da prova no épico foi corrigido.
E15-T07 — destinatária é uma conta, não um endereço
ensure_recipient()comparavavisitor.emailcominv.email, então conta sem e-mail nunca passava, e aconta que a confirmação de nome cria é exatamente essa. Pôr o endereço no convite desligava o caminho sem
digitação: a pessoa via o botão e recebia 403 ao tocar.
Coluna nova
Invite.usuario_ideinvites.claim(). Enquanto ninguém reivindicou, vale a regra antiga porendereço.
confirm-namepassou a usarensure_valid, porque confirmar o nome é virar a destinatária.DELETE /api/tarefas/{id}/cidadaodevolve o convite ao estado sem dona: sem isso o documento ficariatrancado para todo mundo, e foi um teste que já existia que pegou.
E15-T06 — "esse nome não é o meu"
O botão só marcava uma variável local.
POST /api/t/{hash}/deny-nameregistra e não faz mais nada: nãocria conta, não vincula e não tranca a confirmação depois, porque tocar no botão errado não pode deixar
ninguém de fora do próprio documento. A leitura e as dúvidas seguem. O painel mostra o aviso enquanto
ninguém se vinculou, que é a única coisa que quem enviou pode consertar sozinho.
E15-T08 — como voltar depois
A conta nasce sem e-mail e sem senha, então não existe "esqueci minha senha" e não há endereço para onde
mandar link novo.
/t/{hash}/resumedá a mensagem pronta para ela mandar para si mesma, por WhatsApp oucopiando. A mensagem leva só o endereço:
resumeMessage()aceita o título do documento e o ignora depropósito, porque título de documento jurídico costuma ser o pior pedaço dele para aparecer na conversa de
alguém. O link do WhatsApp vai sem número de destino.
E15-T11 — os quatro casos do critério de aceite
Três já valiam. O quarto não: confirmar o nome duas vezes devolvia 409, ou seja, um toque duplo num celular
lento dizia à dona do documento que ela é outra pessoa. O 409 é para a segunda pessoa, não para a segunda
batida da mesma pessoa, e a sessão devolvida é a mesma.
No web, o teste chama a rota
confirm-namede verdade e confere que o corpo não temtokene que o cookiesai
HttpOnly. Conferido por mutação: devolvendo o token no corpo, o teste fica vermelho.Como verificar
python -m pytest tests_v3.py -q(149 passando),pnpm test(103 passando),pnpm lintepnpm build.O grep do critério de aceite volta vazio:
grep -rn 'type="password"\|inputMode="numeric"\|one-time-code' apps/web/components/Journey.tsx apps/web/app/tFora do repositório, no workspace: ADR-0012 escrito (a T12 pedia
0010, mas 0010 é a âncora OpenTimestamps e 0011 é a base legal de dado sensível), com a linha do ADR-0006no índice dizendo que a parte de login da cidadã foi revista. A afirmação sobre o credenciamento do gov.br
ficou marcada
[NÃO VERIFICADO]: nenhuma fonte da pesquisa a sustenta.