Skip to content

ci: attribute nightly doc sweep commits to the deploy bot - #1117

Open
Roasbeef wants to merge 2 commits into
mainfrom
doc-bot-attribution
Open

ci: attribute nightly doc sweep commits to the deploy bot#1117
Roasbeef wants to merge 2 commits into
mainfrom
doc-bot-attribution

Conversation

@Roasbeef

@Roasbeef Roasbeef commented Aug 7, 2026

Copy link
Copy Markdown
Member

In this PR, we make the nightly doc sweep's commits show up as the deploy
bot, and only the deploy bot. Right now they render on GitHub as
"wavelength-doc-bot and claude committed", and each half of that string
has its own cause.

The author identity was never linked to any GitHub account. GitHub
attributes a commit by matching the author email against an account's
verified addresses, and we commit as bot@lightning.engineering, which
matches nothing. The API reports the author of every sweep commit as
literally unlinked, which is why it renders as bare text with a default
avatar rather than as lightninglabs-deploy. We switch to the account's
canonical <id>+<login>@users.noreply.github.com address, taken from
that account's own existing commits, which is the form GitHub resolves
back to the account.

The trailing "and claude" comes from a Co-Authored-By trailer on the
commit message. The prompt's message template never included one, and
worth flagging for anyone tempted by the obvious fix: telling the model
not to write the trailer does not work. The CLI appends it as a
post-processing step after the model writes the message file, so the
model's text is overridden no matter what it writes. The supported lever
is the action's settings input, set to {"includeCoAuthoredBy": false},
which suppresses the trailer on both commits and PRs. Note that this is
an action input taking inline JSON or a file path, not a CLI flag; there
is no --settings to route through claude_args, so passing it that way
would have failed the step outright.

We keep the prompt constraint as documentation of intent, but the
settings input is what enforces it.

These two commits were written against #913 but landed after it merged,
so they come as a follow-up rather than as part of that PR. The sibling server-side change is lightninglabs/lumos#768.

The nightly's commits were showing up on GitHub as "lumos-doc-bot and
claude committed", where we want the deploy bot alone. Two independent
causes, one per half of that string.

The author identity was never linked to any account. GitHub attributes a
commit by matching the author email against an account's verified
addresses, and we were committing as bot@lightning.engineering, which
matches nothing -- so the sweeps rendered as an unlinked plain-text name
with a default avatar rather than as lightninglabs-deploy. Switch to the
account's canonical `<id>+<login>@users.noreply.github.com` address,
which is the form GitHub resolves back to the account.

The trailing "and claude" came from a Co-Authored-By trailer appended to
the commit message. The prompt's message template never included one, so
add an explicit constraint forbidding it, along with any other generated
by attribution footer, on both the commit message and the PR body.
The prompt constraint added in the previous commit cannot actually stop
the Co-Authored-By trailer. The CLI appends it as a post-processing step
after the model writes the commit message file, so the model's text is
overridden no matter what we tell it to write.

Use the supported lever instead: the action's `settings` input, set to
{"includeCoAuthoredBy": false}, which suppresses the trailer on both
commits and PRs. Note this is an action input taking inline JSON or a
file path, not a CLI flag -- there is no --settings to pass through
claude_args, so routing it that way would have failed the step.

The prompt constraint stays as documentation of the intent, but this
input is what enforces it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant