feat(gastown): tRPC + HTTP for babysit PR (chunk 1)#3580
Merged
jrf0110 merged 5 commits intoMay 28, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe merge conflict markers in Resolved Issues
Files Reviewed (14 files)
Reviewed by claude-sonnet-4.6 · 192,151 tokens Review guidance: REVIEW.md from base branch |
…rm (#3372) Bug 1: @kilocode/cli@7.2.14 doesn't read KILO_AUTH_CONTENT, causing all kilo serve session-ingest to silently no-op. Bumped to 7.3.1 which has the feature. Verified KILO_AUTH_CONTENT present in binary strings. Bug 2: buildPrewarmEnv didn't set KILO_AUTH_CONTENT, KILO_PLATFORM, or KILO_ORG_ID, so mayor sessions (which go through prewarm) were invisible. Extracted buildKiloAuthEnv helper from buildAgentEnv and used it in both buildAgentEnv and buildPrewarmEnv. Refs #3307 Co-authored-by: John Fawcett <john@kilcoode.ai>
…unk 0) (#3576) * feat(gastown): Town DO slingExistingPr method (babysit PR feature, chunk 0) * fix(gastown): address PR review feedback on slingExistingPr - Remove async from submitExternalPrToReviewQueue (no awaits inside) - Add GitLab host validation in slingExistingPr URL parsing to prevent non-GitLab URLs (e.g. Bitbucket) from matching the GitLab regex - Replace vacuous state validation tests with meaningful checkPRStatus integration tests that exercise the actual status resolution path --------- Co-authored-by: John Fawcett <john@kilcoode.ai>
Add gastown.babysitPr tRPC mutation, gastown.previewPr tRPC query, mayor-tools babysit-pr HTTP route, refinery bypass for babysat beads, and reconciler fast-track extension for babysat MR beads.
The file was a verbatim copy of the first 442 lines of babysit-pr.test.ts, causing 24 tests to run twice with zero added coverage.
jrf0110
force-pushed
the
convoy/babysit-existing-pr-feature-re-staged/254a4b7e/gt/toast/551c4b50
branch
from
May 28, 2026 20:23
384863d to
c3f1705
Compare
jrf0110
deleted the
convoy/babysit-existing-pr-feature-re-staged/254a4b7e/gt/toast/551c4b50
branch
May 28, 2026 20:37
jrf0110
added a commit
that referenced
this pull request
Jul 22, 2026
* fix(gastown): bump @kilocode/cli to 7.3.1 + plumb auth env into prewarm (#3372) Bug 1: @kilocode/cli@7.2.14 doesn't read KILO_AUTH_CONTENT, causing all kilo serve session-ingest to silently no-op. Bumped to 7.3.1 which has the feature. Verified KILO_AUTH_CONTENT present in binary strings. Bug 2: buildPrewarmEnv didn't set KILO_AUTH_CONTENT, KILO_PLATFORM, or KILO_ORG_ID, so mayor sessions (which go through prewarm) were invisible. Extracted buildKiloAuthEnv helper from buildAgentEnv and used it in both buildAgentEnv and buildPrewarmEnv. Refs #3307 Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): Town DO slingExistingPr method (babysit PR feature, chunk 0) (#3576) * feat(gastown): Town DO slingExistingPr method (babysit PR feature, chunk 0) * fix(gastown): address PR review feedback on slingExistingPr - Remove async from submitExternalPrToReviewQueue (no awaits inside) - Add GitLab host validation in slingExistingPr URL parsing to prevent non-GitLab URLs (e.g. Bitbucket) from matching the GitLab regex - Replace vacuous state validation tests with meaningful checkPRStatus integration tests that exercise the actual status resolution path --------- Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): tRPC + HTTP for babysit PR (chunk 1) Add gastown.babysitPr tRPC mutation, gastown.previewPr tRPC query, mayor-tools babysit-pr HTTP route, refinery bypass for babysat beads, and reconciler fast-track extension for babysat MR beads. * chore: remove duplicate sling-existing-pr.test.ts The file was a verbatim copy of the first 442 lines of babysit-pr.test.ts, causing 24 tests to run twice with zero added coverage. * fix(gastown): resolve merge conflict markers in process-manager.test.ts --------- Co-authored-by: John Fawcett <john@kilcoode.ai>
jrf0110
added a commit
that referenced
this pull request
Jul 22, 2026
* fix(gastown): bump @kilocode/cli to 7.3.1 + plumb auth env into prewarm (#3372) Bug 1: @kilocode/cli@7.2.14 doesn't read KILO_AUTH_CONTENT, causing all kilo serve session-ingest to silently no-op. Bumped to 7.3.1 which has the feature. Verified KILO_AUTH_CONTENT present in binary strings. Bug 2: buildPrewarmEnv didn't set KILO_AUTH_CONTENT, KILO_PLATFORM, or KILO_ORG_ID, so mayor sessions (which go through prewarm) were invisible. Extracted buildKiloAuthEnv helper from buildAgentEnv and used it in both buildAgentEnv and buildPrewarmEnv. Refs #3307 Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): Town DO slingExistingPr method (babysit PR feature, chunk 0) (#3576) * feat(gastown): Town DO slingExistingPr method (babysit PR feature, chunk 0) * fix(gastown): address PR review feedback on slingExistingPr - Remove async from submitExternalPrToReviewQueue (no awaits inside) - Add GitLab host validation in slingExistingPr URL parsing to prevent non-GitLab URLs (e.g. Bitbucket) from matching the GitLab regex - Replace vacuous state validation tests with meaningful checkPRStatus integration tests that exercise the actual status resolution path --------- Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): tRPC + HTTP for babysit PR (chunk 1) Add gastown.babysitPr tRPC mutation, gastown.previewPr tRPC query, mayor-tools babysit-pr HTTP route, refinery bypass for babysat beads, and reconciler fast-track extension for babysat MR beads. * chore: remove duplicate sling-existing-pr.test.ts The file was a verbatim copy of the first 442 lines of babysit-pr.test.ts, causing 24 tests to run twice with zero added coverage. * fix(gastown): resolve merge conflict markers in process-manager.test.ts --------- Co-authored-by: John Fawcett <john@kilcoode.ai>
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.
Summary
Chunk 1 of 6 for the "Babysit existing PR" feature. Builds on chunk 0 (already merged) which added
slingExistingPrandsubmitExternalPrToReviewQueue.gastown.babysitPrtRPC mutation — validates input, verifies rig ownership, callstownStub.slingExistingPrwithsourceAgentId: 'system'gastown.previewPrtRPC query — returns PR metadata (state, branches, SHA, title) without side effects. Returnsrepo_matches: falseon repo mismatch instead of throwing, so the UI can render a clear errorPOST /api/mayor/:townId/tools/babysit-pr— mayor-tools HTTP route, mirrors existingMayorSlingBodypattern, callsslingExistingPrwithsourceAgentId: 'mayor'dispatch_agentin actions.ts returnsnullformerge_requestbeads withmetadata.babysit === true, preventing refinery dispatchreconcileMergeRequestsfast-tracks open MR beads withmetadata.babysit=truetoin_progressregardless of the rig'scode_reviewconfig. Also excludes babysat beads from refinery dispatch queries.Verification
babysit-pr.test.ts, 24 existing insling-existing-pr.test.ts)client.test.tsJWT token failures are unrelated to this changeVisual Changes
N/A
Reviewer Notes
previewPrmethod on TownDO reuses the same repo-validation and SCM-fetch logic asslingExistingPr(both callcheckPRStatus). No duplicate code paths.code_review: falsefast-track, so babysat beads on rigs withcode_review: trueare handled correctly.dispatch_agentnull return for babysat beads means the reconciler'stransition_beadaction is the sole path that moves them toin_progress, which then triggerspoll_pron the next alarm tick.