Skip to content

fix(scripts): drop unverified local git identities from squash co-author credit - #145128

Merged
steipete merged 2 commits into
mainfrom
steipete/upd-merge-body-local-identity
Sep 11, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/upd-merge-body-local-identity

Conversation

@steipete

@steipete steipete commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Refs #145094

Additional instructions

Maintainers can update this same-repository branch.

What Problem This Solves

Resolves a problem where maintainers landing a PR could include a contributor's unlinked local machine identity as a squash co-author. PR #145094 credited its human author correctly but also carried the local git identity into the landed commit.

Why This Change Was Made

The squash composer now qualifies commit-derived credit using GitHub's linked author for each published non-merge commit. It drops reserved/local-domain identities, unlinked authors, and unresolved noreply identities, while retaining linked humans and the narrow unlinked-name match to the human PR author's login. Existing verified bot exclusions remain in place. The merge-outcome and Crabbox authorization fixtures now model the commit-author API response; their authorization and attribution assertions remain intact.

The composer filters matching preview/source trailers and reports removed credit in one preparation-log line. PR-author credit, reviewed-body byte preservation, and merge-queue admission rules retain their existing ownership. No update runtime behavior changes.

User Impact

Squash messages preserve human contributor credit without adding local machine identities. No migration or configuration change is needed; this affects the maintainer landing wrapper only.

Evidence

  • node scripts/run-vitest.mjs test/scripts/pr-merge.test.ts -t '#145094 shape' failed before the production fix: the actual body contained an extra Co-authored-by: local-agent <[email protected]> trailer.
  • node scripts/run-vitest.mjs test/scripts/pr-merge.test.ts: 121 passed, including the regression, linked human/public noreply addresses, all requested reserved domains, unlinked authors, the PR-login exception, and existing verified-bot cases.
  • The existing signed-commit test caught signature-display text entering the new commit-ID read. Disabling Git presentation output for that read fixed it; the full file passed afterward.
  • Read-only replay of the published squash message from 6c4fe0c1157, using GitHub author evidence for 79fb949be8, removed its local co-author trailer and preserved Thanks @eleqtrizit.
  • node scripts/check-changed.mjs: passed (formatting, root-test types, tooling/test lint, dependency and dead-export guards).
  • node scripts/run-vitest.mjs test/scripts/pr-crabbox-merge-bypass.test.ts: 38 passed.
  • node scripts/run-vitest.mjs test/scripts/pr-merge-outcome.test.ts -t 'snapshots corrected squash|submits verified attribution|retains confirmed admin merge before failed post-merge audit|keeps unapplied uncertainty': 11 passed. The full local sweep was stopped to update the second fixture; the final exact-head CI run passed.
  • Follow-up node scripts/check-changed.mjs -- <fixture-path> checks passed separately for both updated fixture files.
  • Initial CI exposed a stale merge-outcome commit-API fixture. A sibling Crabbox fixture had the same mismatch (3 failing cases reproduced locally); both adapters now distinguish author lookup from the existing audit request.
  • Final exact-head CI run 34633282466 completed successfully for 767b983e7c24c1bc509b8e4ce3f1fb18efb7aca5. The native watcher returned GREEN with zero pending checks after reconciling 13 superseded checks; GitHub's raw rollup still retains those older failures.
  • git diff --check and /bin/bash -n scripts/pr-lib/merge.sh: passed.

Known limits: GitHub author reads are required for published non-merge commits; unavailable evidence stops preparation. Existing explicit human/source credit rules remain unchanged apart from filtering the identified excluded addresses. No merge or live Gateway operation was performed. Maintainer review and landing are pending.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 11, 2026
@steipete
steipete marked this pull request as ready for review September 11, 2026 18:09
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 2:45 PM ET / 18:45 UTC (Revision 3).

ClawSweeper review

What this changes

The maintainer merge wrapper checks GitHub-linked commit authors, removes excluded squash co-author credit, logs removals, and updates the affected test fixtures.

Merge readiness

✅ Ready for maintainer review

The fix remains useful: current main and v2026.9.4 still accept unverified commit-author identities. The prior fixture finding is resolved, pinned-head CI passed, and no blocking correctness defect remains.

Priority: P2
Reviewed head: 767b983e7c24c1bc509b8e4ce3f1fb18efb7aca5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, corrected sibling fixtures, and verified successful CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its body reports a production-composer replay using published GitHub data; source inspection and pinned-head CI support the change, without claiming a live merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its body reports a production-composer replay using published GitHub data; source inspection and pinned-head CI support the change, without claiming a live merge.
Evidence reviewed 8 items Current main still needs the fix: The current-main composer builds eligible credit from commit email strings and excludes known machine addresses, without the proposed linked-author and local-domain filtering.
Latest release comparison: v2026.9.4 contains the same email-based eligibility mechanism; this PR’s additional identity filtering is absent.
Production boundary and failure handling: Preparation resolves published non-merge commits through GitHub and passes structured author evidence to the existing composer. Lookup failures return before merge intent or dispatch; reviewed-body and queue restrictions remain in place. The PR body explicitly documents this operational tradeoff.
Findings None None.
Security None None.

How this fits together

The maintainer merge wrapper combines GitHub’s squash-message preview with contributor credit from prepared commits. Its composer produces the final commit message before the existing merge admission and dispatch checks.

flowchart TD
  A[Prepared commits] --> B[GitHub author lookup]
  C[Squash preview and source credit] --> D[Credit filtering]
  B --> D
  E[Reviewed message override] --> D
  D --> F[Final message or preparation refusal]
  F --> G[Existing merge admission]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +105, Other +36. Total +141 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 124 19 +105
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 61 25 +36
Total 5 185 44 +141

Review metrics

None.

Technical review

Best possible solution:

Keep attribution filtering in the existing squash composer, preserving human credit and reviewed message bytes while reporting excluded identities.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main accepts an unlinked local commit-author email as eligible preview credit. The PR supplies a matching failing-before regression and published-commit example; this review did not execute them.

Is this the best way to solve the issue?

Yes. Extending the existing composer and its author-evidence input addresses the attribution defect without introducing another credit owner or changing merge authority.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b3ffe8760d73.

Labels

Label justifications:

  • P2: This fixes incorrect contributor attribution in maintainer tooling with no application-runtime impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its body reports a production-composer replay using published GitHub data; source inspection and pinned-head CI support the change, without claiming a live merge.

Evidence

What I checked:

  • Current main still needs the fix: The current-main composer builds eligible credit from commit email strings and excludes known machine addresses, without the proposed linked-author and local-domain filtering. (scripts/pr-lib/merge-body.mjs:174, b3ffe8760d73)
  • Latest release comparison: v2026.9.4 contains the same email-based eligibility mechanism; this PR’s additional identity filtering is absent. (scripts/pr-lib/merge-body.mjs:174, 3a9d69db306c)
  • Production boundary and failure handling: Preparation resolves published non-merge commits through GitHub and passes structured author evidence to the existing composer. Lookup failures return before merge intent or dispatch; reviewed-body and queue restrictions remain in place. The PR body explicitly documents this operational tradeoff. (scripts/pr-lib/merge.sh:343, 767b983e7c24)
  • Regression coverage: The attribution tests exercise the production shell/composer boundary with real Git and mocked GitHub responses, covering local identities, linked humans, public noreply addresses, the PR-login exception, and unavailable author evidence. The captured PR body reports a failing-before regression and 121 passing attribution tests; these were not rerun during this read-only review. (test/scripts/pr-merge.test.ts:266, 767b983e7c24)
  • Previous finding resolved: The follow-up commit adds the author-response adapter to both merge fixtures and changes the Crabbox Git-log fixture to return a commit SHA. The merge-outcome adapter distinguishes author lookup from the existing post-merge audit request. (test/scripts/pr-merge-outcome.test.ts:382, 767b983e7c24)
  • Pinned-head CI verified: GitHub confirms that https://github.com/openclaw/openclaw/actions/runs/34633282466 completed successfully for the reviewed head. (767b983e7c24)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-11T18:15:57.456Z sha d8b2ab7 :: needs changes before merge. :: [P2] [P2] Update sibling merge fixtures for the new author lookup
  • reviewed 2026-09-11T18:32:37.874Z sha 767b983 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@steipete
steipete merged commit ba8294b into main Sep 11, 2026
97 of 99 checks passed
@steipete
steipete deleted the steipete/upd-merge-body-local-identity branch September 11, 2026 18:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…hor credit (openclaw#145128)

The squash composer credited a local agent git identity on openclaw#145094 because it trusted commit author email strings without verifying their GitHub linkage.

Qualify published non-merge authors using GitHub evidence, remove local and unverified identities, and preserve verified human credit. Update the merge fixtures for the author lookup.

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

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant