Skip to content

test(think): group A/H class-only rows, batch 5 (three probe-covered, seven ruled out, successors for recovery and hydration) - #3498

Closed
mattzcarey wants to merge 12 commits into
mainfrom
slim/harness-A-successors-13
Closed

mattzcarey wants to merge 12 commits into
mainfrom
slim/harness-A-successors-13

Conversation

@mattzcarey

Copy link
Copy Markdown
Member

More class-only rows, by kind, one commit per change. Tests only, no changeset. This follows #3483.

  1. Three probe-covered rows (the first uses of probeCovered, test(think): group A/H successors, batch 4 (declined continuation, chained continuation, client-tool reset, D140/D142, onChatResponse replay, probe-covered rows) #3482). These are the Mid-execution DO code-update resets consume the scheduled-callback retry budget — _chatRecoveryContinue abandoned ms before storage recovers, turn frozen for minutes #1730 platform-error re-throw tests in think-session "Think — onChatRecovery": "re-throws "Network connection lost." (storage transient in a deploy-reset window) and does NOT terminalize", "re-throws the SqlError shape (wrapped transient, retryable flag lost) and does NOT terminalize" and "re-throws a retryable-flagged platform error and does NOT terminalize".

  2. Seven ruled-out rows.

  3. A successor for the terminal-error hydration (think-session "replays a terminal error to a reconnecting client (hydration)"), in onconnect-broadcast.test.ts. A turn really fails, and a tab that reconnects and resumes as useChat does hears the error. After a later turn completes, a reconnecting tab hears none. It passes on the class and fails on the shell (the terminal replay is H2c's), so no row.

  4. Three successors with rows, each passing on both configs:

    • "tells onExhausted the turn's root request, a terminal message and the partial, and keeps the partial" (chat-recovery-public, the recovery budget). It succeeds "onExhausted context carries terminalMessage, recoveryRootRequestId, and the partial (discussion: recovery/repair ergonomics so products don't need a full onChatRecovery override (persist-false footgun, ask_user preserve-as-text, onExhausted payload) #1631)".
    • "answers the question again, from the start, when onChatRecovery says persist: false": a real reset, then one question, one whole answer, one model call. It succeeds "answers the question again when onChatRecovery drops a new turn's partial".
    • "hands onChatRecovery the data the turn stashed before a reset", with the stash held in storage by a new stashInNextTurnForTest. It succeeds "stashed data round-trips through fiber recovery".
  5. A successor for the recovered request context ("continues a partial stream with request context from the recovered snapshot"): after a real reset, the recovery's continuation runs with the request's body field and client tools. It passes on the class. On the shell the recovered turn has no body, so no row (sent to inbox).

  6. A successor for a reset after the reply was stored (think-session "neither continues nor stores again a reply a reset cut after it was stored"): the reset comes while onChatResponse is held, so the turn's run is unfinished and its stream complete. After the restart: the same one reply, no turn and no model call. It passes on both configs. Rows: "does not continue a recovered chat fiber whose stream already completed" and "does not duplicate an already-persisted completed stream on recovery".

  7. A successor for recovering the same cut-off reply twice (chat-recovery-public "keeps a reply recovered twice once, with its partial once, when onChatRecovery says continue: false"): a second reset cuts the first recovery, the recovery runs again, and the stored reply is exactly the partial, once. It passes on both configs. Row: "re-reconstructing the same interrupted stream is idempotent (no duplicate, no loss)".

  8. A successor for a stream a reconnecting tab closed before the recovery decided (chat-recovery-public "continues a reset-cut reply whose stream a reconnecting tab closed before the recovery decided"). The reset comes mid-reply with onChatRecovery held. A tab resumes and acks, which closes the cut-off stream, and then the recovery is released and continues the reply: the partial, then more. It passes on the class. On the shell the tab's resume of the cut-off stream never ends, so no row (H2c's resume path).

  9. A row for "flushes a settled tool result to durable storage immediately", naming B-3's submissions successor "keeps a tool's result and does not run the tool again" (a reset right after the tool; it passes on both configs). The old test also counts stream-log rows, which is the class's own buffering.

Left out on purpose (harness's list):

The class-only check passes.

…vered: verify's vTransientSqlWrapped and vTransientRetryableFlag passed on both Thinks, root and facet, at #347452dc26a (merged in #3472)
…ss's detached recovery shape that Q10 replaces with a retry inside the run, and 6238's stale continuation can't exist when a recovery is the turn's own next attempt (arch's re-ruling)
…obe-covered too: verify's vTransientPlain (shell) and vTransientRunsAgain (class), at #347452dc26a
…ab that reconnects after a turn failed hears the error, and none once a later turn completes (class only; the shell's terminal replay is H2c's, so no row)
…ist: false after a reset (the question answered again from the start), both passing on both configs, with their rows
…atRecovery gets what the turn stashed, on both configs, with its row
…reset-cut reply continues with the request's body and client tools (class only; the shell's recovered turn has no body, so no row)
…d: it is neither continued nor stored again, on both configs, with rows for the two completed-stream recovery tests
… twice: kept once, whole, with continue: false, on both configs, with its row
…ab closed before the recovery decided: the reply is still continued (class only; the shell's resume of a cut-off stream never ends, so no row)
…on' is ruled out with the superseding-user-turn row: a later question waits behind the recovery, so it never finds a newer user leaf
…et successor (a tool's result survives a reset right after it, and the tool does not run again)
@changeset-bot

changeset-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e24b30f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@3498

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@3498

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@3498

hono-agents

npm i https://pkg.pr.new/hono-agents@3498

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@3498

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@3498

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@3498

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@3498

commit: e24b30f

@agent-think

agent-think Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (372822c4 → e24b30fc, workflow run)

@mattzcarey

Copy link
Copy Markdown
Member Author

Replaced by #3503, which carries these tests within its harness-score units (integrated and tested together).

@mattzcarey mattzcarey closed this Nov 28, 2026
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