Workspace attach: post a sanitized session attach report to the backend when the outcome settles

Aberta
#1,309 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
api, cli

Direção de pesquisa

Comece no caminho de attach em engine-overlay.ts e encontre os padrões existentes de deduplicação de toasts e do cliente de API. Rastreie a flag do workspace, o diretório vinculado e o gating de credenciais antes de adicionar o POST fire-and-forget para /datamates/{id}/attach-reports. Está concluído quando os attach bem-sucedidos e malsucedidos, uma vez finalizados, enviarem um único relatório sanitizado por assinatura de anúncio, e as falhas forem registradas apenas uma vez.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Problem

When a workspace attach settles, the CLI is the only place that knows what the session actually received: which declared tool keys the engine served, which it could not and why (the engine's unfulfilled-keys report), the engine and CLI versions, whether a VS Code bridge was live — or that the engine was missing, too old, or failed to start. None of that reaches the backend, so the workspace page cannot show "your last session received …" or whether a linked project is ready.

Proposal

After the outcome settles in the attach path (engine-overlay.ts), post one session attach report to POST /datamates/{id}/attach-reports through the existing API client, fire-and-forget with a bounded timeout, once per announcement signature (the same dedupe the toast uses). Failed outcomes post too.

  • Report: outcome kind; the binding identity the server row already holds (git remote, else project path); CLI version; engine version (null when missing); bridge state; declared and delivered keys; the engine's report; a timestamp.
  • Sanitize before sending. Engine detail strings are raw error text and can contain paths or hosts. Reduce each to {code, command?} — code from recognised patterns (ENOENT, EACCES, ETIMEDOUT, ECONNREFUSED, invalid-url, else other), command = the basename of the spawned command for spawn failures, nothing else. The full text stays local.
  • Gated like the rest of the overlay (workspace flag, bound directory, configured credentials); never blocks the turn; a failed post logs once and never surfaces to the user.

Out of scope

Rendering the report anywhere; the backend store (separate change).

Linguagem predominante
TypeScript
Estrelas
813
Forks
124
Merge médio
1d 18h
PRs com merge (30d)
70

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de AltimateAI/altimate-code

Todas as issues de AltimateAI/altimate-code

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.