fix: corregir commits=0 en status.json por safe.directory de git#9
Merged
Conversation
Git ≥ 2.35.2 rechaza operar en repos poseídos por un usuario distinto. Después de chown al usuario agent, las métricas post-agente fallaban silenciosamente como root. Se añade -c safe.directory= a los comandos de métricas y se usa BASE..HEAD para contar solo commits del agente. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
status.jsonreportabacommits: 0ylast_commit: "none"aunque el agente sí había hecho commitssetup_agent_perms()hacechown -R agent:agentsobre el worktree, y las métricas post-agente se colectan como root — ambos comandos git fallan silenciosamente-c "safe.directory=$WORKTREE_PATH"a los comandos de métricas, y se usaBASE..HEADpara contar solo los commits hechos por el agente (no los heredados de main)commits=1,last_commit=279a66e test: status fix smoke✓Changes
config/entrypoint.sh: capturaWORKTREE_BASE_SHAal crear el worktree; corrige comandos de métricas con-c safe.directory=yBASE..HEADconfig/spec/entrypoint_spec.sh: actualiza assertion existente, añade 2 tests nuevos, actualiza mock de git pararev-parse HEADTest plan
shellspec --shell bash— 57 tests, 0 failuresmake build— imagen reconstruida con entrypoint corregidocommits=1,last_commitcon hash correcto🤖 Generated with Claude Code