Skip to content

ci(cloud-agent-next): add staging worker config#4118

Open
RSO wants to merge 4 commits into
mainfrom
cloud-agent-next-staging
Open

ci(cloud-agent-next): add staging worker config#4118
RSO wants to merge 4 commits into
mainfrom
cloud-agent-next-staging

Conversation

@RSO

@RSO RSO commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds explicit staging Wrangler environments for services/cloud-agent-next and the service-binding dependencies it needs to deploy cleanly: git-token-service, session-ingest, notifications, and event-service.

The staging Cloud Agent Next Worker uses the custom domain staging.cloud-agent-next.kilosessions.ai, isolated staging queues/R2/container capacity, and staging-named service bindings so staging deploy validation does not silently bind to production workers.

Verification

Manual verification was limited to Wrangler dry-run behavior for the staging Worker graph. Live Cloudflare deploys require pre-created named queues/R2 buckets and authenticated Wrangler access to the Kilo Cloudflare account.

Visual Changes

N/A

Reviewer Notes

Deploy dependency order:

  1. event-service-staging
  2. git-token-service-staging
  3. session-ingest-staging
  4. notifications-staging
  5. cloud-agent-next-staging

session-ingest-staging still binds to the existing o11y service. A fully isolated staging observability stack would require separate Analytics Engine/Pipelines/secrets and is intentionally left out of this PR.

"services": [
{
"binding": "SESSION_INGEST",
"service": "session-ingest-staging",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Staging dependencies are not declared in this repo

cloud-agent-next now binds to session-ingest-staging, git-token-service-staging, and notifications-staging, but this repo only defines session-ingest, git-token-service/git-token-service-dev, and notifications. That means the new staging environment depends on out-of-band worker provisioning and cannot be reproduced from main; if those workers are not already deployed separately, the staging worker will fail to resolve its service bindings.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

No new issues found in the incremental diff.

Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
services/session-ingest/wrangler.jsonc 158 The staging SESSION_INGEST_R2 binding still points at session-ingest-staging, which is also the default worker bucket, so staging uploads and cleanup can bleed into live session data.

The previously reported cloud-agent-next staging dependency declaration gap remains resolved in the current head.

Files Reviewed (1 files)
  • services/git-token-service/wrangler.jsonc
Previous Review Summaries (3 snapshots, latest commit 8673ee2)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8673ee2)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/session-ingest/wrangler.jsonc 158 The new staging environment reuses the same SESSION_INGEST_R2 bucket as the default worker, so staging uploads and cleanup can bleed into the live environment.
Other Observations (not in diff)

The previously reported cloud-agent-next staging service-binding declaration gap is resolved by the new event-service-staging, git-token-service-staging, notifications-staging, and session-ingest-staging definitions added in this PR.

Files Reviewed (4 files)
  • services/event-service/wrangler.jsonc
  • services/git-token-service/wrangler.jsonc
  • services/notifications/wrangler.jsonc
  • services/session-ingest/wrangler.jsonc - 1 issue

Previous review (commit b9a4b20)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrangler.jsonc 307 Staging service bindings still target session-ingest-staging, git-token-service-staging, and notifications-staging, but those worker names are not declared in this repo.
Other Observations (not in diff)

No additional issues found outside the diff.

Files Reviewed (1 files)
  • services/cloud-agent-next/wrangler.jsonc - 1 issue

Previous review (commit 57fcc47)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/wrangler.jsonc 301 Staging service bindings target *-staging workers that are not declared anywhere in this repo.
Other Observations (not in diff)

No additional issues found outside the diff.

Files Reviewed (1 files)
  • services/cloud-agent-next/wrangler.jsonc - 1 issue

Reviewed by gpt-5.4-2026-03-05 · 273,981 tokens

Review guidance: REVIEW.md from base branch main

"r2_buckets": [
{
"binding": "SESSION_INGEST_R2",
"bucket_name": "session-ingest-staging",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Staging shares the same R2 bucket as the default environment

env.staging still points SESSION_INGEST_R2 at session-ingest-staging, which is the same bucket the default session-ingest worker already uses. That means staging ingest traffic can mix uploaded session data and any bucket-level cleanup with the live environment instead of staying isolated.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant