Repository navigation
feat: paciente vê "Atendido" — ACS conclui o atendimento do alerta (#76) - #85
Merged
Merged
Conversation
This was referenced Oct 16, 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.
Fecha #76.
O que muda
alerts.resolve. Ele leva o alerta deacknowledgedpararesolved, só para o ACS da microárea do token (INV-01) e só depois do ACK: umpendingé recusado com "Confirme o recebimento antes de concluir o atendimento." (INV-03). A decisão é tomada sobSELECT … FOR UPDATEe auditada na mesma transação (resolved,already_resolved,denied_not_acknowledged). Repetir é idempotente e devolve oresolvedAtoriginal. Alerta inexistente, de outra microárea ou com id que não é UUID devolveresolved: falsesem gravar nada, como o ACK.resolvedparaacknowledged(reentrega MQTT, toque atrasado em outro aparelho).alerts.statusFordevolveresolvedAt. OmaxChangedAtdo pulso do backoffice passa a andar com a conclusão.PROGRESS.md,spec/lgpd_data_audit.md(resolvedAt), relatório de lacunas (RF05 e MVP-STATUS entregues; M2.1 segue parcial só pelo SMS) e os doisCLAUDE.md.Migração
20261016155336452: sóALTER TABLE "alerts" ADD COLUMN "resolvedAt"(anulável, semDROP). Volumes existentes não perdem dados.Verificação
dart test -j 1no backend: 1381 passando;dart analyzesem erros nem avisos.flutter test: ACS 553, paciente 260, admin 459;flutter analyzelimpo nos três.python3 scripts/qa/cobertura_prd.py --final: 64 IDs, ok.Abertos (adiados da revisão)
status: acknowledged, embora a linha no banco sigaresolved. Num segundo aparelho, isso faz o botão de concluir reaparecer até o próximo toque, que recebealready_resolved.acknowledged, então um alerta concluído some dele sem entrar em outro contador. Falta um contador "Concluídos".acsIde gravaacknowledgedna trilha. Isso já acontecia antes desta PR, e o status não regride.