diff --git a/docs/documentation/09_sistema_de_plugins.md b/docs/documentation/09_sistema_de_plugins.md index 8f440fd..a89016e 100644 --- a/docs/documentation/09_sistema_de_plugins.md +++ b/docs/documentation/09_sistema_de_plugins.md @@ -82,6 +82,12 @@ Na `MainShellFrame`, `createPlugin(ConnectionManager, PluginWorkspace)` registra Em abas de **recebimento** (ex. screencast `view:`), `PluginRoutingPanel.bindReceiveSession` deixa IP e forma de envio somente leitura, refletindo o que o remetente usou. +## Segurança e plugins externos (aula) + +- Instale apenas JARs de fontes confiáveis (`PITIUPI_HOME/plugins` ou aba Configurações). +- O núcleo desserializa mensagens de rede com classloader por plugin; mensagens malformadas devem ser ignoradas, mas **não** há sandbox — um JAR malicioso tem o mesmo poder de um programa local. +- Não há atualização automática de plugins pelo núcleo na v1. + ### Avisos de sessão (D24) `SessionNoticeMessage` (núcleo) sinaliza fases `START` / `END` por `pluginId` e canal (`SessionNoticeChannel`, ex. `screen_cast`). Plugins registram o tipo em `getMessages()` e reagem na UI (ex. fechar aba de recebimento ao `END` de compartilhamento). Campos incluem remetente, escopo (broadcast/direto) e `TransportMode` observado. diff --git a/docs/documentation/engineering_backlog.md b/docs/documentation/engineering_backlog.md index a2c62b3..e796b0f 100644 --- a/docs/documentation/engineering_backlog.md +++ b/docs/documentation/engineering_backlog.md @@ -2,10 +2,11 @@ | Item | Prioridade | Notas | | --- | --- | --- | -| Testes JUnit para desserialização e framing TCP | Média | Sem rede real | +| Testes JUnit framing TCP com socket mock | Média | Rede real coberta manualmente na LAN | | CI (GitHub Actions) com `ant jar` + `ant test` | Baixa | Requer imagem com Ant/JDK | -| Captura de tela nativa no WSL | Baixa | Limitação de ambiente; validar em Windows/Linux com display | +| REQ-11 badges na lista lateral | Baixa | D23 — ver `decision-register.md` | +| Automação GUI 2 instâncias / 2 PCs | Baixa | Limitação Swing; aceite manual | -Itens concluídos recentemente: shell com abas e peer actions (D16–D18); chat unificado (D19); docs alinhadas à shell v1 (Onda G); suíte JUnit no núcleo (`ant test`); tutorial Ping em [17_tutorial_ping_aula.md](17_tutorial_ping_aula.md). +**Concluído (refinamento v1):** shell abas + peer actions; SPI `PluginWorkspace`; suíte JUnit no núcleo; tutorial Ping; deploy LAN documentado no repositório de desenvolvimento do mantenedor (fora deste clone). Ao fechar um item, atualizar esta tabela e o doc técnico relacionado. diff --git a/pitiupi/test/pitiupi/errors/ErrorCodeTest.java b/pitiupi/test/pitiupi/errors/ErrorCodeTest.java new file mode 100644 index 0000000..0cc3330 --- /dev/null +++ b/pitiupi/test/pitiupi/errors/ErrorCodeTest.java @@ -0,0 +1,18 @@ +package pitiupi.errors; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ErrorCodeTest { + + @Test + void userMessagesInPortuguese() { + for (ErrorCode code : ErrorCode.values()) { + String msg = code.getUserMessage(); + assertFalse(msg.isBlank()); + assertTrue(msg.length() > 5); + } + } +}