Skip to content

Commit 69fc0b6

Browse files
author
CodeWhale Bot
committed
chore: drop the co-author trailer gate, keep harvested credit
The Lint job ran scripts/check-coauthor-trailers.py on every commit range and rejected any Co-authored-by trailer that was not a human in .github/AUTHOR_MAP or one of two hardcoded agent identities. In practice it rejected ordinary agent commits -- the default trailer most tools append fails it -- so every contributor and every agent had to learn a rule that bought tidiness and nothing else. Removed: the 46-line "Check harvested contributor credit" step in ci.yml, the checker, its test, and its five fixtures. Also the stale mention in the light-change path filter. Kept, deliberately: harvested contributor credit. auto-close-harvested.yml is independent of the deleted script -- it reads "Harvested from PR #N by @handle" from the commit message -- so a contributor's PR still closes with credit when their work lands, and .github/AUTHOR_MAP remains the canonical human identity list. The rule that survives is "name the humans who did the work". The rule that goes is "no tool may appear in a trailer". The two skills that called the checker now read trailers with git log directly. CONTRIBUTING.md and AGENTS.md say what is true now instead of describing a gate that no longer exists. actionlint is clean on the edited workflow. Signed-off-by: CodeWhale Bot <bot@codewhale.net>
1 parent ceb30eb commit 69fc0b6

12 files changed

Lines changed: 23 additions & 689 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ jobs:
137137
# arm (fail-safe default-heavy). Light-classified scripts below
138138
# are exercised by ALWAYS-on jobs/steps that run regardless of
139139
# `heavy` (check-versions.sh / check-ohos-deps.sh via Version
140-
# drift, check-coauthor-trailers.py via Lint, dev-cache/dev-test
140+
# drift, dev-cache/dev-test
141141
# self-checks via Version drift), so no coverage is lost.
142142
case "${path}" in
143143
scripts/release/npm-wrapper-smoke.js|scripts/mobile-smoke.sh|scripts/check-provider-registry.py)
144144
heavy=true
145145
;;
146-
docs/*|*.md|packaging/aur/*|.github/PULL_REQUEST_TEMPLATE.md|.github/ISSUE_TEMPLATE/*|.github/scripts/agent-task-metadata.test.sh|.github/workflows/agent-task-labels.yml|.github/workflows/auto-tag.yml|.github/workflows/stale.yml|.github/workflows/triage.yml|scripts/release/check-versions.sh|scripts/release/check-ohos-deps.sh|scripts/release/install-dogfood.sh|scripts/release/install-dogfood.test.sh|scripts/release/prepare-release.sh|scripts/release/prepare-release.test.sh|scripts/check-coauthor-trailers.py|scripts/dev-cache.sh|scripts/dev-cache.test.sh|scripts/dev-cargo.sh|scripts/dev-test.sh)
146+
docs/*|*.md|packaging/aur/*|.github/PULL_REQUEST_TEMPLATE.md|.github/ISSUE_TEMPLATE/*|.github/scripts/agent-task-metadata.test.sh|.github/workflows/agent-task-labels.yml|.github/workflows/auto-tag.yml|.github/workflows/stale.yml|.github/workflows/triage.yml|scripts/release/check-versions.sh|scripts/release/check-ohos-deps.sh|scripts/release/install-dogfood.sh|scripts/release/install-dogfood.test.sh|scripts/release/prepare-release.sh|scripts/release/prepare-release.test.sh|scripts/dev-cache.sh|scripts/dev-cache.test.sh|scripts/dev-cargo.sh|scripts/dev-test.sh)
147147
;;
148148
*)
149149
heavy=true
@@ -430,52 +430,6 @@ jobs:
430430
- name: Check website locale dictionary parity
431431
if: github.event_name != 'schedule'
432432
run: node web/scripts/check-locales.mjs
433-
- name: Check harvested contributor credit
434-
if: github.event_name != 'schedule'
435-
shell: bash
436-
env:
437-
EVENT_NAME: ${{ github.event_name }}
438-
PR_MERGE_SHA: ${{ github.sha }}
439-
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
440-
run: |
441-
set -euo pipefail
442-
python3 scripts/test_check_coauthor_trailers.py
443-
if [[ "${EVENT_NAME}" == "pull_request" ]]; then
444-
# Pull-request base.sha can lag the merge ref's actual base parent.
445-
# Comparing it to the synthetic merge checkout therefore
446-
# rechecks unrelated commits that landed on the base after the PR
447-
# opened. Use the merge ref's immutable parents: the base snapshot
448-
# used to synthesize it and the exact PR head, while excluding the
449-
# synthetic merge itself.
450-
if [[ "$(git rev-parse HEAD)" != "${PR_MERGE_SHA}" ]]; then
451-
echo "::error::credit check is not running at the event merge SHA" >&2
452-
exit 1
453-
fi
454-
read -r BASE_PARENT HEAD_PARENT EXTRA_PARENT < <(
455-
git show -s --format='%P' "${PR_MERGE_SHA}"
456-
)
457-
if [[ -z "${BASE_PARENT}" || -z "${HEAD_PARENT}" || -n "${EXTRA_PARENT}" ]]; then
458-
echo "::error::pull-request merge ref must have exactly two parents" >&2
459-
exit 1
460-
fi
461-
if [[ "${HEAD_PARENT}" != "${PR_HEAD_SHA}" ]]; then
462-
echo "::error::merge ref head parent does not match the event PR head" >&2
463-
exit 1
464-
fi
465-
RANGE="${BASE_PARENT}..${HEAD_PARENT}"
466-
if [[ -z "$(git rev-list -1 "${RANGE}")" ]]; then
467-
echo "::error::pull-request credit range is empty" >&2
468-
exit 1
469-
fi
470-
elif [[ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
471-
RANGE="${{ github.event.before }}..${{ github.sha }}"
472-
else
473-
RANGE="HEAD~1..HEAD"
474-
fi
475-
python3 scripts/check-coauthor-trailers.py \
476-
--author-map .github/AUTHOR_MAP \
477-
--range "$RANGE" \
478-
--check-authors
479433
- name: Skip Rust lint for light change
480434
if: needs.changes.outputs.heavy != 'true'
481435
run: echo "No executable Rust changes detected; preserving required Lint context."

AGENTS.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,19 @@ Report commands actually run and distinguish source, local tests, packaged
150150
artifacts, CI, and public release state. Describe the evidence actually needed
151151
for the claim; a test count is not a proxy for product quality.
152152

153-
Community reports, PRs, logs, and reviews are evidence. Canonical human
154-
identities come from `.github/AUTHOR_MAP`; `Co-authored-by` credit is for
155-
humans and for recognized agent contributors (the exact identities listed in
156-
`AGENT_CONTRIBUTOR_IDENTITIES` in `scripts/check-coauthor-trailers.py`, such as
157-
`Codewhale Agent`); unknown bot/tool trailers are still rejected.
153+
Community reports, PRs, logs, and reviews are evidence.
154+
155+
**Harvested contributor credit is still a rule.** When a contributor's work
156+
lands as our commit, that commit carries `Harvested from PR #N by @handle` and a
157+
`Co-authored-by` naming them at their GitHub-linked address, so
158+
`auto-close-harvested.yml` closes their PR with credit and the contribution
159+
graph reflects reality. Canonical human identities come from
160+
`.github/AUTHOR_MAP`.
161+
162+
**Whether a bot or agent also appears in a trailer no longer matters.** The CI
163+
check that policed trailer identities was removed: it rejected ordinary agent
164+
commits and cost more than the tidiness it bought. Give humans their credit; do
165+
not spend time scrubbing tool trailers.
166+
158167
Leave unrelated work intact and keep new enforcement dry-run unless explicitly
159168
approved.

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,11 @@ Use clear, descriptive commit messages following conventional commits:
188188

189189
Example: `feat: add doctor subcommand for system diagnostics`
190190

191-
**Do not leave AI-assistant co-author trailers on your commits.** Using an
192-
assistant is welcome and needs no disclosure, but many tools append something
193-
like `Co-authored-by: Claude <noreply@anthropic.com>` automatically, and the
194-
`Lint` job rejects it — `scripts/check-coauthor-trailers.py` requires
195-
contributor trailers to name humans, because those trailers feed the GitHub
196-
contribution graph. If CI fails on this, drop the line and force-push:
191+
**AI-assistant co-author trailers are fine.** Using an assistant is welcome and
192+
needs no disclosure, and CI no longer rejects an auto-appended
193+
`Co-authored-by: <some tool>` line. What we do care about is that the humans who
194+
did the work are named — `Co-authored-by` feeds the GitHub contribution graph.
195+
Remove an auto-appended line only if you want to:
197196

198197
```bash
199198
git rebase -i origin/main # reword each commit, delete the Co-authored-by line

docs/skills/gh-credit-harvest/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ this skill lands a credited commit and posts thanks; the workflow closes the PR.
5050
```bash
5151
cargo fmt --all
5252
cargo test -p <crate> # the crate(s) the PR touched, not the whole workspace
53-
python3 scripts/check-coauthor-trailers.py --author-map .github/AUTHOR_MAP --range HEAD~1..HEAD --check-authors
53+
git log -1 --format='%an <%ae>%n%(trailers:key=Co-authored-by)' # credit the human, from .github/AUTHOR_MAP
5454
```
5555
7. Post a brief, warm, specific thank-you on the PR — name what the change fixed, no drama. Leave the PR open; the workflow closes it with credit when the commit lands on `main`:
5656
```bash

docs/skills/gh-treasure-hunt/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ alone, and never merge/close/tag without Hunter's approval.
6969
The `Harvested from PR #N by @handle` line lets `auto-close-harvested.yml`
7070
close the PR with credit once the commit reaches `main`. Validate trailers:
7171
```bash
72-
python3 scripts/check-coauthor-trailers.py --author-map .github/AUTHOR_MAP --range BASE..HEAD --check-authors
72+
git log BASE..HEAD --format='%h %an <%ae>%n%(trailers:key=Co-authored-by)' # credit the human, from .github/AUTHOR_MAP
7373
```
7474
8. Sanity-check anything you would actually land locally before recommending it:
7575
```bash

0 commit comments

Comments
 (0)