Skip to content

fix(cloud-agent-next): preserve model IDs and queued intent - #5580

Merged
eshurakov merged 2 commits into
mainfrom
eshurakov/dapper-canyon
Aug 27, 2026
Merged

fix(cloud-agent-next): preserve model IDs and queued intent#5580
eshurakov merged 2 commits into
mainfrom
eshurakov/dapper-canyon

Conversation

@eshurakov

Copy link
Copy Markdown
Contributor

Summary

  • Preserve Kilo Gateway model IDs through the Worker/control boundary and wrapper SDK requests, including command model, mode, and variant selection.
  • Persist immutable per-message intent so changing session defaults, retries, Durable Object recreation, or sandbox replacement cannot change queued work.
  • Validate follow-up admission using stored auth/org context, preserve validation error semantics, and handle concurrent replays and legacy queued records without rewinding defaults.
  • Add regression coverage for model normalization, SDK serialization, admission races, reconnect/replacement, and legacy compatibility.

Verification

No manual full-stack E2E was run in this session: the worktree has no root .env.local and no running local services. The complete Worker/sandbox/web create-and-send path remains unverified.

Visual Changes

N/A

Reviewer Notes

  • Roll out compatible wrappers first and retire older wrappers before enabling Worker-produced model-less commands. The protocol-v1 handshake is not a build compatibility gate.
  • Previous Worker code cannot read the new nested queue intent format; account for persisted records when planning rollback.
  • In-instance dispatch coalescing does not provide exactly-once delivery; ambiguous handoffs remain at-least-once.

Automated checks

  • pnpm --filter cloud-agent-next run test:all: 3,371 unit tests passed (3 skipped), 351 Workers integration tests passed, and 435 Bun wrapper tests passed.
  • pnpm --filter cloud-agent-next run typecheck: passed for service and wrapper.
  • pnpm --filter cloud-agent-next run lint: passed with no warnings or errors.
  • pnpm format on the 18 changed code files and git diff --check: passed.
  • The Workers suite exited successfully while logging dependency sourcemap warnings and teardown/socket-close diagnostics.

@kilo-code-bot

kilo-code-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • services/cloud-agent-next/src/kilo-facade/user-kilo-facade.test.ts
  • services/cloud-agent-next/src/persistence/model-utils.test.ts
  • services/cloud-agent-next/src/sandbox-control/frames.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/session/queue-message.test.ts
  • services/cloud-agent-next/test/fixtures/gateway-model-ids.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/kilo-api.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
Previous Review Summary (commit 36921d0)

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

Previous review (commit 36921d0)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (18 files)
  • services/cloud-agent-next/src/execution/types.ts
  • services/cloud-agent-next/src/kilo-facade/user-kilo-facade.test.ts
  • services/cloud-agent-next/src/kilo-facade/user-kilo-facade.ts
  • services/cloud-agent-next/src/persistence/CloudAgentSession.ts
  • services/cloud-agent-next/src/persistence/model-utils.test.ts
  • services/cloud-agent-next/src/sandbox-control/frames.test.ts
  • services/cloud-agent-next/src/sandbox-session/SandboxSession.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.test.ts
  • services/cloud-agent-next/src/sandbox-session/session-message-queue.ts
  • services/cloud-agent-next/src/session/queue-message.test.ts
  • services/cloud-agent-next/src/session/queue-message.ts
  • services/cloud-agent-next/src/shared/sandbox-control-protocol.ts
  • services/cloud-agent-next/test/fixtures/gateway-model-ids.ts
  • services/cloud-agent-next/test/integration/sandbox-control.test.ts
  • services/cloud-agent-next/test/unit/wrapper/kilo-api.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.test.ts
  • services/cloud-agent-next/wrapper/src/control/sandbox-control-handlers.ts
  • services/cloud-agent-next/wrapper/src/kilo-api.ts

Reviewed by grok-4.6 · Input: 255.5K · Output: 9.6K · Cached: 88.6K

Review guidance: REVIEW.md from base branch main

@eshurakov
eshurakov merged commit cdd815f into main Aug 27, 2026
13 checks passed
@eshurakov
eshurakov deleted the eshurakov/dapper-canyon branch August 27, 2026 17:06
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.

2 participants