Skip to content

fix(dev-lead): git identity not configured + commit failure silently swallowed + missing WebFetch tool access #281

Closed

Description

@don-petry

Problem

Two critical bugs combine to silently lose the agent's work without any error surfacing, plus one enhancement gap that limits the agent's ability to resolve issues.

Bug 1 — No git identity configured (critical)

The workflow never configures git config user.email / user.name. When commit_and_push in scripts/dev-lead-fix-reviews.sh calls git commit, git rejects it:

fatal: empty ident name (for <runner@...>) not allowed

Bug 2 — git commit failure silently swallowed (critical)

commit_and_push is called as the condition of an if statement:

if commit_and_push "human"; then
    post_reviews_terminal "human" "applied" "Changes committed and pushed."

In bash with set -euo pipefail, set -e is suspended for the entire function body when the function is the condition of an if. So git commit fails, execution continues to git push (exits 0 with "Everything up-to-date"), the function returns 0, and the PR gets a false "Changes committed and pushed" comment. The agent's fixes are silently lost.

Evidence: Run https://github.com/petry-projects/.github-private/actions/runs/26071797185/job/76654578361 — the agent made NOSONAR and trailing-newline fixes, the log shows the git identity error and "Everything up-to-date", but no commit appears on PR #80 for that session.

Bug 3 — WebFetch not in run_writer allowed tools (enhancement)

engine.sh's run_writer uses --allowed-tools "Bash,Read,Write,Edit,Grep,Glob" — no WebFetch. When the agent needed to verify a SHA256 hash from GitHub releases, it could not and noted: "This could not be safely fixed without internet access to verify the correct hash." Adding WebFetch allows the agent to look up release hashes, SonarCloud rule docs, etc.

Root cause timeline (run 26071797185)

  1. Agent ran for ~6 minutes, made file edits (NOSONAR suppressions, trailing newlines)
  2. commit_and_push "human" was called
  3. git commit failed — no git identity on runner
  4. set -e suspended (function called from if) → git push ran → "Everything up-to-date"
  5. post_reviews_terminal "human" "applied" "Changes committed and pushed." fired falsely
  6. All agent fixes lost; SonarCloud still failing on PR ci: add required ci.yml workflow #80

Fix

  1. Add git identity config step to dev-lead.yml before writer steps run
  2. Fix commit_and_push to explicitly fail when git commit fails (add || return 1)
  3. Add WebFetch to run_writer allowed tools in engine.sh

Activity

  1. added 14 commits that reference this issue on Jun 7, 2026
    0e5d087
    9307fa4
    033f849
    cc8ec08
    ea373eb
    546d983
    49eda9f
    616a70a
    e112bba
    f367117
    830e3f3
    7efa74a
    bf38514
    847a7a2
  2. 7 remaining items

  3. added 2 commits that reference this issue on Jun 25, 2026
    44ea2ec
    f5449cc
  4. added 12 commits that reference this issue on Aug 2, 2026
    ac80ecc
    8306848
    523077d
    8e1dabf
    8e3f0f6
    d8b8d18
    f6921c3
    d9a1c97
    0f4400a
    8f9fa2e
    c0d64ad
    861741c
  5. don-petry commented on Aug 21, 2026

    @don-petry
    CollaboratorAuthor

    The symptom this issue fixed has recurred behind a different root cause — filed as #1567.

    #281's Bug 2 was post_reviews_terminal "human" "applied" "Changes committed and pushed." firing falsely, traced to a missing git identity plus set -e being suspended when commit_and_push ran as an if condition. That mechanism is fixed and explicitly guarded in current main.

    On 2026-08-21 (PR .github#995) the same false claim appeared three times, most starkly for a commit that changed one cross-reference (§4 → §3, +1/−1) while reporting "Changes committed and pushed" against a review requesting eight substantive changes. #1567 argues the guard should move from "did the commit succeed" to "did the requested change land".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions