Precio de lanzamiento: 100 € + impuestos. Subirá a 200 € + impuestos.Consigue Yard por 100 € + impuestos

Commit y push

Revisión explícita antes de publicar cambios.

Revisado · 8 nov 2026Referencia técnica · inglés
Guía técnica disponible en inglés. Esta referencia conserva los nombres de comandos y el contenido técnico original en inglés.

Technical reference synchronized with Yard’s source. File names and development commands refer to the native app repository.

Changes keeps Commit changes… and adds Commit and push…. The latter presents the local branch, configured upstream, credential-free push destination, reviewed HEAD and outgoing commits before any write. The user selects eligible files or chooses Push the reviewed existing commits without creating a new commit. Opening or refreshing this review reads Git metadata and the remote ref; it does not commit, push or merge. Missing upstream, detached HEAD, inaccessible/expired authentication, divergence, unknown remote commits, multiple push destinations and private outgoing history disable delivery with a concrete remedy. No installer, model, GitHub account or automatic Cloud deployment is involved.

TaskGitDelivery in YardAgents owns the shared behavior. Its fingerprint binds HEAD, branch, upstream, resolved push URL, actual remote tip, outgoing history and the existing TaskChanges selection fingerprint. It follows the configured push URL, which may differ from the fetch URL, and redacts URL credentials/query before presenting it. Review is limited to 100 outgoing commits; larger histories remain available through a Git client. Remote queries have a 20-second limit and Git terminal prompts are disabled.

Delivery takes a repository Git-directory lock. Task workspaces also acquire their existing Studio execution lease, preventing direct callers or a cross-process handoff from bypassing ownership. The HTTP route retains Studio's request lease and exclusive commit/writer guard. Selected files use TaskChanges.checkpoint, preserving private-path exclusions, literal paths and unselected staging. An existing checkpoint can be pushed directly, including after a failed first attempt. Automatic Studio checkpoint policy is unchanged.

Push uses the exact reviewed/created SHA and explicit destination branch, with no force, tag following or submodule pushes. No merge is performed. A hook that expands the local checkpoint's selected files blocks its push and retains the local commit for inspection. The push command has a two-minute limit. A failed push returns the retained local commit and a safe message; the dialog refreshes its review and switches to pushing that existing commit, without creating an empty or duplicate checkpoint. Server/credential output is not reflected verbatim into messages. Current task ownership, recorded approval HEAD and exact-head approval records are not rewritten by this action; the engine's later review/delivery gates remain responsible for approval.

The application adds StudioGitDeliveryModule with GET /yard-studio/api/git/delivery-preview and POST /yard-studio/api/git/deliver. The POST requires the reviewed fingerprint, paths, message and explicit push_existing_only. A partial success (local commit retained, push failed) is a structured result with pushed: false, rather than claiming that the local commit was lost. Errors before checkpointing remain errors. The module composes with existing Host/Origin, lifecycle and task handoff interception.

Verification

TaskGitDeliveryTests exercises actual temporary local and bare repositories: selected-file commit/push, unselected staging/private files, already checkpointed history, server rejection and retry, changed snapshot or destination, missing upstream/detached/inaccessible remote, private outgoing history, distinct push URL and configured tag following, task Studio/Agents ownership and unchanged exact-head approvals. A hook regression attempts to stage .env into the new checkpoint and asserts that the retained local commit never reaches the remote. All 9 final Engine tests passed, zero failures (/tmp/yard-git-delivery-engine-final.log).

StudioHandoffTests.testHD014DeliveryAPIUsesWriterGuardAndActuallyPushesOnlyReviewedFiles exercises the actual registered/intercepted HTTP handlers and a local bare remote. It checks the busy writer rejection before commit, the resulting remote SHA and selected files, and the retained private environment.

Three StudioHandoffWebTests.testHD014… cases operate the actual HTML/JS in WKWebView with fake HTTP responses: explicit target/file review before submit, failed-push retry as an existing commit, and disabled preflight plus escaped outgoing subjects. The original commit-only test remains part of the focused regression. Optional YARD_HANDOFF_PREVIEW=/tmp/yard-git-delivery-ui captures the new review and retained-commit dialog for inspection. All test repositories/remotes and credentials are synthetic; no original project, real remote, model, service, resolver, certificate or running Yard installation is modified.

Final app run passed 1 real API/bare-remote test + 3 delivery DOM tests + 1 existing commit-only regression, zero failures (/tmp/yard-git-delivery-ui-tests.log). After the footer polish, all four DOM/regression tests passed again (/tmp/yard-git-delivery-ui-final.log). Four light/dark review/retry images in /tmp/yard-git-delivery-ui/commit-and-push-{review,retained}-{light,dark}.png were inspected. The footer inset has a computed-layout assertion, and the retry keeps both the retained-commit explanation and its explicit action visible. node --check and scoped git diff --check passed. No production remote or account integration was needed for these acceptance scenarios.