Repository navigation
feat(cloud-agent-next): route bots, security, webhook and scheduled sessions to the control plane - #7289
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of the single commit after Files Reviewed (1 file)
Previous Review Summaries (7 snapshots, latest commit 6c045b1)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 6c045b1)Status: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of the two commits after Files Reviewed (5 files)
Previous review (commit cf1d3f2)Status: No Issues Found | Recommendation: Merge Executive SummaryFull review of the current head ( Files Reviewed (56 files)
Previous review (commit 12db5b4)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental control-plane permission and GitHub-review plumbing is consistent: the legacy command guard now reaches control-plane sessions, worker-owned permissions survive route projection and credential refresh, and the trusted publisher target is derived worker-side. No new security or correctness defect was found in the changed lines, and both prior review findings (isolated-standard allocation and the security-remediation command guard) are re-verified as resolved. Files Reviewed (20 files)
Previous review (commit 669706e)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit 5f30611)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryTwo CRITICAL regressions from origin-based control-plane routing remain: Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (36 files)
Fix these issues in Kilo Cloud Previous review (commit 73aff14)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryTwo CRITICAL regressions from origin-based control-plane routing: Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (25 files)
Fix these issues in Kilo Cloud Previous review (commit eb0efbc)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (25 files)
Reviewed by deepseek-v4.1-flash · Input: 43.4K · Output: 8.3K · Cached: 493.2K Review guidance: REVIEW.md from base branch |
eb0efbc to
73aff14
Compare
73aff14 to
5f30611
Compare
12db5b4 to
cf1d3f2
Compare
…essions to the control plane Remove the CONTROL_PLANE_IDS allowlist and make the control plane the default for interactive web creates, which already admitted everyone. Add slack, github, linear, discord, security-agent, security-remediation, webhook and scheduled origins to the control-plane origin set; auto-triage, autofix, app-builder, CLI, agent-manager and unknown origins stay legacy. Set CODE_REVIEW_CONTROL_PLANE_IDS to * in wrangler so Code Reviewer sessions run on the control plane. Because Isolated Standard allocation is control-plane-incompatible, the Dedicated Standard tests now use legacy origins. Drop the now-inert CONTROL_PLANE_IDS assertions from unit and e2e tests and remove the flag from Env types, wrangler dev vars, .dev.vars.example and ENVIRONMENT.md. Fold first-worktree creation into that routing: remove the separate WORKTREE_CREATION_ENABLED_IDS allowlist and the e2e enrollment precheck. worktreeEnabledForCreate now follows the plane decision alone, so the new-session page no longer needs per-owner enrollment. Drop the flag and its assertions from Env types, wrangler dev vars, .dev.vars.example, ENVIRONMENT.md and the e2e deploy/render tooling.
…plane sessions Webhook and scheduled triggers can carry sandboxAllocation 'isolated-standard' and now route to the control plane. Drop the legacy-only guard at registration and in session metadata validation: SandboxDO resolves the istd- namespace via getSandboxNamespace and billing already accepts isolated-standard.
…ne sessions
Control-plane registration replaced the whole profile with {} for a
read-only Bitbucket review. That also removed the runtime skills, which
carry the trusted bitbucket-cloud-review skill that the Code Reviewer
attaches, so the review lost its reconciliation and publication rules.
Keep runtime skills and withhold only profile agents and commands, as the
legacy plane does. Profile env, secrets and MCP stay withheld.
…ntrol-plane sessions Bot, Security Agent, webhook and scheduled sessions now run on the control plane. The wrapper forwarded their skillShell and sandboxEscalation permission requests to the client, where nobody answers. The turn then waited until the 120-minute execution limit. Give the interactive-origin decision one owner, isInteractiveSessionOrigin, used for both question denial at registration and permission handling in the wrapper. Only cloud-agent-web sessions wait for a person. Unattended sessions reject a CLI-enforced human approval so the agent can continue another way, and fail the turn at once if the rejection cannot be delivered. Ordinary permissions are still approved automatically.
6c045b1 to
54e049a
Compare
fb3809c removed the Chat feature flag, so visibleTabCount takes only showKiloClawTab. The main CI test job skipped that mobile-only commit, so the stale assertion fails on every backend PR.
Summary
Makes the control plane the default for new sessions and routes the Kilo bot, Security Agent and webhook-ingest workloads there too.
CONTROL_PLANE_IDSis removed; the routing decision is now purely origin-based (plus the existingCODE_REVIEW_CONTROL_PLANE_IDSgate, now set to*).Routing is owned by
sessionPlaneForNewOwnerinservices/cloud-agent-next/src/session-plane.ts.Moved to the control plane (
workspace_*)cloud-agent-web) — previously gated byCONTROL_PLANE_IDS; now unconditional.slack,github,linear,discord.security-agent,security-remediation.webhook.scheduled.billingOrigin: 'code-review') viaCODE_REVIEW_CONTROL_PLANE_IDS=*.Still legacy (
agent_*)auto-triage,autofix,app-builder,cli,agent-manager, omitted/unknown origins, and all existingagent_*sessions.Config / types
wrangler.jsonc: removedCONTROL_PLANE_IDS; addedCODE_REVIEW_CONTROL_PLANE_IDS: "*"to production and dev.CONTROL_PLANE_IDSfrom.dev.vars.example,types.ts,persistence/types.ts; regeneratedworker-configuration.d.ts(pnpm --filter cloud-agent-next run types).ENVIRONMENT.md,sandbox-allocation.tsandrepo-key.tscomments.Behavior notes
workspace_*sessions, soisolated-standard(Dedicated Standard) is rejected for them, matching the existing control-plane rule. Bots/security/webhook do not pass that allocation today, so no live path is affected.CODE_REVIEW_CONTROL_PLANE_IDSis now inwrangler.jsonc, a deploy pins it to*; the Cloudflare dashboard can still narrow it between deploys, but the next deploy resets it to*.billingOrigin, and control-plane access itself was already available to every user viacloud-agent-web.Tests
pnpm --filter cloud-agent-next run typecheck: passpnpm --filter cloud-agent-next run test: 6034 passed / 3 skipped (rebased onto latestmain)pnpm --filter cloud-agent-next run lint: cleanpnpm typecheckandpnpm lint: passUnit and e2e fixtures that only asserted the old
CONTROL_PLANE_IDSallowlist were updated;format:checkstill flags four pre-existing generated Drizzle snapshot JSONs untouched by this change.