Repository navigation
Conversation
This branch has not been 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.
P0-3 (keepmind): log de auditoria do Corp sem conteúdo (só hash)
Origem:
BRIEF-P0-THOR.md/MELHORIAS-KEEPMIND.md(14/11/2026). Esforço: S. Base:main@ 5aade2b.Problema
invokeCorpMcpToolgrava emops/mcp-invocations.jsonlaté 500 caracteres do retorno de qualquer tool não-CRM. Assim, trechos das notas da memória corporativa vazam para fora do vault, no log.Onde (main atual)
corp/mcp-runtime.mjs:41:detail = crm_ ? '[CRM result omitted]' : out.slice(0, 500).corp/mcp-runtime.mjs:19-23:auditMcp(append JSONL).corp/mcp-runtime.mjs:45: no erro,detail = e.message. Avaliar se a mensagem pode carregar conteúdo; se puder, registrar só a classe ou código do erro e o hash.O que fazer
detailpassa a guardar só{ tool, bytes, sha256 }para qualquer tool, CRM incluído. O sha256 é do retorno serializado.Critérios de aceite (do brief)
npm run test:crm-browser, ou o smoke CRM equivalente).npm testenpm run typecheckverdes.Testes esperados
sb_readem um vault sintético com uma nota contendo um marcador único (ex.:CANARY-<random>) ⇒ a linha do JSONL não contém o marcador nem substring dele, e contémbytesesha256corretos (recalculados no teste).sb_searche uma toolcrm_*.Regras (obrigatórias)
.github/workflows.npm test,npm run typecheck(e lint, se houver) e registrar no PR quais falhas já existiam no main.git diff --checklimpo; rodar gitleaks no diff se disponível.PR draft só com a spec (docs/p0/p0-3-audit-hash.md): nenhum código foi alterado. A implementação fica com o Codex do Gustavo nesta mesma branch. Não fazer merge sem o OK do Gustavo.