Repository navigation
feat(cook): publish PRs as a repo-scoped GitHub App and record the requester - #16506
Merged
Merged
Conversation
added 2 commits
October 26, 2026 15:25
Open
22 of 37 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15873
What
github_appis configured (app_id,private_key_path, optionalinstallation_id), Cook creates a short-lived installation token for the target repository at finalize time. The token is limited tocontents:write+pull_requests:writeon that one repo, and is used for the push and the PR. The PR is authored by the app.crates/homeboy-core/src/git/github_app.rs: an RS256 JWT viajsonwebtoken, thenGET /repos/{o}/{r}/installation→POST /app/installations/{id}/access_tokens.PublicationCredentialdeliberately implements neitherDebugnorSerialize. Errors carry only a stage name: no HTTP bodies, JWTs, key paths or crypto errors.ghlogin.Publication identity: github_app:<id>orambient_gh, never the token.HOMEBOY_REQUESTER(an opaque string) next toHOMEBOY_CALLER_CONTEXT. It persists it on the run record (client_context.requester), so it survives lab handoff, and renders "Requested by: …" in the PR body. No bridge names or bridge variables are involved. The integration layer supplies the value (fix(roadie): map chat speaker to HOMEBOY_REQUESTER wp-coding-agents#827, merged).docs/github-app-publication.mdanddocs/commands/config.md. They note thatpull_requests:write+contents:writecan merge through the API, so operator-only merging needs branch protection that requires a review.Verification
cargo fmt --all -- --check: clean.cargo test -p homeboy-core -p homeboy-agents --lib: 2691 passed, 6 failed. The same 6 fail onorigin/main(2f10c5d) on this host:agent_task_dispatch_plan::…rotation_unset_without_global_policyagent_task_gate::…cargo_target…orchestration::…reconcile_stale_observation…These depend on the environment and aren't touched by this change.
agent_task_finalization+agent_task_service::cook: 629/629.New tests:
HOMEBOY_REQUESTERpersisted and rendered.Provenance
agent-task-0a9543c7wrote the change and passed its gates. Promotion was then refused (internal.unexpected,promotion.gate_setupfordestination_gate_workspace) because the candidate was based on a checkout 324 commits behindmain.main;Cargo.lockregenerated;Cargo.tomlkeeps both new deps; in executor tests, keptmain'sstable_identity_home(), which already holds the env lock, because addingenv_lock()on top would deadlock; in finalization,main'sverified_basedossier plus this change;🤖 AI-assisted