Repository navigation
fix(scripts): drop unverified local git identities from squash co-author credit - #145128
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 2:45 PM ET / 18:45 UTC (Revision 3). ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherThe 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +105, Other +36. Total +141 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…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
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 extraCo-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.6c4fe0c1157, using GitHub author evidence for79fb949be8, removed its local co-author trailer and preservedThanks @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.node scripts/check-changed.mjs -- <fixture-path>checks passed separately for both updated fixture files.767b983e7c24c1bc509b8e4ce3f1fb18efb7aca5. The native watcher returnedGREENwith zero pending checks after reconciling 13 superseded checks; GitHub's raw rollup still retains those older failures.git diff --checkand/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.