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)
|
**Última Sessão:** 2026-02-01
|
||||||
**Versao Actual:** 1.3.16
|
**Versão Actual:** 1.3.17
|
||||||
**Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO**
|
**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** ✅
|
### Investigação Feita (01 Fev)
|
||||||
- Todos os 6 bugs corrigidos confirmados no código
|
|
||||||
- INSERT statements com colunas NOT NULL correctas
|
|
||||||
- Lógica de criação de IDs correcta
|
|
||||||
|
|
||||||
2. **Testes Unitários** ✅
|
Documento de teste: `https://hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b`
|
||||||
- 209/209 testes passam
|
|
||||||
- Cobertura: security, validation, pagination, query-builder, tools-structure
|
|
||||||
|
|
||||||
3. **Servidor HTTP** ✅
|
**Campos verificados na BD - TODOS CORRECTOS:**
|
||||||
- Inicia correctamente
|
|
||||||
- 164 tools registadas
|
|
||||||
- Todos os módulos carregados
|
|
||||||
|
|
||||||
4. **Builds** ✅
|
| Campo | Valor | Status |
|
||||||
- TypeScript compila sem erros
|
|-------|-------|--------|
|
||||||
- dist/ actualizado
|
| `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 |
|
### Próximos Passos de Debug
|
||||||
|-----|----------|-------|----------------|
|
|
||||||
| 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` ✅ |
|
|
||||||
|
|
||||||
---
|
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:
|
// src/utils/markdown-to-prosemirror.ts - Novo conversor:
|
||||||
|
- Headings, paragraphs, lists
|
||||||
1. **Reiniciar sessão Claude Code** (para recarregar MCPs)
|
- Checkboxes (checkbox_list, checkbox_item)
|
||||||
2. **Verificar túnel:** `./start-tunnel.sh status`
|
- Tables (table, tr, th, td) - v1.3.16
|
||||||
3. **Carregar tool:** `ToolSearch: select:mcp__outline-postgresql__create_document`
|
- Code blocks, blockquotes, hr
|
||||||
4. **Testar operação de escrita**
|
- Inline: strong, em, code_inline, link
|
||||||
|
|
||||||
### 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: "" })
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Tools Testadas (~95)
|
## Versões Recentes
|
||||||
|
|
||||||
| Categoria | Tools | Status |
|
| Versão | Data | Alteração |
|
||||||
|-----------|-------|--------|
|
|--------|------|-----------|
|
||||||
| **Read Operations** | | |
|
| 1.3.17 | 01-02 | Fix editorVersion (não resolveu) |
|
||||||
| Documents | list, get, search | ✅ |
|
| 1.3.16 | 01-02 | Suporte tabelas no conversor |
|
||||||
| Collections | list, get | ✅ (fixed) |
|
| 1.3.15 | 31-01 | Fix mark types (strong/em) |
|
||||||
| Users | list, get | ✅ |
|
| 1.3.14 | 31-01 | Conversor Markdown→ProseMirror |
|
||||||
| Groups | list, get | ✅ |
|
| 1.3.13 | 31-01 | Fix revisionCount + content |
|
||||||
| 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 |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## IDs Úteis para Testes
|
## IDs Úteis
|
||||||
|
|
||||||
### Team
|
| Recurso | ID |
|
||||||
- **Team ID:** `c3b7d636-5106-463c-9000-5b154431f18f`
|
|---------|-----|
|
||||||
- **Team Name:** Descomplicar
|
| Team | `c3b7d636-5106-463c-9000-5b154431f18f` |
|
||||||
|
| User | `e46960fd-ac44-4d32-a3c1-bcc10ac75afe` |
|
||||||
### User
|
| Collection Teste | `27927cb9-8e09-4193-98b0-3e23f08afa38` |
|
||||||
- **User ID:** `e46960fd-ac44-4d32-a3c1-bcc10ac75afe`
|
| Doc problemático | `a2321367-0bf8-4225-bdf9-c99769912442` |
|
||||||
- **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 |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Comandos Úteis
|
## Comandos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Rebuild após alterações
|
# Build
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
# Correr testes
|
# Testes
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
# Verificar tunnel SSH
|
# Túnel
|
||||||
./start-tunnel.sh status
|
./start-tunnel.sh status
|
||||||
|
|
||||||
# Iniciar tunnel se necessário
|
# Query BD via Node
|
||||||
./start-tunnel.sh start
|
DATABASE_URL="postgres://postgres:9817e213507113fe607d@localhost:5433/descomplicar" node -e "
|
||||||
|
const { Pool } = require('pg');
|
||||||
# Testar servidor HTTP
|
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
||||||
DATABASE_URL="postgres://postgres:***@localhost:5433/descomplicar" node dist/index-http.js
|
pool.query('SELECT * FROM documents WHERE id = \\'ID\\'').then(console.log);
|
||||||
# Depois: curl http://localhost:3200/health
|
"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 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
|
## Prompt Para Continuar
|
||||||
|
|
||||||
```
|
```
|
||||||
Continuo os testes do MCP Outline PostgreSQL.
|
Continuo debug do MCP Outline PostgreSQL.
|
||||||
|
|
||||||
Path: /home/ealmeida/mcp-servers/mcp-outline-postgresql
|
Path: /home/ealmeida/mcp-servers/mcp-outline-postgresql
|
||||||
Versão: 1.3.6
|
Versão: 1.3.17
|
||||||
Estado: Código 100% validado, pronto para testes MCP
|
|
||||||
|
|
||||||
ESTADO ACTUAL:
|
BUG PENDENTE: Documentos criados via MCP mostram "Not found" ao abrir.
|
||||||
- 6 bugs corrigidos e verificados no código fonte
|
- Documento teste: a2321367-0bf8-4225-bdf9-c99769912442
|
||||||
- 209/209 testes unitários passam
|
- URL: hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b
|
||||||
- Servidor HTTP funcional (164 tools)
|
- Todos os campos verificados parecem correctos
|
||||||
|
- editorVersion já foi corrigido para 15.0.0
|
||||||
|
|
||||||
TAREFA: Testar operações de escrita via MCP
|
PRÓXIMO PASSO: Verificar logs do servidor Outline ou comparar
|
||||||
1. Verificar túnel: ./start-tunnel.sh status
|
inserção completa com documento criado via UI.
|
||||||
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
|
|
||||||
|
|
||||||
Se MCP não disponível, as tools precisam ser carregadas numa nova sessão.
|
Ver CONTINUE.md para detalhes da investigação.
|
||||||
|
|
||||||
Ver CONTINUE.md para detalhes completos.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*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