fix(workspace): `assertOwnsWorkspace` falls back to upload-then-rollback when the server omits `ownerId`

Aperta
#1,325 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, cli

Direzione di ricerca

Start in packages/opencode/src/altimate/workspace/skill-publish.ts, following publishSkill and assertOwnsWorkspace through the ownership check, upload, attach failure, and cleanup. Review the proposed GET /datamates/{id} and attach-endpoint precheck options, including compatibility with deployed backend versions. Done means ownership is resolved or clearly reported before upload when ownerId is absent, with the existing failure path covered.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

publishSkill checks workspace ownership before uploading via assertOwnsWorkspace (packages/opencode/src/altimate/workspace/skill-publish.ts). When the server's workspace listing carries no ownerId (older backend), the check is a no-op and a non-owner's publish uploads the full bundle, fails at the attach step with 404, and is cleaned up with a DELETE. Correct outcome, but check-then-upload degrades to upload-then-rollback for that case, and a failed DELETE would leave an orphaned unattached skill.

Proposed: when ownerId is absent, resolve ownership through GET /datamates/{id} (or the attach endpoint's precheck) before the upload; or surface "ownership unknown, continuing" in the report.

Found during the v0.12.0 release review (CTO persona). Deferred because: depends on which backend versions are still deployed.

🤖 Generated with Claude Code

https://claude.ai/code/session_012Q51zFUmPg1WwtS5CrGJE6

Lingua principale
TypeScript
Stelle
813
Fork
134
Merge medio
2g 5h
PR unite (30g)
62

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AltimateAI/altimate-code

Tutte le issue di AltimateAI/altimate-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.