docs: Update CONTINUE.md with pending bug status
Document "Not found" bug still unresolved despite all verified fields: - urlId, revisionCount, collaboratorIds, content, editorVersion all correct - Need to check Outline server logs or compare with UI-created document Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
233
CONTINUE.md
233
CONTINUE.md
@@ -1,205 +1,130 @@
|
||||
# MCP Outline PostgreSQL - Continuacao de Testes
|
||||
# MCP Outline PostgreSQL - Continuação
|
||||
|
||||
**Ultima Sessao:** 2026-02-01 (actualizado)
|
||||
**Versao Actual:** 1.3.16
|
||||
**Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO**
|
||||
**Última Sessão:** 2026-02-01
|
||||
**Versão Actual:** 1.3.17
|
||||
**Estado:** ⚠️ Bug "Not found" por resolver
|
||||
|
||||
---
|
||||
|
||||
## Estado Actual
|
||||
## Bug Pendente: Documentos "Not found"
|
||||
|
||||
### Validacao Completa (31 Jan - tarde/noite)
|
||||
### Sintoma
|
||||
Documentos criados via MCP aparecem na listagem mas ao abrir mostram "Not found".
|
||||
|
||||
1. **Código Fonte Verificado** ✅
|
||||
- Todos os 6 bugs corrigidos confirmados no código
|
||||
- INSERT statements com colunas NOT NULL correctas
|
||||
- Lógica de criação de IDs correcta
|
||||
### Investigação Feita (01 Fev)
|
||||
|
||||
2. **Testes Unitários** ✅
|
||||
- 209/209 testes passam
|
||||
- Cobertura: security, validation, pagination, query-builder, tools-structure
|
||||
Documento de teste: `https://hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b`
|
||||
|
||||
3. **Servidor HTTP** ✅
|
||||
- Inicia correctamente
|
||||
- 164 tools registadas
|
||||
- Todos os módulos carregados
|
||||
**Campos verificados na BD - TODOS CORRECTOS:**
|
||||
|
||||
4. **Builds** ✅
|
||||
- TypeScript compila sem erros
|
||||
- dist/ actualizado
|
||||
| Campo | Valor | Status |
|
||||
|-------|-------|--------|
|
||||
| `id` | `a2321367-0bf8-4225-bdf9-c99769912442` | ✅ UUID válido |
|
||||
| `urlId` | `c051be722b` | ✅ 10 chars |
|
||||
| `revisionCount` | `1` | ✅ |
|
||||
| `collaboratorIds` | `[userId]` | ✅ Array preenchido |
|
||||
| `publishedAt` | `2026-02-01T13:03:58.198Z` | ✅ Definido |
|
||||
| `teamId` | `c3b7d636-5106-463c-9000-5b154431f18f` | ✅ |
|
||||
| `content` | ProseMirror JSON válido | ✅ 15 nodes |
|
||||
| `editorVersion` | `15.0.0` | ✅ Adicionado |
|
||||
| `revisions` | 1 entrada | ✅ |
|
||||
| `documentStructure` | Incluído na collection | ✅ |
|
||||
|
||||
### Bugs Corrigidos (CONFIRMADOS)
|
||||
**Comparação com documento funcional:**
|
||||
- Único campo diferente era `editorVersion` (null vs 15.0.0)
|
||||
- Corrigido para `15.0.0` - MAS continua a falhar
|
||||
|
||||
| Bug | Ficheiro | Linha | Fix Verificado |
|
||||
|-----|----------|-------|----------------|
|
||||
| 1 | `src/tools/auth.ts` | - | Removida `updatedAt` inexistente ✅ |
|
||||
| 2 | `src/tools/subscriptions.ts` | - | LIMIT 25 adicionado ✅ |
|
||||
| 3 | `src/tools/collections.ts` | - | `documentStructure` removido da list ✅ |
|
||||
| 4 | `src/tools/documents.ts` | 239-251 | `id`, `urlId`, `teamId` + NOT NULLs ✅ |
|
||||
| 5 | `src/tools/collections.ts` | 272-281 | `id`, `urlId`, `maintainerApprovalRequired` ✅ |
|
||||
| 6 | `src/tools/shares.ts` | 276-292 | `id`, `urlId`, `allowIndexing`, `showLastUpdated` ✅ |
|
||||
### Próximos Passos de Debug
|
||||
|
||||
---
|
||||
1. **Verificar logs do Outline** - Pode haver erro específico no servidor
|
||||
2. **Comparar TODOS os campos** - Pode haver campo não verificado
|
||||
3. **Testar criar documento via UI** - Comparar inserção completa
|
||||
4. **Verificar Redis/cache** - Outline pode usar cache
|
||||
|
||||
## Proximos Passos
|
||||
### Código Adicionado (v1.3.16-1.3.17)
|
||||
|
||||
### Pronto para Producao
|
||||
```typescript
|
||||
// src/tools/documents.ts - Campos adicionados ao INSERT:
|
||||
- editorVersion: '15.0.0'
|
||||
- content: ProseMirror JSON (via markdownToProseMirror)
|
||||
- collaboratorIds: ARRAY[userId]
|
||||
- revisionCount: 1
|
||||
|
||||
O código está validado e pronto. Para testar via MCP em Claude Code:
|
||||
|
||||
1. **Reiniciar sessão Claude Code** (para recarregar MCPs)
|
||||
2. **Verificar túnel:** `./start-tunnel.sh status`
|
||||
3. **Carregar tool:** `ToolSearch: select:mcp__outline-postgresql__create_document`
|
||||
4. **Testar operação de escrita**
|
||||
|
||||
### Round 4: Edge Cases (Quando MCP disponível)
|
||||
|
||||
```javascript
|
||||
// UUIDs inválidos
|
||||
get_document({ id: "invalid-uuid" })
|
||||
get_document({ id: "" })
|
||||
|
||||
// IDs inexistentes
|
||||
get_document({ id: "00000000-0000-0000-0000-000000000000" })
|
||||
|
||||
// Limites de paginação
|
||||
list_documents({ limit: 0 })
|
||||
list_documents({ limit: 1000 })
|
||||
list_documents({ offset: -1 })
|
||||
|
||||
// Queries vazias
|
||||
search_documents({ query: "" })
|
||||
// src/utils/markdown-to-prosemirror.ts - Novo conversor:
|
||||
- Headings, paragraphs, lists
|
||||
- Checkboxes (checkbox_list, checkbox_item)
|
||||
- Tables (table, tr, th, td) - v1.3.16
|
||||
- Code blocks, blockquotes, hr
|
||||
- Inline: strong, em, code_inline, link
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tools Testadas (~95)
|
||||
## Versões Recentes
|
||||
|
||||
| Categoria | Tools | Status |
|
||||
|-----------|-------|--------|
|
||||
| **Read Operations** | | |
|
||||
| Documents | list, get, search | ✅ |
|
||||
| Collections | list, get | ✅ (fixed) |
|
||||
| Users | list, get | ✅ |
|
||||
| Groups | list, get | ✅ |
|
||||
| Comments | list, get | ✅ |
|
||||
| Shares | list, get | ✅ |
|
||||
| Revisions | list, info | ✅ |
|
||||
| Events | list, stats | ✅ |
|
||||
| Attachments | list, stats | ✅ |
|
||||
| File Operations | list | ✅ |
|
||||
| OAuth | clients_list, auth_list | ✅ |
|
||||
| Auth | info, config | ✅ (fixed) |
|
||||
| Stars | list | ✅ |
|
||||
| Pins | list | ✅ |
|
||||
| Views | list | ✅ |
|
||||
| Reactions | list | ✅ |
|
||||
| API Keys | list | ✅ |
|
||||
| Webhooks | list | ✅ |
|
||||
| Backlinks | list | ✅ |
|
||||
| Search Queries | list, stats | ✅ |
|
||||
| Teams | get, stats, domains | ✅ |
|
||||
| Integrations | list | ✅ |
|
||||
| Notifications | list, settings | ✅ |
|
||||
| Subscriptions | list, settings | ✅ (fixed) |
|
||||
| Templates | list | ✅ |
|
||||
| Imports | list | ✅ |
|
||||
| Emojis | list | ✅ |
|
||||
| User Permissions | list | ✅ |
|
||||
| Analytics | Todos 6 tools | ✅ |
|
||||
| Advanced Search | Todos 6 tools | ✅ |
|
||||
| **Write Operations (código validado)** | | |
|
||||
| Documents | create, update, archive, restore, delete | ✅ código |
|
||||
| Collections | create, delete | ✅ código |
|
||||
| Groups | create, delete | ✅ código |
|
||||
| Comments | create, delete | ✅ código |
|
||||
| Shares | create, revoke | ✅ código |
|
||||
| Stars | create, delete | ✅ código |
|
||||
| Pins | create, delete | ✅ código |
|
||||
| API Keys | create, delete | ✅ código |
|
||||
| Webhooks | create, delete | ✅ código |
|
||||
| Versão | Data | Alteração |
|
||||
|--------|------|-----------|
|
||||
| 1.3.17 | 01-02 | Fix editorVersion (não resolveu) |
|
||||
| 1.3.16 | 01-02 | Suporte tabelas no conversor |
|
||||
| 1.3.15 | 31-01 | Fix mark types (strong/em) |
|
||||
| 1.3.14 | 31-01 | Conversor Markdown→ProseMirror |
|
||||
| 1.3.13 | 31-01 | Fix revisionCount + content |
|
||||
|
||||
---
|
||||
|
||||
## IDs Úteis para Testes
|
||||
## IDs Úteis
|
||||
|
||||
### Team
|
||||
- **Team ID:** `c3b7d636-5106-463c-9000-5b154431f18f`
|
||||
- **Team Name:** Descomplicar
|
||||
|
||||
### User
|
||||
- **User ID:** `e46960fd-ac44-4d32-a3c1-bcc10ac75afe`
|
||||
- **Name:** Emanuel Almeida
|
||||
- **Email:** emanuel@descomplicar.pt
|
||||
|
||||
### Collections
|
||||
| ID | Nome | Docs |
|
||||
|----|------|------|
|
||||
| `951a06ff-d500-4714-9aa0-6b9f9c34318a` | Planeamento-v2 | 282 |
|
||||
| `e27bb4ad-5113-43f8-bd8b-56b3d8a89028` | Planeamento | 180 |
|
||||
| Recurso | ID |
|
||||
|---------|-----|
|
||||
| Team | `c3b7d636-5106-463c-9000-5b154431f18f` |
|
||||
| User | `e46960fd-ac44-4d32-a3c1-bcc10ac75afe` |
|
||||
| Collection Teste | `27927cb9-8e09-4193-98b0-3e23f08afa38` |
|
||||
| Doc problemático | `a2321367-0bf8-4225-bdf9-c99769912442` |
|
||||
|
||||
---
|
||||
|
||||
## Comandos Úteis
|
||||
## Comandos
|
||||
|
||||
```bash
|
||||
# Rebuild após alterações
|
||||
# Build
|
||||
npm run build
|
||||
|
||||
# Correr testes
|
||||
# Testes
|
||||
npm test
|
||||
|
||||
# Verificar tunnel SSH
|
||||
# Túnel
|
||||
./start-tunnel.sh status
|
||||
|
||||
# Iniciar tunnel se necessário
|
||||
./start-tunnel.sh start
|
||||
|
||||
# Testar servidor HTTP
|
||||
DATABASE_URL="postgres://postgres:***@localhost:5433/descomplicar" node dist/index-http.js
|
||||
# Depois: curl http://localhost:3200/health
|
||||
# Query BD via Node
|
||||
DATABASE_URL="postgres://postgres:9817e213507113fe607d@localhost:5433/descomplicar" node -e "
|
||||
const { Pool } = require('pg');
|
||||
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
||||
pool.query('SELECT * FROM documents WHERE id = \\'ID\\'').then(console.log);
|
||||
"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Ficheiros Relevantes
|
||||
|
||||
| Ficheiro | Descrição |
|
||||
|----------|-----------|
|
||||
| `TESTING-GUIDE.md` | Guia completo com status de cada tool |
|
||||
| `CHANGELOG.md` | Histórico de alterações |
|
||||
| `CLAUDE.md` | Instruções para Claude Code |
|
||||
| `src/tools/*.ts` | Implementação das ferramentas |
|
||||
| `src/utils/security.ts` | Validações e segurança |
|
||||
| `dist/` | Código compilado (usado pelo MCP) |
|
||||
|
||||
---
|
||||
|
||||
## Prompt Para Continuar
|
||||
|
||||
```
|
||||
Continuo os testes do MCP Outline PostgreSQL.
|
||||
Continuo debug do MCP Outline PostgreSQL.
|
||||
|
||||
Path: /home/ealmeida/mcp-servers/mcp-outline-postgresql
|
||||
Versão: 1.3.6
|
||||
Estado: Código 100% validado, pronto para testes MCP
|
||||
Versão: 1.3.17
|
||||
|
||||
ESTADO ACTUAL:
|
||||
- 6 bugs corrigidos e verificados no código fonte
|
||||
- 209/209 testes unitários passam
|
||||
- Servidor HTTP funcional (164 tools)
|
||||
BUG PENDENTE: Documentos criados via MCP mostram "Not found" ao abrir.
|
||||
- Documento teste: a2321367-0bf8-4225-bdf9-c99769912442
|
||||
- URL: hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b
|
||||
- Todos os campos verificados parecem correctos
|
||||
- editorVersion já foi corrigido para 15.0.0
|
||||
|
||||
TAREFA: Testar operações de escrita via MCP
|
||||
1. Verificar túnel: ./start-tunnel.sh status
|
||||
2. Carregar tool: ToolSearch select:mcp__outline-postgresql__create_document
|
||||
3. Criar documento de teste na collection Planeamento-v2
|
||||
4. Testar update, archive, restore, delete
|
||||
PRÓXIMO PASSO: Verificar logs do servidor Outline ou comparar
|
||||
inserção completa com documento criado via UI.
|
||||
|
||||
Se MCP não disponível, as tools precisam ser carregadas numa nova sessão.
|
||||
|
||||
Ver CONTINUE.md para detalhes completos.
|
||||
Ver CONTINUE.md para detalhes da investigação.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
*Actualizado: 2026-01-31 ~18:30 | Próxima sessão: Testar MCP tools (se disponíveis)*
|
||||
*Actualizado: 2026-02-01 ~14:30*
|
||||
|
||||
Reference in New Issue
Block a user