Skip to content

feat(#357): create agent commits through the GitHub API so they are signed - #1675

Merged
rh-hemartin merged 9 commits into
fullsend-ai:mainfrom
gwenneg:feat/357-signed-commits
Oct 26, 2026
Merged

rh-hemartin merged 9 commits into
fullsend-ai:mainfrom
gwenneg:feat/357-signed-commits

Conversation

@gwenneg

@gwenneg gwenneg commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #357.

On GitHub, with GITHUB_SIGNED_COMMITS set to "true", post-code and post-fix no longer git push the commits git built in the sandbox. A ruleset that requires signed commits rejects those, because no signing key can exist in the sandbox. Instead the post-scripts rebuild each commit origin lacks through the Git Data API with the App installation token they already hold (blobs, tree, commit), move the branch ref with the updateRefs mutation, and move the local branch onto the commits GitHub created. GitHub signs every commit it creates this way, so agent commits show as Verified and pass required_signatures rulesets. GitLab keeps git push.

The approach was prototyped by @rh-hemartin in rh-hemartin-fullsendai/standalone-fullsend (gh-app-commit.py).

What else had to change

  • Authorship. GitHub makes the App's bot user the author of every rebuilt commit, so the identity the sandbox committed with is kept in an Authored-by: name <email> trailer. commit_author_identity in precommit-gate.lib.sh reads it only from the App bot's own commits, exact noreply email and a single trailer; post-fix's history checks and the Signed-off-by helpers of both post-scripts go through it, so redo and reset still tell fix-agent commits from code-agent and human ones, a human commit republished under the bot keeps its sign-off, and a crafted trailer changes nothing. The fix-history-rewrite skill runs in the sandbox without the post-script libraries, so its new scripts/authorized-range.sh applies the same rule there. A commit the App bot did not author loses any existing Authored-by line before publication, and the trailer step runs outside the checkout so a repo-local trailer.*.cmd cannot execute on the runner. The PR-body fallback strips the trailer.
  • --force-with-lease semantics. The ref update is a compare-and-swap (updateRefs with beforeOid) anchored to the remote-tracking ref, which is exactly what git push --force-with-lease checks. The API's "not a fast forward" wording feeds the existing retry and the push failure categorizer.
  • Rate limits. Each blob, tree and commit is one content-creating request. Merges are rebuilt against the parent with the smaller diff, and blobs GitHub already holds are not uploaded again. The limit is documented in docs/code.md.
  • Robustness. A ref write GitHub applied but answered with a 5xx counts as success; a failed fetch after a successful update is a warning, not a failed push; the response body's errors[] detail reaches the failure comment. A commit GitHub did not sign fails the publish under an App installation token and is published with a warning under any other token, which never gets a signature.

Rollout

The switch ships off: GITHUB_SIGNED_COMMITS: "false" in the GitHub blocks of harness/code.yaml and harness/fix.yaml, so merging this PR changes nothing at runtime. With the switch off, forge_push_branch runs the same git push (and --force-with-lease retry) as before. The functional evals turn it on through eval/harness/code.yaml and eval/harness/fix.yaml, so every PR keeps exercising the API path. A repository opts in (and, once the default flips, out) with a base: overlay that sets the variable, the documented override path (ADR 0080). Flipping the fleet default is a later one-line PR, and so is reverting it.

When the switch is on, agent commits are authored by the App's bot user and signed by GitHub, with the sandbox identity in an Authored-by trailer. A signature made inside the sandbox (gitsign or SSH signing configured through the harness env) does not survive publication. Tooling that matched agent commits by git author name must read the trailer instead. GitLab is unchanged either way.

Dependency: fullsend's dispatch counts prior fix commits by git author name (reusable-dispatch.yml), which this change makes always zero, so the fix iteration cap would stop working. The companion PR fullsend-ai/fullsend#8425 counts them by the Authored-by trailer as well; it merged on 2026-10-21.

Verification

  • Both publish paths are tested. With the switch on, the existing API scenarios, and post-code asserts the pushed commit was rebuilt by the (fake) API. With it off, the library pushes with the variable unset, "false" and "1", git's non-fast-forward wording and the --force-with-lease pass-through are checked, and post-code and post-fix run their append, redo and rebase publishes through a plain git push with any Git Data API call failing the run. yq checks pin the harness default, the eval overlays and their registration.
  • scripts/github-signed-push-test.sh (new, 25 scenarios against a bare repo with test-fixtures/fake-gh-git-api.sh standing in for the API), signoff-strip-test.sh (a published human commit keeps its sign-off), post-code-test.sh, post-fix-test.sh (three new history-rewrite scenarios on API-published commits), post-failure-report-test.sh, validate-code-output-test.sh: all pass on Ubuntu, apart from the pre-existing yq-dependent harness check.
  • make check-bundle, make lint (skillsaw strict), pre-commit run --all-files, hack/lint-agent-docs: clean.
  • The real post-code.sh and post-fix.sh from this branch, run on Linux with the lab App's token against the same scratch repository: post-code published two commits and opened PR #2; post-fix appended a fix commit; a second post-fix run redid it (reset past the published fix commit, recognised through its trailer, lease push). All three commits on that PR read back verified: true.
  • A commit published through the library with a user token instead of the App token reads back verified: false, reason: unsigned on the same scratch repository; the library warns and publishes it, as documented.
  • Live run against GitHub with a GitHub App installation token (scratch repo gwenneg-mq-lab/signed-push-check): the library created three commits, each read back as verified: true, reason: valid, author mq-bypass-lab-bot[bot], committer GitHub; the Authored-by trailer survived a --- line in the body; a non-fast-forward push was refused and the --force-with-lease compare-and-swap through updateRefs then moved the branch. Repeated with an active required_signatures ruleset on the check branches: the API-published commits were accepted, and a git-built commit pushed with git push and the same App token was rejected (GH013 … Commits must have verified signatures). Branches signed-push-check-1791979153 and signed-push-check-1791982020 are left there for inspection.

Known follow-ups (not in this PR)

  • Exclude the remote SHA explicitly from the rebuild set so a stale remote-tracking ref cannot make the library rebuild commits origin already has.
  • Resolve candidate identities once in history_rewrite_preserves_remote_human_commits instead of per remote commit.
  • Seed the known-blob list from every parent of a merge, not only the base parent.
  • Source the push library from the post-scripts only, so the pre-script bundles stop carrying it.
  • Fold the non-fast-forward retry predicate, duplicated in both post-scripts and both test helpers, into one helper.
  • Decide and record in fullsend (ADR) how API publication and the sandbox gitsign path coexist.

🤖 Generated with Claude Code

@gwenneg
gwenneg requested a review from a team October 14, 2026 12:02
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Functional tests are running

Authorization passed for this commit. See the Functional Tests workflow for results.

@github-actions

Copy link
Copy Markdown

Functional tests did not run

Functional tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Publish GitHub agent commits as signed commits through the API

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Publish GitHub agent commits through the App-backed Git Data API so signed-commit rulesets accept
 them.
• Preserve sandbox authorship in trailers and protect branch updates with compare-and-swap; GitLab
 retains git push.
• Add API-backed publishing tests and document changed authorship, signatures, and rate limits.
Diagram

graph TD
  P["Post-scripts"] --> D{"Forge?"} --> A["GitHub publisher"] --> S["Signed commits"] --> R["Branch ref"] --> L["Local branch"]
  D --> G["GitLab push"] --> L
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Sign commits on the runner
  • ➕ Could retain the original Git author and commit objects.
  • ➕ Would avoid per-object API requests.
  • ➖ Requires provisioning and safeguarding signing credentials outside the sandbox.
  • ➖ Changes the trust and credential-management model.
2. Make API publication opt-in
  • ➕ Preserves existing GitHub publishing behavior where signatures are not required.
  • ➕ Provides a migration path for tools that depend on Git authorship.
  • ➖ Agent commits would still fail signed-commit rulesets unless enabled.
  • ➖ Adds configuration and two GitHub publishing paths to maintain.

Recommendation: Use the App-backed API path by default if support for signed-commit rulesets is the priority: it needs no sandbox signing key and preserves lease protection. Confirm the platform decision on changed authorship and displaced sandbox signatures, since runner-side signing or opt-in publication would offer different compatibility tradeoffs.

Files changed (24) +2904 / -40

Enhancement (12) +1969 / -28
github-code-ops.lib.shLoad signed publication for GitHub code operations +4/-0

Load signed publication for GitHub code operations

• Sources the shared GitHub publisher so code post-scripts can publish through the API.

scripts/lib/github-code-ops.lib.sh

github-fix-ops.lib.shLoad signed publication for GitHub fix operations +4/-0

Load signed publication for GitHub fix operations

• Sources the shared GitHub publisher for fix post-scripts.

scripts/lib/github-fix-ops.lib.sh

github-signed-push.lib.shRecreate and publish GitHub-signed commits +302/-0

Recreate and publish GitHub-signed commits

• Rebuilds missing commits through the Git Data API, retains sandbox identity in trailers, and updates refs with lease-aware compare-and-swap. Deduplicates blob uploads, retries transient API failures, and aligns the local branch after publication.

scripts/lib/github-signed-push.lib.sh

gitlab-code-ops.lib.shKeep GitLab code publication on git push +7/-0

Keep GitLab code publication on git push

• Adds the common forge_push_branch interface backed by the existing git push behavior.

scripts/lib/gitlab-code-ops.lib.sh

gitlab-fix-ops.lib.shKeep GitLab fix publication on git push +7/-0

Keep GitLab fix publication on git push

• Adds the same publication interface for GitLab fix operations without changing their push mechanism.

scripts/lib/gitlab-fix-ops.lib.sh

post-code.shBundle signed code publication +318/-4

Bundle signed code publication

• Includes generated forge-specific publishers, routes code publication and lease retries through them, and excludes Authored-by trailers from PR-body fallback text.

scripts/post-code.sh

post-code.src.shRoute code publication through the forge +4/-3

Route code publication through the forge

• Replaces direct pushes with forge_push_branch, recognizes API fast-forward errors for retries, and strips authorship trailers from PR-body fallback text.

scripts/post-code.src.sh

post-fix.shBundle signed fix publication and author recovery +349/-11

Bundle signed fix publication and author recovery

• Includes generated publishers and uses Authored-by identity on bot-authored commits when checking rewritten history. Routes fix publication and lease retries through the forge-specific function.

scripts/post-fix.sh

post-fix.src.shPreserve rewrite ownership after GitHub publication +35/-10

Preserve rewrite ownership after GitHub publication

• Adds bot-commit author recovery for history-equivalence checks and replaces direct fix pushes with forge-specific publication.

scripts/post-fix.src.sh

pre-code-jira.shRefresh bundled Jira code pre-script +313/-0

Refresh bundled Jira code pre-script

• Includes the shared GitHub signed publisher and GitLab push adapter through the generated forge-operation bundles.

scripts/pre-code-jira.sh

pre-code.shRefresh bundled code pre-script +313/-0

Refresh bundled code pre-script

• Includes the signed publisher and GitLab push adapter in the generated forge-operation bundle.

scripts/pre-code.sh

pre-fix.shRefresh bundled fix pre-script +313/-0

Refresh bundled fix pre-script

• Includes the signed publisher and GitLab push adapter in the generated forge-operation bundle.

scripts/pre-fix.sh

Bug fix (2) +2 / -2
post-failure-report.lib.shClassify API ref and ruleset rejections +1/-1

Classify API ref and ruleset rejections

• Recognizes GitHub API fast-forward and rule-violation wording as push rejections.

scripts/lib/post-failure-report.lib.sh

validate-code-output.shRecognize API publication rejections in validation bundle +1/-1

Recognize API publication rejections in validation bundle

• Adds GitHub API fast-forward and rule-violation wording to generated push-failure categorization.

scripts/validate-code-output.sh

Tests (6) +884 / -3
MakefileRun signed-push tests in the script suite +1/-0

Run signed-push tests in the script suite

• Adds the new publishing test script to the script-test target.

Makefile

github-signed-push-test.shExercise signed publication against a bare remote +467/-0

Exercise signed publication against a bare remote

• Adds scenarios for reconstructed histories and file types, merges, deduplication, leases, API errors, branch synchronization, and authorship trailers.

scripts/github-signed-push-test.sh

post-code-test.shAdapt code post-script tests to API publication +16/-1

Adapt code post-script tests to API publication

• Checks that the bundled script calls forge_push_branch, mocks its API requests, and tests retry handling for API fast-forward errors.

scripts/post-code-test.sh

post-failure-report-test.shTest API publication failure categories +22/-0

Test API publication failure categories

• Covers API fast-forward and ruleset refusals, moved refs, and workflow-permission errors.

scripts/post-failure-report-test.sh

post-fix-test.shTest signed-push fix history safeguards +241/-2

Test signed-push fix history safeguards

• Mocks API publication and adds redo tests that preserve code-agent and human commits while identifying previously published fix commits by their trailers.

scripts/post-fix-test.sh

fake-gh-git-api.shSimulate the Git Data API with Git plumbing +137/-0

Simulate the Git Data API with Git plumbing

• Serves blob, tree, commit, and ref requests from a bare repository and provides fault-injection controls for publishing tests.

scripts/test-fixtures/fake-gh-git-api.sh

Documentation (4) +49 / -7
code.mdDocument GitHub signed-commit publication +30/-1

Document GitHub signed-commit publication

• Explains API publication, changed author and signature semantics, lease protection, GitLab behavior, and secondary rate-limit constraints.

docs/code.md

fix.mdDocument signed fix commits and redo ownership +4/-1

Document signed fix commits and redo ownership

• Links fix publication to the signed-commit behavior and explains how redo/reset identifies the original author of bot-authored commits.

docs/fix.md

SKILL.mdClarify published fix-commit ownership +4/-0

Clarify published fix-commit ownership

• Instructs the fix agent to use Authored-by trailers only for bot-authored commits when deciding which suffix it may rewrite.

skills/fix-history-rewrite/SKILL.md

procedure.mdSpecify trailer-aware redo range selection +11/-5

Specify trailer-aware redo range selection

• Updates the rewrite procedure to recover sandbox authorship from bot-authored commits before selecting the contiguous fix-agent suffix.

skills/fix-history-rewrite/references/procedure.md

@qodo-code-review

qodo-code-review Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

1. Fix loops evade the iteration cap ✗ Dismissed
Description
_signed_push_commit publishes fix commits under the GitHub App bot author and retains
fullsend-fix only in an Authored-by trailer, while fullsend's dispatch workflow counts prior
fixes only when .commit.author.name is fullsend-fix. After the first signed fix commit,
subsequent dispatches count zero prior fixes and pass iteration 1 to the agent, so its iteration-cap
check cannot stop repeated fix runs.
Code

scripts/lib/github-signed-push.lib.sh[R174-176]

+  jq -n --rawfile m "${payload}.msg" --arg t "${tree}" --argjson p "${parents}" \
+    '{message: $m, tree: $t, parents: $p}' > "${payload}"
+  resp="$(_signed_push_api POST git/commits "${payload}")" || return 1
Relevance

●●● Strong

Published fix commits lose the author marker used by iteration counting, clearly bypassing the
stated fix-loop cap.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new request sends no author field and puts the local author in the message trailer; the separate
Fullsend workflow filters solely on the old Git author name. The resulting count is supplied as the
fix iteration that the agent compares with its cap.

agents -> fullsend
scripts/lib/github-signed-push.lib.sh[158-176]
scripts/pre-fix.src.sh[102-121]
External repo: fullsend-ai/fullsend, .github/workflows/reusable-dispatch.yml [1206-1211]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Signed fix commits carry the sandbox author in an `Authored-by` trailer, but Fullsend counts fixes by Git commit author name. This resets the fix iteration count after publication.

## Fix Focus Areas
- scripts/lib/github-signed-push.lib.sh[158-176]
- /cross_repos/fullsend/.github/workflows/reusable-dispatch.yml[1206-1211]
- scripts/pre-fix.src.sh[102-121]

## Recommended Fix
Update Fullsend's commit-counting filter to recognize the `fullsend-fix` trailer on App-bot-authored commits while retaining support for legacy commits authored directly by `fullsend-fix`. Add a dispatch-workflow test covering signed fix commits before rolling out the new publication path.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. GitHub reuploads stored blobs ✓ Resolved
Description
The signed-commit publisher only treats blobs in the selected base tree or uploaded during the
current push as already known, while the documentation says any blob GitHub already holds is
skipped. A blob present on another remote ref but absent from that base tree is uploaded again,
making the documented rate-limit behavior inaccurate.
Code

docs/code.md[R89-90]

+Each blob origin does not already hold, and each tree and commit, is one
+API request, and GitHub's
Relevance

●●● Strong

Documentation overstates deduplication; prior docs reviews accept corrections aligning prose with
implementation.

PR-#389
PR-#650

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed documentation claims that every blob already held by GitHub is excluded from upload, but
the publisher initializes its known-blob list from only the selected base tree and the current
push's uploads. Its changed-blob loop uploads any other destination blob, so blobs stored on another
remote ref can be uploaded again.

docs/code.md[89-90]
scripts/lib/github-signed-push.lib.sh[119-137]
Skill: pr-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The documentation broadly claims that blobs already held by GitHub are not uploaded again, but the implementation only recognizes blobs in the selected base tree or uploaded during the current push.

## Fix Focus Areas
- docs/code.md[89-90]
- scripts/lib/github-signed-push.lib.sh[119-137]

## Recommended Fix
Either narrow the documentation to describe the actual base-tree and current-push deduplication behavior, or update the publisher to reliably detect and reuse blobs stored elsewhere in the repository before claiming that all existing blobs are skipped.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Unsigned agent commits still reach branches 🐞 Bug ≡ Correctness
Description
_signed_push_commit only warns when the GitHub commit response reports verification.verified as
false, then returns the commit SHA for publication. If GitHub creates an unverified commit and the
branch has no rule requiring signatures, forge_push_branch moves the branch ref to that commit and
reports a successful publish.
Code

scripts/lib/github-signed-push.lib.sh[R182-185]

+  if [ "$(printf '%s' "${resp}" | jq -r '.verification.verified')" != "true" ]; then
+    echo "warning: GitHub did not sign ${sha} ($(printf '%s' "${resp}" \
+      | jq -r '.verification.reason // "unknown"'))" >&2
+  fi
Relevance

●● Moderate

Unsigned publication undermines the PR’s signed-commit goal, but the test indicates warning-only
behavior may be intentional.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The warning branch does not return failure, and the caller uses the returned SHA to update the ref.
The new test explicitly expects a successful push and an existing remote branch when the fake API
reports verified: false.

scripts/lib/github-signed-push.lib.sh[182-186]
scripts/lib/github-signed-push.lib.sh[271-285]
scripts/github-signed-push-test.sh[261-270]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The signed-push path detects an unverified API-created commit but continues and can publish it to a branch without a signature rule.

## Fix Focus Areas
- scripts/lib/github-signed-push.lib.sh[182-186]
- scripts/github-signed-push-test.sh[261-270]

## Recommended Fix
Return an error when the commit response does not report `verification.verified == true`, before the ref update can run. Change the unverified-response test to require a failed publish and an unchanged remote ref.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



Informational

4. A forged author trailer can outlive republishing ✓ Resolved
Description
_signed_push_commit adds the sandbox identity with git interpret-trailers --if-exists replace,
which replaces only the matching trailer closest to the end. commit_author_identity in post-fix,
however, reads the first Authored-by value (%(trailers:key=Authored-by,valueonly) | head -1).
If a commit message already has two Authored-by: lines, the earlier, forged one survives
publication and is the one post-fix trusts. That contradicts the code comment saying a crafted
trailer "cannot survive a rebase".
Code

scripts/lib/github-signed-push.lib.sh[R164-169]

+    *"[bot] <"*) if_exists=doNothing ;;
+    *) if_exists=replace ;;
+  esac
+  git cat-file commit "${commit}" | sed '1,/^$/d' \
+    | git interpret-trailers --no-divider --if-exists "${if_exists}" \
+        --trailer "Authored-by: ${author}" \
Relevance

●●● Strong

Writer and reader disagree on duplicate trailer selection, creating a deterministic
authorship-integrity flaw.

PR-#1490

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The writer uses --if-exists replace, which in git removes only the closest existing trailer with
the same key. The reader takes the first trailer value. With two Authored-by trailers in the
message, the first one stays and the reader uses it. The impact is limited, because the sandbox can
already choose its git author identity, but the comment's guarantee is false and the writer and
reader disagree on which trailer counts.

scripts/lib/github-signed-push.lib.sh[158-173]
scripts/post-fix.src.sh[675-691]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`_signed_push_commit` uses `git interpret-trailers --if-exists replace`, which replaces only one existing `Authored-by` trailer. `commit_author_identity` in post-fix reads the first one, so an earlier forged trailer can survive and be trusted.

## Fix Focus Areas
- scripts/lib/github-signed-push.lib.sh[158-173]
- scripts/post-fix.src.sh[675-691]

## Recommended Fix
For commits that are not bot-authored, remove every existing `Authored-by:` trailer line from the message before calling `git interpret-trailers --trailer "Authored-by: ${author}"`. Otherwise, have `commit_author_identity` read the last trailer value (`tail -1`) so it matches the writer. Add a test case with two crafted `Authored-by` trailers.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Protected automation changes need review 📜 Skill insight § Compliance
Description
The PR changes protected scripts, including the publishing path used to update repository branches.
Because scripts/ is an active protected path, these changes require explicit protected-path review
before approval, even though the PR provides an issue reference and implementation rationale.
Code

scripts/post-code.src.sh[R756-763]

+PUSH_OUTPUT="$(forge_push_branch "${BRANCH}" 2>&1)" && PUSH_RC=0 || PUSH_RC=$?
print_sanitized_gha_log "${PUSH_OUTPUT}"

if [ "${PUSH_RC}" -ne 0 ]; then
-  if echo "${PUSH_OUTPUT}" | grep -qi "non-fast-forward\|rejected\|fetch first"; then
+  if echo "${PUSH_OUTPUT}" | grep -qi "non-fast-forward\|rejected\|fetch first\|not a fast forward"; then
    gha_echo warning "Plain push failed (non-fast-forward) — retrying with --force-with-lease"
    FORCE_PUSH_OUTPUT=""
-    if ! FORCE_PUSH_OUTPUT="$(git push --force-with-lease -u origin -- "${BRANCH}" 2>&1)"; then
+    if ! FORCE_PUSH_OUTPUT="$(forge_push_branch "${BRANCH}" --force-with-lease 2>&1)"; then
Relevance

● Weak

A recent precedent rejected adding a separate hardcoded protected-scripts approval guard when
existing configuration handled protection.

PR-#1196

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The repository's default REVIEW_PROTECTED_PATHS includes scripts/, and the PR changes the
protected publishing implementation in scripts/post-code.src.sh and scripts/post-fix.src.sh. The
compliance checklist requires a protected-path finding for any changed file matching an active
protected prefix.

scripts/post-review-test.sh[430-434]
scripts/post-code.src.sh[756-763]
scripts/post-fix.src.sh[1156-1163]
Skill: pr-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR modifies files under the repository's active `scripts/` protected path without an explicit protected-path review finding.

## Fix Focus Areas
- scripts/post-code.src.sh[756-763]
- scripts/post-fix.src.sh[1156-1163]

## Recommended Fix
Add and complete the required protected-path least-privilege review for the changed publishing logic before approving the PR. Verify that the GitHub API permissions and branch-update behavior are limited to the signed-publishing use case.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Compliance rules (platform): 57 rules
✅ Skills: 4 invoked
  code-review
  code-implementation
  pr-review
  docs-review
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/fullsend (sha: 9f188578) — View relationship
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: 960eff35) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: 8f50bdda) — View relationship
Review mode: Auto: 🧠 Deep: Large, bug-dense API, ref-update, retry, and history-rewrite changes span many paths.

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread docs/code.md Resolved
Comment thread scripts/lib/github-signed-push.lib.sh Resolved
Comment thread scripts/lib/github-signed-push.lib.sh Resolved
Comment thread scripts/lib/github-signed-push.lib.sh Resolved
@ralphbean

Copy link
Copy Markdown
Member

/fs-review

Comment thread docs/code.md Resolved
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:07 PM UTC · Completed 1:23 PM UTC

Commit: c41f0c6 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.83

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Tier 1 is about 2.75, Tier 2 about 3.0 and Tier 3 about 3.0, so the composite is about 2.9 and rounds to 3. The PR grew from about 2944 to 3290 changed lines across 26 files, is breaking with no opt-in or rollback path, and touches 23 protected scripts plus CI; the prior score of 3 is preserved.

Previous run

Risk Assessment: elevated (3/5)

Details

The PR is large (2944 lines) and breaking, touches protected scripts and CI, has no opt-in or rollback path, edits heavily churned files, and the issue has unresolved design discussion; composite about 3.1 rounds to 3.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [auth-bypass] scripts/lib/github-signed-push.lib.sh:164 — The publisher keeps every existing Authored-by line on any commit whose author matches *"[bot] <"*, without checking the exact App email or the commit's provenance. A commit authored as another x[bot] carrying a forged Authored-by: fullsend-fix <APP_EMAIL> survives a rebase and republish; once GitHub sets the real App as author, commit_author_identity and authorized-range.sh accept the forged identity. Impact is bounded: the forging commit must already be on the PR branch, and a later redo/reset mainly discards the forger's own commit.
    Remediation: Keep an existing trailer only when the source commit's author is exactly the App bot (name and GIT_BOT_EMAIL), the rule commit_author_identity uses; otherwise strip it. Add a regression test for a forged trailer on another bot's commit and regenerate the bundles.
  • [consumer-incompleteness] scripts/post-fix.src.sh:676 — commit_author_identity reads the effective author from the trailer, but only history preservation uses it. The signoff helpers in scripts/lib/precommit-gate.lib.sh still identify agent commits by %ae == bot email (line 50). After a human commit is republished through the API its git author is the App bot, so on a later rebase SCAN_RANGE widens to the merge base and the human's legitimate DCO Signed-off-by is stripped.
    Remediation: Make the signoff detection and rewrite helpers (including the filter-branch message filter) use the effective author. Add a regression test for a human signed-off commit published and then rebased, and regenerate the bundles.
  • [logic-error] scripts/lib/github-signed-push.lib.sh:172 — The Authored-by: name <email> trailer is appended after validation. A realistic trailer such as Authored-by: fullsend-code <249912571+fullsend-ai-coder[bot]@users.noreply.github.com> is ~86 characters, over gitlint's default body-max-line-length of 80 (.gitlint does not override it). post-fix.src.sh section 1b strips Signed-off-by for the same reason. Tests use short identities and never run gitlint on the published message.
    Remediation: Use a trailer form within commit-message line limits, or confirm gitlint ignores trailers, and add a test with a realistic bot email.
  • [backward-incompatible] docs/fix.md:197 — Agent commits on GitHub are now authored by the App bot, so external tooling that counts fix commits by git author name (fullsend's reusable-dispatch.yml iteration cap) stops matching until it reads the trailer. The PR body documents the fix(dispatch): count prior fix commits by their Authored-by trailer too fullsend#8425 dependency, but docs/code.md and docs/fix.md do not record the merge-ordering requirement.
    Remediation: Record in docs/code.md or docs/fix.md that fix(dispatch): count prior fix commits by their Authored-by trailer too fullsend#8425 must be merged and released first, or confirm it has landed.
  • [stale-doc] skills/fix-history-rewrite/references/procedure.md:170 — Step 5 still says the rewrite base is git rev-parse ${oldest}^, but step 4 no longer defines ${oldest}; it now runs scripts/authorized-range.sh, which prints REWRITE_BASE.
    Remediation: Change step 5 to use the REWRITE_BASE printed in step 4, keep the fail-closed sentence, and drop ${oldest}.
  • [protected-path] scripts/lib/github-signed-push.lib.sh — This PR modifies protected paths (scripts/, including post-code/post-fix/pre-* scripts, libs and tests, and skills/fix-history-rewrite/). The PR links issue Code agent: use GitHub commit API for verified commits #357 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.

Low

  • [fail-open] scripts/lib/github-signed-push.lib.sh:189 — Signature enforcement only rejects when PUSH_TOKEN_SOURCE is exactly github-app; if unset, empty or unknown, an unsigned commit only warns and is published. The harnesses pass the variable through and the fallback matches the pre-PR git push behavior, so this is a hardening gap rather than a bypass.
    Remediation: Consider an explicit allowlist of non-App token sources and rejecting unknown values; add tests for unset and unknown.
  • [scope-exceeded] skills/fix-history-rewrite/scripts/authorized-range.sh — Issue Code agent: use GitHub commit API for verified commits #357 does not name the new skill script, the fix-history-rewrite edits or its test. They follow from moving authorship into a trailer, but the trust rule is now implemented separately in commit_author_identity, the lib and this script, and the copies already differ (see the auth-bypass finding).
    Remediation: Note in the PR description why these changes are required and keep the trust rule defined in one place.
  • [breaking-config] docs/code.md:80 — A signature made in the sandbox (gitsign/SSH via harness env) is replaced by GitHub's on publish; this is documented, but there is no opt-out and no runtime warning.
    Remediation: Mention in release notes; optionally warn when sandbox signing env is detected.
  • [incorrect-doc] skills/fix-history-rewrite/references/procedure.md:176 — The line "Do not rewrite commits authored by the code agent (fullsend-code or any name other than $GIT_AUTHOR_NAME)" does not mention that on GitHub API-published code-agent commits are authored by the App bot and identified by the Authored-by trailer.
    Remediation: Add a pointer to the identity rule in SKILL.md.
  • [backward-incompatible] scripts/lib/post-failure-report.lib.sh:179 — The push-rejected category now also matches "not a fast forward" and "rule violations", widening a string contract consumed downstream. Additive and low risk.
    Remediation: Mention in release notes and confirm no consumer treats push-rejected as non-retryable in a conflicting way.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

High

  • [injection-vuln] scripts/lib/github-signed-push.lib.sh:168 — git interpret-trailers runs on the runner in the sandbox-extracted repo without trusted-config overrides, so a repo-local trailer.<x>.cmd set by the agent would execute while the push token is available. Base git push also ran with the token, so the delta is uncertain.
    Remediation: Build the trailer without repo-configured trailer commands (or isolate git config), add a regression test with a malicious trailer.*.cmd, and regenerate the bundled scripts.
  • [scope-authorization-conflict] scripts/lib/github-signed-push.lib.sh — Issue Code agent: use GitHub commit API for verified commits #357 has unresolved maintainer design questions (opt-in vs default, GitLab, /fs-fix rebase flows). The PR makes API publication the unconditional GitHub default, marks it BREAKING, and its own body calls opt-in vs default "a platform decision" with an ADR as follow-up. GitHub/GitLab behavior now diverges and the Authored-by convention is not recorded in an ADR. Needs maintainer decision.
    Remediation: Get maintainer sign-off or an ADR, or gate the API path behind an opt-in setting that keeps git push as the default.

Medium

  • [logic-error] scripts/lib/github-signed-push.lib.sh:168 — --if-exists replace replaces only one existing Authored-by trailer. A non-bot commit with two trailers where the first is fullsend-fix <bot email> keeps it, and commit_author_identity (head -1) then treats it as fix-agent work eligible for removal on redo/reset. Tests cover only one pre-existing trailer.
    Remediation: Strip all existing Authored-by trailers for non-bot commits, fail closed on multiple trailers in commit_author_identity, add a duplicate-trailer regression test.
  • [auth-bypass] scripts/post-fix.src.sh:679 — The Authored-by trailer is trusted whenever the author name ends in [bot]; names, emails and trailers are unauthenticated, so a forged X[bot] commit with a crafted trailer can be classified as fix-agent work. This slightly widens an already forgeable gate (the PR lists comparing the author email as a follow-up). The fix-history-rewrite skill uses the same rule.
    Remediation: Require at least the App bot's exact noreply email (or an authenticated provenance signal) before trusting the trailer, apply it in the skill too, and add forged-name/trailer tests.
  • [protected-path] scripts/lib/github-signed-push.lib.sh — The PR modifies protected paths (scripts/ — 19 files including the post-/pre- scripts, libs, tests and fixture — and skills/fix-history-rewrite/). It links Code agent: use GitHub commit API for verified commits #357 and explains the rationale, but human approval is always required for protected-path changes.

Low

  • [code-organization] scripts/lib/github-signed-push.lib.sh:240 — _SIGNED_PUSH_DIR, _SIGNED_PUSH_MAP and _SIGNED_PUSH_BLOBS are assigned in forge_push_branch without local, leaking into the caller's shell.
    Remediation: local rc=0 _SIGNED_PUSH_DIR _SIGNED_PUSH_MAP _SIGNED_PUSH_BLOBS.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

gwenneg added a commit to gwenneg/agents that referenced this pull request Oct 14, 2026
…view findings

Follow-up to the signed publish, from the review of fullsend-ai#1675:

- The trailer step runs outside the checkout, so a repo-local
  trailer.*.cmd set in the sandbox cannot execute on the runner; a test
  plants one.
- A commit that is not bot-authored loses every Authored-by line before
  the real one is added, and post-fix and the fix-history-rewrite skill
  read the trailer only from the App bot's own commits (exact noreply
  email) carrying exactly one, so a crafted trailer cannot be laundered
  through a rebase or another bot's commit.
- A commit GitHub did not sign fails the publish when the token is an
  App installation token; other tokens keep the warning, since they
  never get a signature.
- The fix skill's redo/reset range is computed by a tested helper,
  scripts/authorized-range.sh, instead of prose.
- Tests for the PR-body trailer strip and for submodule entries; push
  globals scoped with local; the Signed commits docs trimmed as asked
  and the blob claim narrowed to what the code does.

fullsend counts prior fix commits by git author name, which this change
makes always zero; the companion fullsend PR counts them by the trailer
and must land first.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gwenneg

gwenneg commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Review findings addressed in a1b611b:

  • injection-vuln: confirmed (a repo-local trailer.*.cmd ran and rewrote the trailer). The trailer step now runs outside the checkout; a test plants such a command and checks it does not run.
  • logic-error (one trailer replaced): non-bot commits lose every Authored-by line first; post-fix and the skill fail closed on more than one trailer. Tests on both sides.
  • auth-bypass (any [bot] trusted): the trailer is read only from the App bot's exact noreply address (GIT_BOT_EMAIL) with a single trailer, in post-fix and in the skill, which now applies the rule through a tested helper. A github-actions[bot] commit with a crafted trailer is preserved.
  • code-organization: the three push variables are local.
  • scope-authorization-conflict: default-on is what Code agent: use GitHub commit API for verified commits #357 asks for; maintainer sign-off requested from @ralphbean above, and the fullsend ADR is a listed follow-up.
  • protected-path: acknowledged, human approval required.

gwenneg added a commit to gwenneg/fullsend that referenced this pull request Oct 14, 2026
Agent commits published through the GitHub API (fullsend-ai/agents#1675)
are authored by the App's bot user and keep the fix agent's identity in
an "Authored-by: fullsend-fix <...>" trailer, so a count by git author
name alone sees none of them and the fix iteration cap never engages.
Count a commit as a prior fix when its author name is fullsend-fix or a
line of its message starts with that trailer. Both forms count, so this
is safe to land before the agents change.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Oct 14, 2026
Agent commits published through the GitHub API (fullsend-ai/agents#1675)
are authored by the App's bot user and keep the fix agent's identity in
an "Authored-by: fullsend-fix <...>" trailer, so a count by git author
name alone sees none of them and the fix iteration cap never engages.
Count a commit as a prior fix when its author name is fullsend-fix or a
line of its message starts with that trailer. Both forms count, so this
is safe to land before the agents change.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
gwenneg added a commit to gwenneg/fullsend that referenced this pull request Oct 15, 2026
The filter accepted the trailer from any author, so anyone who can push
to the PR branch could reach the cap and block /fs-fix. Pass the fix
job's GIT_BOT_EMAIL as --arg bot_email and count the trailer only when
the commit author email equals it, the rule authorized-range.sh applies
in fullsend-ai/agents#1675.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ralphbean

Copy link
Copy Markdown
Member

/fs-review

@gwenneg

gwenneg commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Update: the API publish path is now behind a switch, and the switch ships off

Short version: merging this PR no longer changes how any repository pushes. The new code only runs where someone turns it on.

What changed in 4e34caf

  • New variable GITHUB_SIGNED_COMMITS, set to "false" in the GitHub blocks of harness/code.yaml and harness/fix.yaml.
  • Off: forge_push_branch runs the same git push -u origin BRANCH and the same --force-with-lease retry as main does today. On: it runs the API publish reviewed in this PR.
  • The functional evals turn it on through eval/harness/code.yaml and eval/harness/fix.yaml, the same pattern as eval/harness/review.yaml, so CI keeps running the API path on every PR.
  • Documented in docs/code.md and docs/fix.md. A repo overrides it with a base: overlay, the usual path (ADR 0080). This is also what Code agent: use GitHub commit API for verified commits #357 asked for in July: a customization that keeps the normal behaviour.
  • The ! and the breaking-change note are gone from the title and the first commit, since nothing breaks on merge.

Why merging is safe now

  • The off path is not new code. It is the push main runs today, behind one if.
  • The rest of the PR does nothing until a commit is published through the API. The identity rule reads the Authored-by trailer only when the git author is the App bot. Sandbox commits are authored fullsend-code and fullsend-fix, so it returns the git author exactly as before.
  • GitLab is untouched in both modes.
  • fix(dispatch): count prior fix commits by their Authored-by trailer too fullsend#8425 (merged) counts fix commits by trailer and by author name, so the fix iteration cap works in both modes.

How it is tested

  • Both paths are covered. Switch on: the existing API scenarios, and post-code now checks that the pushed commit was really rebuilt by the API. Switch off: the library pushes with the variable unset, "false" and "1"; git's own non-fast-forward wording and the --force-with-lease pass-through are checked; post-code and post-fix run their publish flows (append, redo, rebase) through a plain git push, and any Git Data API call fails the test.
  • The default is pinned: yq checks fail if the harnesses ship anything but "false", or if the eval overlays stop turning it on.
  • Suites on Ubuntu, source and bundled mode: library 46, post-code 246, post-fix 165, sign-off 63, authorized-range 6, failure-report 80, all green.
  • The functional tests on this PR already ran code and fix end to end against an ephemeral repo through the API path, with pr_created passing.
  • Live runs with a real App installation token on a scratch repo (details in the description): commits came back verified: true, a required_signatures ruleset accepted them and rejected a plain git push with the same token.
  • On "using it yourself": I ran the real post-code and post-fix scripts from this branch against that scratch repo with the App token (publish, fix append, redo recognised through the trailer, lease push). That is not a week of production traffic in an enrolled repo. The switch exists so that trial can happen on volunteer repos instead of on everyone.

Proposed rollout

  1. Merge with the switch off. No runtime change for anyone.
  2. Trial on volunteer repos: a base: overlay on code and fix with GITHUB_SIGNED_COMMITS: "true". Watch the Verified badge, post-script failure comments, and fix runs that rebase, squash or redo.
  3. Flip the default in a one-line PR, which also deletes the eval overlays. Reverting is the same line. A repo that hits trouble opts out alone.
  4. Keep the switch as a permanent opt-out. A commit touching more files than GitHub's hourly content-creation limit allows, GitHub Enterprise Server without web commit signing, and tooling that matches agent commits by git author name are real reasons to stay on git push.

Known follow-ups and tech debt

  • At the flip: delete the eval overlays. Repos that opted in should drop their base: overlay afterwards, or they stay pinned to a SHA.
  • Source the push library from the post-scripts only, so the pre-script bundles stop carrying it.
  • Fold the non-fast-forward retry predicate duplicated in both post-scripts and the test helpers. Later, consider unifying the library's retry with forge_retry_transient; not a drop-in, since it does not match rate-limit errors.
  • Resolve candidate identities once in history_rewrite_preserves_remote_human_commits, seed known blobs from every parent of a merge, and exclude the remote SHA explicitly from the rebuild set.
  • fullsend side: an ADR recording API publication as the signing path for agent commits, after which the gitsign and SSH-key-as-secret docs are obsolete.

🤖 Generated by Claude Code

@gwenneg

gwenneg commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

I hope this will make it easier.

As stated above, I only tested on a scratch repo so far. But I maintain or own 14 Red Hat repos currently onboarded to Fullsend and ready to test signed commits, so I'll have plenty of occasions to test this once it's merged.

I don't think splitting the PR into smaller ones would really make sense here, but I can still do it if that helps.

gwenneg and others added 9 commits October 24, 2026 00:15
… they are signed

Commits built by git in the sandbox are pushed unsigned, and a repository
whose rules require signed commits rejects every agent PR. GitHub signs
the commits it creates itself for a GitHub App installation token, so
post-code and post-fix now rebuild each commit that origin does not have
yet through the Git Data API (blobs, tree, commit) with the push token
they already hold, move the branch ref with the updateRefs mutation, and
move the local branch onto the commits GitHub created. GitLab keeps
git push.

GitHub makes the App's bot user the author of every rebuilt commit, so
the identity the sandbox committed with is kept in an
`Authored-by: name <email>` trailer, trusted only on bot-authored
commits; post-fix and the fix-history-rewrite skill read it so redo and
reset still tell fix-agent commits from code-agent and human ones. The
ref update is a compare-and-swap anchored to the remote-tracking ref,
which keeps the --force-with-lease semantics of git push. Merges are
rebuilt against the parent with the smaller diff and blobs GitHub
already holds are not uploaded again, to stay under the secondary rate
limit. The API's rejection wording feeds the existing retry and failure
categorizer.

The approach was prototyped by Hector Martinez Lopez (@rh-hemartin) in
rh-hemartin-fullsendai/standalone-fullsend (gh-app-commit.py) and
proposed in fullsend-ai#357.

On GitHub, with the API publish enabled, agent commits are authored by the App's
bot user and signed by GitHub, with the sandbox identity in an
`Authored-by` trailer. A signature made inside the sandbox (gitsign or
SSH signing configured through the harness env) does not survive
publication. Tooling that matched agent commits by git author name must
read the trailer instead. GitLab is unchanged.

Closes fullsend-ai#357

Co-authored-by: rh-hemartin <87312991+rh-hemartin@users.noreply.github.com>
Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view findings

Follow-up to the signed publish, from the review of fullsend-ai#1675:

- The trailer step runs outside the checkout, so a repo-local
  trailer.*.cmd set in the sandbox cannot execute on the runner; a test
  plants one.
- A commit that is not bot-authored loses every Authored-by line before
  the real one is added, and post-fix and the fix-history-rewrite skill
  read the trailer only from the App bot's own commits (exact noreply
  email) carrying exactly one, so a crafted trailer cannot be laundered
  through a rebase or another bot's commit.
- A commit GitHub did not sign fails the publish when the token is an
  App installation token; other tokens keep the warning, since they
  never get a signature.
- The fix skill's redo/reset range is computed by a tested helper,
  scripts/authorized-range.sh, instead of prose.
- Tests for the PR-body trailer strip and for submodule entries; push
  globals scoped with local; the Signed commits docs trimmed as asked
  and the blob claim narrowed to what the code does.

fullsend counts prior fix commits by git author name, which this change
makes always zero; the companion fullsend PR counts them by the trailer
and must land first.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… and the sign-off helpers

The publisher kept an existing Authored-by trailer on any commit whose
author name ended in [bot], so a forged trailer on another bot's commit
survived publication and the App then became its author. It now keeps
the trailer only when the author is the App bot itself, name and
GIT_BOT_EMAIL, the rule commit_author_identity applies.

A human commit republished through the API is authored by the App bot
too, which the Signed-off-by helpers took for an agent commit and
stripped its sign-off on the next merge-base scan. commit_author_identity
moves into precommit-gate.lib.sh and signoff_is_bot_commit compares the
author it returns; the filter-branch filter rewrites the commits the
walk selected, named through GIT_COMMIT.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… procedure

Step 5 still derived the rewrite base from ${oldest}, which step 4 no
longer defines since it runs scripts/authorized-range.sh. The code-agent
sentence now points at the identity rule in SKILL.md.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the API

A human commit the post-script already published is authored by the App
bot with an Authored-by trailer. Rebase it onto an advanced target and
run post-fix with a human rebase request: the preservation check must
find it by patch-id and the trailer author, and the republished commit
must keep the trailer. commit_as_published takes an optional trailer
email so the trailer can name a human address.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d helper

The lost-published-code-agent and spoofed-trailer refusals are the same
flow as run_redo_refused_test with a different seed and message, so they
become seed functions. The post-code PR-body test exercised its own copy
of the body pipeline, not the script; a grep on the script for the
Authored-by sed line gives the same guarantee.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The ownership rule is stated once in commit_author_identity and once in
SKILL.md; the other copies become pointers or go. Bundles regenerated.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… helper

The four `A && B || C` assertions in fix-authorized-range-test.sh fail the
pre-commit shellcheck hook (SC2015), which the required `test` check runs.
An `expect` helper written as an explicit if/else replaces them; the cases,
repositories and expected output are unchanged.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…_COMMITS, off by default

forge_push_branch takes the Git Data API path only when
GITHUB_SIGNED_COMMITS is "true"; with any other value, or unset, it runs
the same `git push -u origin BRANCH` (and `--force-with-lease` retry) as
before this PR. harness/code.yaml and harness/fix.yaml set it to "false"
in their GitHub blocks, so merging this PR changes nothing at runtime; a
repository opts in through a `base:` overlay and the fleet default flips
in a later one-line change.

eval/harness/code.yaml and eval/harness/fix.yaml turn the switch on for
the functional evals, registered in the root config.yaml like
eval/harness/review.yaml, so every PR keeps exercising the API path end
to end.

Tests: the existing GitHub runs of the post-code, post-fix and library
suites export the switch on, and post-code now asserts the remote tip
was rebuilt by the (fake) API; the same suites run the plain-push path
with the switch unset, "false" and "1", including git's non-fast-forward
wording, the --force-with-lease pass-through, and the post-fix append,
redo and rebase publishes, with any Git Data API call failing the run;
yq checks pin the harness default, the eval overlays and their
registration; the bundles are checked for the switch.

Signed-off-by: Gwenneg Lepage <gwenneg@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rh-hemartin

Copy link
Copy Markdown
Member

Thanks for the additional effort, the gate makes it easier.

@rh-hemartin
rh-hemartin enabled auto-merge October 26, 2026 07:38
@rh-hemartin
rh-hemartin added this pull request to the merge queue Oct 26, 2026
Merged via the queue into fullsend-ai:main with commit 3e9f702 Oct 26, 2026
40 of 41 checks passed
@gwenneg
gwenneg deleted the feat/357-signed-commits branch October 26, 2026 08:03
gwenneg added a commit to RedHatInsights/notifications-backend that referenced this pull request Oct 26, 2026
#5075)

Temporarily pins the dispatch reusable workflow to a non-release build so
the agents-repo fallback resolves fullsend-ai/agents@main, which now
includes fullsend-ai/agents#1675 (signed commits via the GitHub Git Data
API). Revert to the v0.49.0 pin once testing is done.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
gwenneg added a commit to RedHatInsights/notifications-backend that referenced this pull request Oct 26, 2026
Adds local .fullsend/ overlays that base on the merged
fullsend-ai/agents#1675 harnesses (pinned by commit SHA + sha256) and
flip GITHUB_SIGNED_COMMITS to "true", since the feature ships off by
default. Lets the code/fix agents actually exercise the new Git Data
API publish path on this repo. Revert once testing is done.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@gwenneg

gwenneg commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Here's our first PR created from /fs-code with the latest Fullsend version (not released yet) in a repo that requires signed commits: RedHatInsights/notifications-backend#5077. This confirms Fullsend agents are now able to push signed commits in our GitHub organization.

This branch was previously deployed

1 inactive deployment
dev — 4e34cafc Deployed Oct 26, 2026 by rh-hemartin via behaviour #1284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code agent: use GitHub commit API for verified commits

4 participants