From efe0923914312487e790f059837f6f89eefce16f Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Wed, 14 Oct 2026 19:06:36 +0800 Subject: [PATCH] fix(release): exclude Codex automation from contributor thanks --- .agents/skills/rea-changelog-update/SKILL.md | 6 +++--- scripts/lib/release-notes.mjs | 4 ++-- tests/boundary/filesystem/releaseNotes.test.ts | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.agents/skills/rea-changelog-update/SKILL.md b/.agents/skills/rea-changelog-update/SKILL.md index 027682cfa3..d45f226383 100644 --- a/.agents/skills/rea-changelog-update/SKILL.md +++ b/.agents/skills/rea-changelog-update/SKILL.md @@ -68,9 +68,9 @@ closing-issue reporters. Grouping preserves all those credits in one line. When Highlights, detailed entries or migrations reference the same work, put its thanks in one of those entries, not all of them. Include issue links. Direct-commit bullets carry the commit link and known human credit. -Exclude GitHub bots and known agent accounts. REA's observed Anthropic and -Cursor co-author trailers resolve to `@claude` and `@cursoragent` with GitHub -type `User`; the credit policy excludes them while retaining their metadata. +Exclude GitHub bots and known agent accounts. REA's observed Anthropic, Cursor +and Codex co-author trailers resolve to `@claude`, `@cursoragent` and `@codex` +with GitHub type `User`; the credit policy excludes them while retaining their metadata. At the REA maintainer's request, omit `@morluto` self-thanks while preserving authorship in the inventory. Other human contributors remain eligible. Use explicit GitHub links for cross-repository references to avoid ambiguous diff --git a/scripts/lib/release-notes.mjs b/scripts/lib/release-notes.mjs index 1fd5edc4be..d6c640c15b 100644 --- a/scripts/lib/release-notes.mjs +++ b/scripts/lib/release-notes.mjs @@ -98,9 +98,9 @@ export async function readReleaseHistory(run, base, target) { return { base: baseSha, target: targetSha, commits }; } -// REA history maps Anthropic and Cursor's agent trailers to ordinary User actors. +// GitHub maps these coding-agent trailers to ordinary User actors. // Keep those source identities in the inventory while excluding automation credit. -const AGENT_ACCOUNTS = new Set(["claude", "cursoragent"]); +const AGENT_ACCOUNTS = new Set(["claude", "cursoragent", "codex"]); // REA's maintainer requested external-contributor thanks without self-credit. const MAINTAINER_ACCOUNTS = new Set(["morluto"]); const human = (value) => diff --git a/tests/boundary/filesystem/releaseNotes.test.ts b/tests/boundary/filesystem/releaseNotes.test.ts index e01b264eb2..1f10413d5a 100644 --- a/tests/boundary/filesystem/releaseNotes.test.ts +++ b/tests/boundary/filesystem/releaseNotes.test.ts @@ -106,6 +106,7 @@ beforeAll(async () => { author("platformbot", "Bot"), author("claude"), author("cursoragent"), + author("codex"), author("morluto"), ]), associatedPullRequests: page([]), @@ -218,18 +219,30 @@ it("inventories side branches and paginated credits, then checks and renders syn const f = await fixture(); const inventory = z .object({ - commits: z.array(z.object({ sha: z.string() })), + commits: z.array( + z.object({ + sha: z.string(), + authors: z.array( + z.object({ user: z.object({ login: z.string() }).nullable() }), + ), + }), + ), pullRequests: z.array(z.object({ number: z.number() })), }) .parse(JSON.parse(await readFile(f.manifest, "utf8"))); expect(inventory.commits).toHaveLength(3); + expect( + inventory.commits.flatMap(({ authors }) => + authors.map(({ user }) => user?.login), + ), + ).toEqual(expect.arrayContaining(["claude", "cursoragent", "codex"])); expect(inventory.pullRequests.map((pr) => pr.number)).toEqual([101]); expect(f.record).toContain( "Thanks @alice, @bob, @reporter, @second-reporter.", ); expect(f.record).toContain("Thanks @dana."); expect(f.record).not.toMatch( - /@(?:merger|automation|platformbot|claude|cursoragent|morluto)/u, + /@(?:merger|automation|platformbot|claude|cursoragent|codex|morluto)/u, ); const body = join(f.directory, "body.md"); await writeFile(