fix(gastown): bump @kilocode/cli to 7.3.1 + plumb auth env into prewarm#3372
Merged
Merged
Conversation
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
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe refactor correctly extracts Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-4.6 · 820,974 tokens Review guidance: REVIEW.md from base branch |
jrf0110
added a commit
that referenced
this pull request
May 28, 2026
…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>
jrf0110
added a commit
that referenced
this pull request
May 28, 2026
…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>
jrf0110
added a commit
that referenced
this pull request
May 28, 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
Fixes the two bugs that prevented PR #3307's session-ingest wiring from working in production.
Bug 1: kilo CLI version too old (smoking gun)
@kilocode/cli@7.2.14doesn't readprocess.env.KILO_AUTH_CONTENT. Everykilo servewas hittingAuth.get("kilo") → undefined → "session bootstrap skipped: no client"and silently no-op'ing all session deltas.Bumped to
7.3.1. VerifiedKILO_AUTH_CONTENTis present in the new binary's strings.Bug 2: prewarm path missing auth env
buildPrewarmEnvdidn't set the three env vars (KILO_AUTH_CONTENT,KILO_PLATFORM,KILO_ORG_ID). Even after the CLI bump, mayor sessions (which go through prewarm) would still be invisible. Now it mirrorsbuildAgentEnvvia the extractedbuildKiloAuthEnvhelper.Refactor: extracted
buildKiloAuthEnvhelperThe auth-env logic (
KILO_AUTH_CONTENT,KILO_PLATFORM,KILO_ORG_ID) was duplicated betweenbuildAgentEnvandbuildPrewarmEnv. ExtractedbuildKiloAuthEnv(kilocodeToken, organizationId)inagent-runner.tsand called it from both functions.Verification
pnpm --filter gastown-container typecheckpassespnpm --filter gastown-container testpasses (2 pre-existing failures inplugin/client.test.tsunrelated to this change)npm view @kilocode/cli@7.3.1 versionreturns7.3.1for all 6 packagesKILO_AUTH_CONTENTstring present in@kilocode/cli-linux-x64@7.3.1binaryVisual Changes
N/A
Reviewer Notes
buildKiloAuthEnvhelper acceptsorganizationId: string | undefined | nullto match the nullable type fromMayorPrewarmContext.organizationId. Bothnullandundefinedare falsy and correctly skip settingKILO_ORG_ID.process-manager.test.tsprewarm test now saves/restoresKILO_ORG_IDfrom process.env to avoid interference from the container's own environment.