Skip to content

E4 (draft): Think's turn runs on ThinkHarness - #3351

Merged
mattzcarey merged 13 commits into
mainfrom
slim/harness-e4
Nov 27, 2026
Merged

mattzcarey merged 13 commits into
mainfrom
slim/harness-e4

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

E4 finishes the harness-backed Think's actions, on top of H7 (#3331). It enforces authorizeTurn's grant, also for a call approved after a restart, and actions see the running operation id. It refuses an approved action whose input beforeToolCall changed, and lists permissions computed from a call's input. Its approval methods return the action's outcome or the rejection, are client-callable as on Think, and it sweeps expired action-ledger rows at start. Reply attachments are one ReplyAttachments that both Thinks keep.

By arch's Q7 ruling, E4 stays small. The class's turn moves onto the harness in H11, so H11 carries Think's interrupted-tool changeset line and migration note, the durable-pause shape change, and the carry-forward of actpause_ decisions. The class's tool merge is built from the same extension functions as the shell's.

Validated: each shell change has a test that failed before it. harness-actions.test.ts passes 10 of 10, and the class's action suites are unchanged. Both typechecks are clean after rebasing onto main through H7.

Score: pnpm test:harness on this head (e5819c6) gives 530 of 1330 (15 class-only). That's up from 486 of 1323 (14) on main a89cacf, so the base differs by later main. The class's action suites pass: actions-durable-pause 56/56, execute-hitl 16/16, actions-attach-reply 12/12 and hooks 151/151.

@changeset-bot

changeset-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8a08826

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 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

agents

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

@cloudflare/ai-chat

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

@cloudflare/codemode

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

hono-agents

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

@cloudflare/shell

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

@cloudflare/think

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

@cloudflare/voice

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

@cloudflare/worker-bundler

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

commit: 8a08826

@agent-think

agent-think Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ agents import sizes: no significant changes (65163d77 → 8a088262, workflow run)

@mattzcarey
mattzcarey force-pushed the slim/harness-h7 branch 2 times, most recently from 740ffeb to 59244de Compare November 27, 2026 03:21
@mattzcarey
mattzcarey force-pushed the slim/harness-h7 branch 5 times, most recently from 9c7d64a to 66cc831 Compare November 27, 2026 07:35
@mattzcarey
mattzcarey marked this pull request as ready for review November 27, 2026 08:00
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from slim/harness-h7 to main November 27, 2026 09:45
…ion the harness did not apply is answered as an error
…g; the grant context calls getModel() only when its model is read
…n read; a failing getModel() fails that read
…t lost a race never reports the other outcome
@mattzcarey
mattzcarey merged commit e2eb3f7 into main Nov 27, 2026
18 checks passed
@mattzcarey
mattzcarey deleted the slim/harness-e4 branch November 27, 2026 09:57
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…d approval's grant is told the trigger; trigger pinned; two racing rejections carry the applied reason
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…n' and given a signal that fires if the operation ends unanswered, also after a restart
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…d approval's grant is told the trigger; trigger pinned; two racing rejections carry the applied reason
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…n' and given a signal that fires if the operation ends unanswered, also after a restart
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…on was stopped before the grant ran, fires only on a stop (not a failure), and leaves nothing kept for a settled operation
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…tatus read (one signal per operation); the stop test waits for the operation to settle, reaching the 'already ended' path
mattzcarey added a commit that referenced this pull request Nov 27, 2026
…, authorizeTurn's trigger and signal, model resolved once) (#3468)

* E4 follow-up: a rejection reports the reason it was applied with; the grant context's model is resolved once; the race test requires one answer to state the outcome

* E4 follow-up: authorizeTurn is told the turn's trigger and given its abort signal, as on Think

* E4 follow-up: a test that a call approved after a restart runs when getModel() fails and the grant doesn't read the model

* completes #3351: the grant's model is the one the call uses; a resumed approval's grant is told the trigger; trigger pinned; two racing rejections carry the applied reason

* completes #3351: a resumed approval's grant is told 'auto-continuation' and given a signal that fires if the operation ends unanswered, also after a restart

* completes #3351: a resumed grant's signal is aborted when its operation was stopped before the grant ran, fires only on a stop (not a failure), and leaves nothing kept for a settled operation

* completes #3351: a resumed grant re-checks the signal map after its status read (one signal per operation); the stop test waits for the operation to settle, reaching the 'already ended' path
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