fix(service,features,desktop): a pull request a coding agent opened as its developer still reads as from Luke's agents
Merged
DA
3d ago+126+126+012345678901234567890123456789-8-8-0123456789
Summary
PR 2 of 3, stacked on #2952. Agreed with the automations owner (worker 288, #2780).
With #2952, a coding agent that writes as its developer opens its PR on their token. The pull_request delivery then names the developer as sender, and "From Luke's agents" would stop matching. GitHub's performed_via_github_app is not on pull_request payloads: GitHub's OpenAPI has it on issue but not on pull-request or pull-request-webhook. So the head branch tells it instead.
PullRequestSchemareadshead.refbesidehead.repo(the fork check).pullRequestSender: a person who opens, reopens, or marks ready a PR from aluke/branch of the repository's own (not a fork) reads asLUKE_AGENTS. Reopened is already the OPENED moment, so there is no new moment.synchronize(a push) stays keyed on the push sender, which isluke[bot]for every push an agent makes. The loop guardLUKE_AGENTS && pushedis unchanged.- Known limits:
- A person who opens or readies a PR from a
luke/branch by hand is counted as Luke's agents. That mislabels the event but grants nothing. - Issues don't follow: an issue an agent opens as its developer has no branch to tell it by, so it reads as people's.
- A person who opens or readies a PR from a
- The editor's "From Luke's agents" detail now reads "What Luke's coding agents open, as you or as the workspace's GitHub App."
Evidence
pnpm check:affected: exit 0.pnpm exec vitest run packages/service/src/github/github-webhook-app.test.ts: 8 passed. The new test runs seven deliveries against a people-only and an agents-only trigger:- A person's opened, ready, and reopened on
luke/are agents'. - The bot's push fires nothing.
- The person's push to
luke/, a fork'sluke/, and any other branch are people's.
- A person's opened, ready, and reopened on
Invariants
-
./scripts/check.shgreen. (CI) - JSON Schema goldens unchanged.
- Every behavior change has, in this PR, the test that fails without it; no change-detector test added.
- Gateway envelope goldens unchanged.
- No new
astype assertion outside the allowlisted files. - No
Effect.runPromise/runSync/runForkoutside the runtime edges. - No new raw async primitives.
- No Effect, Stream, or Layer written as a statement and dropped.
- Test count: +1.
- Nothing hand-rolled replaced.
- Every
CLAUDE.md/AGENTS.mdsentence naming a changed part is edited (none names it). -
PRIVACY.mdunchanged. - Package deps match.
- Barrel/door rule.
Notes
- A desktop copy change with no capture: the one detail string under the "From Luke's agents" switch.
š¤ Generated with Claude Code
Summary by cubic
Fixes pull_request sender attribution so a PR a coding agent opens as its developer reads as from Luke's agents instead of from a person.
- Uses the head branch
refand the action (opened, reopened, ready_for_review) to mark a PR from aluke/branch of the repository as agent-opened. - Pushes remain keyed on the push sender, so the loop guard is unchanged.
- A person manually opening or readying a
luke/branch PR counts as an agent, a mislabel that grants nothing; issues opened as a developer have no branch and still read as people's. - Updates the editor's description text for the "From Luke's agents" sender.