The prepare-commit-msg hook in packages/junior-github/index.js injects a Co-authored-by trailer using JUNIOR_GIT_COAUTHOR_NAME and JUNIOR_GIT_COAUTHOR_EMAIL. When the runtime context's requester identity is not resolved before sandbox env injection, the trailer is written with the raw Slack user ID and a noreply placeholder, which GitHub cannot link to any account.
Root cause (high confidence): The runtime populates the <requester> context block with full_name, user_name, and user_id all set to the raw Slack user ID (e.g. U039RR91S). requesterName() falls back through fullName → userName → userId, so it always resolves to the user ID string. requesterEmail() returns "noreply" when no email field is present. The resulting env vars are:
JUNIOR_GIT_COAUTHOR_NAME=U039RR91S
JUNIOR_GIT_COAUTHOR_EMAIL=noreply
Evidence
- Commit messages from sandbox-authored PRs contain
Co-authored-by: U039RR91S <noreply> — verified in getsentry/junior#520 and getsentry/junior-prod#137.
- Hook source:
packages/junior-github/index.js — prepareCommitMsgHook(), requesterName(), requesterEmail().
- Runtime context shape confirmed: all three identity fields contained the raw Slack user ID at request time.
Fix direction: Resolve the Slack user profile (name + email) before the sandboxPrepare hook runs and injects the coauthor env vars. The slackUserLookup tool (or equivalent internal call) can resolve a user ID to a display name and email; that resolved identity should be what the runtime writes into JUNIOR_GIT_COAUTHOR_NAME/JUNIOR_GIT_COAUTHOR_EMAIL.
Action taken on behalf of David Cramer.
The
prepare-commit-msghook inpackages/junior-github/index.jsinjects aCo-authored-bytrailer usingJUNIOR_GIT_COAUTHOR_NAMEandJUNIOR_GIT_COAUTHOR_EMAIL. When the runtime context's requester identity is not resolved before sandbox env injection, the trailer is written with the raw Slack user ID and anoreplyplaceholder, which GitHub cannot link to any account.Root cause (high confidence): The runtime populates the
<requester>context block withfull_name,user_name, anduser_idall set to the raw Slack user ID (e.g.U039RR91S).requesterName()falls back throughfullName → userName → userId, so it always resolves to the user ID string.requesterEmail()returns"noreply"when no email field is present. The resulting env vars are:Evidence
Co-authored-by: U039RR91S <noreply>— verified in getsentry/junior#520 and getsentry/junior-prod#137.packages/junior-github/index.js—prepareCommitMsgHook(),requesterName(),requesterEmail().Fix direction: Resolve the Slack user profile (name + email) before the
sandboxPreparehook runs and injects the coauthor env vars. TheslackUserLookuptool (or equivalent internal call) can resolve a user ID to a display name and email; that resolved identity should be what the runtime writes intoJUNIOR_GIT_COAUTHOR_NAME/JUNIOR_GIT_COAUTHOR_EMAIL.Action taken on behalf of David Cramer.