chore(gastown): stage release updates - #4688
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Note: also unresolved — CodeQL flagged possible DOM-text-as-HTML on Fixed since last review: wrong Cloudflare Access header ( Files Reviewed (61 files)
Fix these issues in Kilo Cloud Previous Review Summary (commit 9d176cd)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 9d176cd)Status: 5 Issues Found | Recommendation: Address before merge Executive SummaryThe new Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (61 files)
Reviewed by claude-sonnet-5 · Input: 38 · Output: 16.4K · Cached: 1.1M 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>
* perf(gastown): shorten mayor cold start path * fix(gastown): address mayor latency review feedback * fix(gastown): remove stale mayor setup parameter * fix(gastown): remove stale mayor setup comment
* feat(cloud-agent): add Gastown filter option to ChatSidebar and mobile modal * fix(cloud-agent-next): remove stale comment in default branch handling --------- Co-authored-by: John Fawcett <john@kilcoode.ai>
Make worktree creation tolerate an existing local branch with a missing worktree directory, and allow internal @kilocode package updates to bypass release-age delays.
* 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>
* 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. * feat(web): BeadPanel babysit badge + metadata (chunk 4) (#3581) feat(web): BeadPanel babysit badge + metadata surfacing (chunk 4) - Add 'Babysat external PR' badge (cyan) when gt:babysit label present - Hide source bead link for babysit beads (no source_bead_id) - Add babysit metadata panel: head_sha (7-char, linked), force_push_allowed (Lock/Unlock icons), babysit_started_at (relative time) - Add event formatters for babysit_started, pr_feedback_detected, pr_conflict_detected, pr_auto_merge, pr_status_changed - Mirror babysit badge + metadata in BeadInspectorDashboard - Extract buildRelatedBeads and eventDescription into separate files for testability - Add unit tests for eventDescription and buildRelatedBeads babysit logic Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): gt_babysit_pr mayor tool + force-push gate (chunk 2) (#3582) * feat(gastown): gt_babysit_pr mayor tool + force-push gate (chunk 2) Add gt_babysit_pr mayor tool registration and client method, update mayor and polecat system prompts with babysit PR guidance and force-push policy, surface force_push_allowed in polecat prime context, and add corresponding unit tests. * fix(gastown): address PR review warnings on babysit PR feature - Rewrite PR Conflict Resolution Workflow in polecat-system.prompt.ts to choose strategy upfront (rebase vs merge) based on force_push_allowed, instead of rebase-then-abort which discarded conflict resolution work. - Extract resolveForcePushAllowed() from agents.ts prime() so tests exercise the actual function instead of inlining the logic. --------- Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(web): SlingDialog babysit-PR mode (chunk 3) Add tabbed SlingDialog with 'Sling work' and 'Babysit existing PR' tabs. The Babysit tab includes PR URL input with debounced preview, repo mismatch and closed PR validation, title/body overrides, force-push checkbox, and calls babysitPr mutation on submit. Also updates generated tRPC type declarations for the new previewPr and babysitPr procedures. * fix: address review feedback on PR #3583 - Fix CRITICAL: move isBabysit declaration above relatedBeads in BeadPanel.tsx (temporal dead zone caused ReferenceError on babysit bead renders) - Fix WARNING: wire up userEditedTitle/userEditedBody in BabysitPrPanel.tsx (auto-populate title/body from preview unless user has manually edited) - Fix WARNING: add babysit_started_at to bead metadata in submitExternalPrToReviewQueue so UI timestamps render correctly * fix(web): move defaultTitle/defaultBody after preview declaration to fix TDZ bug The defaultTitle and defaultBody const declarations referenced preview before it was declared (temporal dead zone), causing ReferenceError on every render. Moved them after the preview declaration. --------- 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. * feat(web): BeadPanel babysit badge + metadata (chunk 4) (#3581) feat(web): BeadPanel babysit badge + metadata surfacing (chunk 4) - Add 'Babysat external PR' badge (cyan) when gt:babysit label present - Hide source bead link for babysit beads (no source_bead_id) - Add babysit metadata panel: head_sha (7-char, linked), force_push_allowed (Lock/Unlock icons), babysit_started_at (relative time) - Add event formatters for babysit_started, pr_feedback_detected, pr_conflict_detected, pr_auto_merge, pr_status_changed - Mirror babysit badge + metadata in BeadInspectorDashboard - Extract buildRelatedBeads and eventDescription into separate files for testability - Add unit tests for eventDescription and buildRelatedBeads babysit logic Co-authored-by: John Fawcett <john@kilcoode.ai> * feat(gastown): gt_babysit_pr mayor tool + force-push gate (chunk 2) (#3582) * feat(gastown): gt_babysit_pr mayor tool + force-push gate (chunk 2) Add gt_babysit_pr mayor tool registration and client method, update mayor and polecat system prompts with babysit PR guidance and force-push policy, surface force_push_allowed in polecat prime context, and add corresponding unit tests. * fix(gastown): address PR review warnings on babysit PR feature - Rewrite PR Conflict Resolution Workflow in polecat-system.prompt.ts to choose strategy upfront (rebase vs merge) based on force_push_allowed, instead of rebase-then-abort which discarded conflict resolution work. - Extract resolveForcePushAllowed() from agents.ts prime() so tests exercise the actual function instead of inlining the logic. --------- Co-authored-by: John Fawcett <john@kilcoode.ai> * fix(gastown): address rework feedback for babysit PR feature - Fix GitLab MR head SHA link in BeadPanel.tsx (regex now handles /-/merge_requests/ URLs) - Extract shared test helpers into babysit-pr-helpers.ts to eliminate ~400 lines of duplication - babysit_started_at already present from staging (confirmed) * fix(web): remove duplicate isBabysit declaration in BeadPanel --------- Co-authored-by: John Fawcett <john@kilcoode.ai>
Summary
gastown-stagingtomain.TownContainerDOand hydrate runtime town, rig, agent, token, and auth configuration through control-server/container dispatch requests instead; boot logs now use the dynamic town id from the hydrated runtime config.@kilocode/clito7.3.1, extract shared Kilo auth env construction, and passKILO_AUTH_CONTENT,KILO_PLATFORM, andKILO_ORG_IDthrough the prewarm path.fatal: a branch named '<branch>' already existsafter partial setup or cleanup.@kilocode/*packages from the pnpm minimum-release-age delay so coordinated internal package bumps can be installed during release work.cloudflared access loginwith thecf-access-tokenheader, while retaining service-token fallback support.Verification
N/A for this release-rollup PR. See the constituent PRs linked above for change-specific verification notes.
Visual Changes
N/A
Reviewer Notes
This PR is intended to stay open as the ongoing Gastown staging-to-main release vehicle; more commits may be added over time. Direct commits on
gastown-stagingcurrently include the container env-var cleanup/hydration fixes, dynamic town id boot logs, resource bump, worktree branch reuse fix, pnpm release-age exception, agent-activity liveness fix, heartbeat startup hardening, and production debug monitoring auth updates. Constituent PRs merged into the staging branch include #3372, #3369, and #3426.Supersedes #3353, which GitHub would not reopen after the required branch rebase.