Skip to content

test(cloud-agent-next): share one e2e scenario definition across both profiles - #6476

Merged
eshurakov merged 5 commits into
eshurakov/jovial-starlingfrom
eshurakov/grand-swan
Sep 22, 2026
Merged

eshurakov merged 5 commits into
eshurakov/jovial-starlingfrom
eshurakov/grand-swan

Conversation

@eshurakov

Copy link
Copy Markdown
Contributor

Third PR in the deployed-E2E stack. Base: #6284.

Replaces the separate local-only and shared scenario registries with a single
SHARED_SCENARIOS definition that runs on the Docker and deployed public
profiles. Scenarios declare the capabilities they need; an unsupported profile
reports unsupported with the missing capability names instead of running a
weakened duplicate.

  • add file:write/file:seed/file:read fake-LLM directives with one
    directive parser, op-aware tags and single-use completion (409 on replay)
  • add gates and sandboxFaults (local-only, Docker-backed) capabilities and
    derive the expected-unsupported exit
  • re-scope worktree-multi-chat onto shared-checkout write/overwrite, question
    ownership, answer isolation and delete survival
  • absorb real file turns into long-conversation; add question-idle-resume,
    large-stream, concurrent-chats, external-kill, kill-mid-flight and the
    two wrapper-freeze scenarios
  • delete lifecycle-continuity/lifecycle-file-state, owned-gates,
    worktree-support and the redundant followup/waiters-clean/gate-0/
    cold-resume/warm-cold-cycles/recover-same-session/feed-stale-recovery
    scenarios
  • derive the deployed workflow timeout from the shared registry budgets

Deployed gaps are expected and explicit: the four sandboxFaults scenarios are
unsupported on the deployed profile; auth-reject runs only deployed.

Verification: lint 0/0; typecheck clean; unit 7236 passed | 3 skipped;
fake-llm 16 passed; integration 700/701 (the one failure is a 5s-timeout load
flakes in test/integration/sandbox-control.test.ts, untouched by this branch,
passing in isolation). Full local E2E matrix run separately.

Test-only: no src/ or wrapper/ changes.

Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-load.ts
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-load.ts
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-load.ts
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts Outdated
Comment thread services/cloud-agent-next/test/e2e/README.md Outdated
Comment thread services/cloud-agent-next/test/e2e/README.md Outdated
Comment thread services/cloud-agent-next/test/e2e/README.md Outdated
Comment thread services/cloud-agent-next/test/e2e/deploy/README.md Outdated
Comment thread services/cloud-agent-next/test/e2e/deploy/README.md Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • services/cloud-agent-next/test/e2e/README.md
  • services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-faults.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared.test.ts
Previous Review Summaries (3 snapshots, latest commit 89582c3)

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

Previous review (commit 89582c3)

Status: 7 Issues Found | Recommendation: Address before merge

Executive Summary

The kill-mid-flight scenario parks a fake-LLM gate: that is never released on failure paths (a regression from the deleted lifecycleKillMidFlight), and the setup README omits interrupt-then-continue from the worktree-creation enrollment list; the remaining findings are diagnostic and documentation accuracy issues in the shared e2e harness.

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 5
Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/test/e2e/scenarios-shared-faults.ts 367 kill-mid-flight parks gate:${gateTag} and never calls releaseGate; the deleted implementation released it unconditionally
services/cloud-agent-next/test/e2e/README.md 18 Worktree-creation setup list omits interrupt-then-continue, which sets requiresWorktreeCreation: true

SUGGESTION

File Line Issue
services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts 356 fail() re-appends boot/hot stream events already folded into events (lines 403, 475)
services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts 216 fail() re-appends the cold stream's events already folded at line 262
services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts 428 fail() re-appends boot/resume stream events already folded at lines 470, 573
services/cloud-agent-next/test/e2e/scenarios-shared.ts 199 Early return skips the part-update count, so correlatedProgressSummary reports parts=0 for streams that emitted parts
services/cloud-agent-next/test/e2e/README.md 355 the rest need no declared capability contradicts the registry (all other scenarios declare sessionSandbox/gates/sandboxFaults)
Files Reviewed (50 files)
  • .github/workflows/e2e-deployed.yml
  • services/cloud-agent-next/package.json
  • services/cloud-agent-next/test/e2e/README.md - 2 issues
  • services/cloud-agent-next/test/e2e/SESSION-CONTINUITY.md
  • services/cloud-agent-next/test/e2e/capabilities-local.ts
  • services/cloud-agent-next/test/e2e/client.ts
  • services/cloud-agent-next/test/e2e/deploy/README.md
  • services/cloud-agent-next/test/e2e/e2e-surface-client.ts
  • services/cloud-agent-next/test/e2e/fake-llm-core.ts
  • services/cloud-agent-next/test/e2e/fake-llm-server.ts
  • services/cloud-agent-next/test/e2e/idle-stop-evidence.ts
  • services/cloud-agent-next/test/e2e/lifecycle-continuity.ts
  • services/cloud-agent-next/test/e2e/lifecycle-file-state.ts
  • services/cloud-agent-next/test/e2e/lifecycle.ts
  • services/cloud-agent-next/test/e2e/owned-gates.ts
  • services/cloud-agent-next/test/e2e/public-surface-support.ts
  • services/cloud-agent-next/test/e2e/run.ts
  • services/cloud-agent-next/test/e2e/sandbox-control.ts
  • services/cloud-agent-next/test/e2e/sandbox-fault-evidence.ts
  • services/cloud-agent-next/test/e2e/scenario-assertions.ts
  • services/cloud-agent-next/test/e2e/scenario-capabilities.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-callbacks.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-continuity.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts - 2 issues
  • services/cloud-agent-next/test/e2e/scenarios-shared-faults.ts - 1 issue
  • services/cloud-agent-next/test/e2e/scenarios-shared-load.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-micro.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-queue.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-streaming.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts - 1 issue
  • services/cloud-agent-next/test/e2e/scenarios-shared.ts - 1 issue
  • services/cloud-agent-next/test/e2e/smoke-deployed.ts
  • services/cloud-agent-next/test/e2e/smoke.ts
  • services/cloud-agent-next/test/e2e/worktree-support.ts
  • services/cloud-agent-next/test/fake-llm/fake-llm-worker.test.ts
  • services/cloud-agent-next/test/unit/e2e/capabilities-deployed.test.ts
  • services/cloud-agent-next/test/unit/e2e/fake-llm-state.test.ts
  • services/cloud-agent-next/test/unit/e2e/lifecycle-continuity.test.ts
  • services/cloud-agent-next/test/unit/e2e/lifecycle-file-state.test.ts
  • services/cloud-agent-next/test/unit/e2e/public-surface-support.test.ts
  • services/cloud-agent-next/test/unit/e2e/run.test.ts
  • services/cloud-agent-next/test/unit/e2e/sandbox-fault-evidence.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenario-assertions.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenario-capabilities.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-conversations.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-load.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-runtime.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared.test.ts
  • services/cloud-agent-next/test/unit/fake-llm-server.test.ts

Fix these issues in Kilo Cloud

Previous review (commit ea5b794)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit resolving the prior shared-E2E harness remarks was reviewed at ea5b79489; all ten previous findings are fixed on the changed lines and no new defects were found.

Files Reviewed (7 files)
  • .github/workflows/e2e-deployed.yml
  • services/cloud-agent-next/test/e2e/README.md
  • services/cloud-agent-next/test/e2e/deploy/README.md
  • services/cloud-agent-next/test/e2e/scenarios-shared-load.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-runtime.test.ts

Previous review (commit 4137be7)

Status: 10 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 6
SUGGESTION 4

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
services/cloud-agent-next/test/e2e/scenarios-shared-load.ts 381 runConcurrentChats never closes the recovery turn's stream returned by sendTurn; finally closes only the boot and hold streams (leaked socket/abort listener on the designed recovery path).
services/cloud-agent-next/test/e2e/scenarios-shared-load.ts 319 The boot stream is only registered in entries at line 332, so an echo-assertion or allocation wait failure leaks the already-open boot stream.
services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts 912 The new file-turn message ids are never pushed to rootMessageIds/siblingMessageIds (also 939/962/989), so assertChatContentIsolation cannot detect those turns leaking across chats.
services/cloud-agent-next/test/e2e/README.md 187 States the long/fault scenarios are "deliberately excluded from smoke.ts's DEFAULT_MATRIX", but smoke.ts now includes all of them.
services/cloud-agent-next/test/e2e/deploy/README.md 350 Per-scenario ceilings list 10 + 12 + 12 + 30, but WORKTREE_MULTI_CHAT_TIMEOUT_MS is now 25 minutes (10 + 25 + 12 + 30).
services/cloud-agent-next/test/e2e/deploy/README.md 351 Documents timeout-minutes: 120, but .github/workflows/e2e-deployed.yml sets 300.

SUGGESTION

File Line Issue
services/cloud-agent-next/test/e2e/scenarios-shared-load.ts 407 Completed holds push hold.stream.events twice (line 375 and again here), duplicating events in result.events and fail() output.
services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts 209 register unconditionally overwrites, contradicting the documented "repeated ids keep their first registration" contract.
services/cloud-agent-next/test/e2e/README.md 368 long-conversation runs twelve hot turns (ten declared plus the file write/read pair), not ten; the table at line 617 already says twelve.
services/cloud-agent-next/test/e2e/README.md 432 Run artifact says hot=10/10, but the emitted message is 12/12.
Files Reviewed (50 files)
  • .github/workflows/e2e-deployed.yml
  • services/cloud-agent-next/package.json
  • services/cloud-agent-next/test/e2e/README.md - 3 issues
  • services/cloud-agent-next/test/e2e/SESSION-CONTINUITY.md
  • services/cloud-agent-next/test/e2e/capabilities-local.ts
  • services/cloud-agent-next/test/e2e/client.ts
  • services/cloud-agent-next/test/e2e/deploy/README.md - 2 issues
  • services/cloud-agent-next/test/e2e/e2e-surface-client.ts
  • services/cloud-agent-next/test/e2e/fake-llm-core.ts
  • services/cloud-agent-next/test/e2e/fake-llm-server.ts
  • services/cloud-agent-next/test/e2e/idle-stop-evidence.ts
  • services/cloud-agent-next/test/e2e/lifecycle-continuity.ts (deleted)
  • services/cloud-agent-next/test/e2e/lifecycle-file-state.ts (deleted)
  • services/cloud-agent-next/test/e2e/lifecycle.ts
  • services/cloud-agent-next/test/e2e/owned-gates.ts (deleted)
  • services/cloud-agent-next/test/e2e/public-surface-support.ts
  • services/cloud-agent-next/test/e2e/run.ts
  • services/cloud-agent-next/test/e2e/sandbox-control.ts
  • services/cloud-agent-next/test/e2e/sandbox-fault-evidence.ts
  • services/cloud-agent-next/test/e2e/scenario-assertions.ts
  • services/cloud-agent-next/test/e2e/scenario-capabilities.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-callbacks.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-continuity.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-faults.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-load.ts - 3 issues
  • services/cloud-agent-next/test/e2e/scenarios-shared-micro.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-queue.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-runtime.ts - 1 issue
  • services/cloud-agent-next/test/e2e/scenarios-shared-streaming.ts
  • services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts - 1 issue
  • services/cloud-agent-next/test/e2e/scenarios-shared.ts
  • services/cloud-agent-next/test/e2e/smoke-deployed.ts
  • services/cloud-agent-next/test/e2e/smoke.ts
  • services/cloud-agent-next/test/e2e/worktree-support.ts (deleted)
  • services/cloud-agent-next/test/fake-llm/fake-llm-worker.test.ts
  • services/cloud-agent-next/test/unit/e2e/capabilities-deployed.test.ts
  • services/cloud-agent-next/test/unit/e2e/fake-llm-state.test.ts
  • services/cloud-agent-next/test/unit/e2e/lifecycle-continuity.test.ts (deleted)
  • services/cloud-agent-next/test/unit/e2e/lifecycle-file-state.test.ts (deleted)
  • services/cloud-agent-next/test/unit/e2e/public-surface-support.test.ts
  • services/cloud-agent-next/test/unit/e2e/run.test.ts
  • services/cloud-agent-next/test/unit/e2e/sandbox-fault-evidence.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenario-assertions.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenario-capabilities.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-conversations.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-load.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared-runtime.test.ts
  • services/cloud-agent-next/test/unit/e2e/scenarios-shared.test.ts
  • services/cloud-agent-next/test/unit/fake-llm-server.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch eshurakov/jovial-starling

…n use

Add worktree-chat, worktree-multi-chat, long-conversation and
leave-and-return to the shared scenario set, so one implementation runs
under both the local Docker profile and the deployed HTTP profile using
only public tRPC, streams, fake-LLM /test/* and the sessionSandbox
capability. No Docker file/process inspection, worker logs or Postgres.

- public-surface-support and scenarios-shared-runtime: shared deadline,
  allocation sampling, owned-session registry with late-create cleanup,
  cumulative sendTurn budget, extracted from the local-only modules
- removal-aware collectChildMessageText
- resolve shared-only scenario names in local dispatch
- lint allowlist, README/SESSION-CONTINUITY/deploy docs, e2e workflow
  timeout 45 -> 120 minutes
… profiles

Replace the local-only and shared scenario registries with a single
SHARED_SCENARIOS definition that runs on the Docker and deployed public
profiles. Scenarios declare the capabilities they need; unsupported ones
exit as expected-unsupported instead of being duplicated.

- add file:write/file:seed/file:read fake-LLM directives with a single
  directive parser, op-aware tags and single-use completion
- add gates (local-only) and sandboxFaults (local-only, Docker-backed)
  capabilities and derive the expected-unsupported exit
- re-scope worktree-multi-chat onto shared-checkout write/overwrite,
  question ownership, answer isolation and delete survival
- absorb real file turns into long-conversation; add question-idle-resume,
  large-stream, concurrent-chats, external-kill, kill-mid-flight and the
  two wrapper-freeze scenarios
- delete lifecycle-continuity/lifecycle-file-state, owned-gates,
  worktree-support and the redundant followup/waiters-clean/gate-0/
  cold-resume/warm-cold-cycles/recover-same-session/feed-stale-recovery
  scenarios
- derive the deployed workflow timeout from the shared registry budgets
The two shared-e2e commits were authored on a branch that never ran CI, so
22 harness files were committed without oxfmt reflow and the format-check job
failed. Reflow only: no logic, identifiers or string literals change.
- runConcurrentChats: own the boot stream before the echo/allocation
  assertions, track and close the recovery stream, and fold each hold's
  events exactly once in `finally` (a hold stream stays open and appends
  while the other hold's recovery runs)
- worktree-multi-chat: register the four file turns' messageIds so
  chat-content isolation actually covers them
- createOwnedSessionRegistry: `register` upgrades an `undefined`
  placeholder but never clobbers an already-defined kiloSessionId, and
  the interface comment now states that contract; regression tests added
  for both the upgrade and the defined-to-undefined clobber case
- docs: drop the unsupported "249 min derived from the registry" claim
  from both e2e READMEs and the deployed workflow comment, correct the
  public-surface ceilings to 10 + 25 + 12 + 30, the long-conversation
  turn count to twelve, the `hot=12/12` artifact, the false claim that
  the long scenarios are excluded from DEFAULT_MATRIX, and the
  "no interrupt" claim for worktree-multi-chat
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-faults.ts
Comment thread services/cloud-agent-next/test/e2e/README.md
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-worktrees.ts
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared-conversations.ts Outdated
Comment thread services/cloud-agent-next/test/e2e/scenarios-shared.ts Outdated
Comment thread services/cloud-agent-next/test/e2e/README.md Outdated
…nostics

Address the Kilobot review on the shared e2e harness:

- release the parked `kill-mid-flight` gate in the scenario `finally` with a
  bounded signal, so an early failure before the container kill cannot leave
  the fake's gate parked for the rest of the server's lifetime
- fold each stream's buffered events into the failure diagnostic exactly once
  through one `foldStream` owner, instead of re-appending buffers that were
  already folded; events of a stream opened but not yet folded are still kept
- count `message.part.updated` events in `collectCorrelatedProgress` even when
  no assistant child id was established, so the diagnostic distinguishes "no
  events for this turn" from "events but no correlated child" (the pass rule
  stays `correlated > 0`)
- name `interrupt-then-continue` in the worktree-enrollment list and state the
  scenario capability rule that matches the registry
@eshurakov
eshurakov added this pull request to stack #6505 September 21, 2026 20:06
@eshurakov
eshurakov merged commit cd99e3e into main Sep 22, 2026
27 checks passed
@eshurakov
eshurakov deleted the eshurakov/grand-swan branch September 22, 2026 07: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