Ensamblador: ship + verify-loop + /api/forja/loop (candado: unificar motor de publicación) - #91
Ensamblador: ship + verify-loop + /api/forja/loop (candado: unificar motor de publicación)#91turbillon50 wants to merge 2 commits into
Conversation
…eploy a su Vercel
approve en /api/builder ya no deja el build en "ship-pending": ahora toma
los archivos de la versión aprobada y los publica en la cuenta del propio
usuario (repo nuevo o commit encima del existente vía Git Data API, más
deploy directo a Vercel). VersionCard refleja el resultado real: link al
sitio en vivo, link al repo, o el motivo si faltan conexiones.
Cierra el gap marcado explícitamente en el código ("el pipeline repo+vercel
llega después") — es el primer tramo del módulo ensamblador: chat -> código
real -> tu GitHub -> tu Vercel, sin quedarse en manos de VForge.
…Ojo (manos) Hoy el navegador Vulcano (CDP/VNC en Hetzner) y el Ojo (cola de agentes que escriben código) son dos sistemas que no se hablan. Este bridge cierra un loop: navega a la URL publicada, lee lo que renderiza, detecta fallas conocidas (excepción de cliente, 404, 500, hydration fail, página en blanco) y si encuentra una, encola un fix en el Ojo con el texto observado como contexto — el mismo patrón de "ver la pantalla y actuar" que el plugin de Claude en Chrome. Extrae la lógica de CDP compartida (relayExec/cdpControl/safeHttpUrl) de app/api/navegador/control/route.ts a lib/forja/browser.ts para no duplicarla. Límite conocido: lee el DOM renderizado, no la consola — errores no visuales necesitan que cdp_control.py en Hetzner exponga Log/Runtime de CDP, fuera del alcance de este repo.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63b1caa36d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const treeRes = await gh(`/repos/${owner}/${repo}/git/trees`, token, { | ||
| method: "POST", | ||
| body: JSON.stringify({ base_tree: baseTreeSha, tree: blobs }), | ||
| }); |
There was a problem hiding this comment.
Replace the published tree instead of overlaying it
When republishing an existing build after a file is renamed or removed, this base_tree call only overwrites paths present in files; omitted paths remain in the GitHub repo even though the comment says each build is a final snapshot. GitHub's tree API documents that base_tree entries are preserved unless overwritten or deleted with sha: null (https://docs.github.com/en/rest/git/trees), so later approvals can leave stale source files in the user's repo while Vercel receives only the new file list.
Useful? React with 👍 / 👎.
| await saveUserApp(userId, { | ||
| name: build.project_name, | ||
| repo_url: repoUrl, | ||
| deploy_url: deploy.url, | ||
| template: "ensamblador", | ||
| }); |
There was a problem hiding this comment.
Upsert the shipped app instead of inserting every publish
When an already-shipped build is approved again, this path runs again with build.repo_full_name set, but saveUserApp is insert-only, so every republish of a new version creates another identical app entry instead of updating the existing deploy URL. In the workspace apps list this shows duplicate apps for the same repo after normal builder iterations.
Useful? React with 👍 / 👎.
Módulo Ensamblador — trabajo de la rama claude/mindcontextia-vforge-chat-68jxcy hacia main.
Incluye:
CANDADO antes de mergear (revisar):
Referencia visual del módulo: turbillon50/VFORGE-ENSAMBLADOR (misma rama). Los tokens vf-* (violeta #7c3aed → cyan #22d3ee, fondo #0a0a0f) se respetan, sin paleta nueva.
Merge lo confirma Luis.