Skip to content

Code agent: use GitHub commit API for verified commits #357

Description

@rh-hemartin

Problem

Commits made by the code agent via git commit in the runner shell are unverified on GitHub. GitHub has no way to confirm the committer identity, so they show up without the "Verified" badge. This makes agent commits harder to trust at a glance and inconsistent with signed human commits.

Benefit

Since the code agent is the default agent for all users, this change means every commit produced by a fullsend agent run gets the "Verified" badge automatically, with no GPG key setup or signing configuration required. Users get verified agent commits out of the box.

Proposed change

Replace the local git commit workflow with the GitHub Git database API to create commits server-side. GitHub automatically marks commits created through its API as verified.

The rough flow:

  1. After the agent finishes its changes, compute the tree (blobs + tree object) from the working directory diff.
  2. Call POST /repos/{owner}/{repo}/git/blobs for each changed file.
  3. Call POST /repos/{owner}/{repo}/git/trees to build the new tree.
  4. Call POST /repos/{owner}/{repo}/git/commits with the tree SHA, parent SHA, message, and author/committer info.
  5. Call PATCH /repos/{owner}/{repo}/git/refs/heads/{branch} to update the branch ref.
  6. Reset the local checkout to match (git fetch + git reset).

Scope

This affects the commit path in the code agent (agents/code.md, skills/code-implementation/SKILL.md) and the post-run scripts that amend commits (scripts/post-code.src.sh, scripts/post-fix.src.sh).

Prior art

This approach has been tested in rh-hemartin-fullsendai/standalone-fullsend#69. The commit 673b1f0 created by the agent through the API shows as verified. The workflow run that produced it: https://github.com/rh-hemartin-fullsendai/standalone-fullsend/actions/runs/29906968309

Notes

  • The GITHUB_TOKEN available in Actions already has the necessary permissions for the Git database API.
  • Author and committer fields in the API call should match what the agent currently uses.
  • The post-code scripts that run git commit --amend --no-edit (for lint fixes, formatting, etc.) also need to go through the API path or be restructured to fold changes before the single API commit.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions