Repository navigation
E4 (draft): Think's turn runs on ThinkHarness - #3351
Merged
Merged
Conversation
|
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
Contributor
|
✅ agents import sizes: no significant changes ( |
mattzcarey
force-pushed
the
slim/harness-h7
branch
2 times, most recently
from
November 27, 2026 03:21
740ffeb to
59244de
Compare
mattzcarey
force-pushed
the
slim/harness-e4
branch
from
November 27, 2026 03:24
348662c to
d301a29
Compare
mattzcarey
force-pushed
the
slim/harness-h7
branch
5 times, most recently
from
November 27, 2026 07:35
9c7d64a to
66cc831
Compare
mattzcarey
force-pushed
the
slim/harness-e4
branch
from
November 27, 2026 07:35
a9092be to
94958da
Compare
mattzcarey
marked this pull request as ready for review
November 27, 2026 08:00
mattzcarey
force-pushed
the
slim/harness-h7
branch
from
November 27, 2026 08:21
66cc831 to
deaaaa2
Compare
mattzcarey
force-pushed
the
slim/harness-e4
branch
from
November 27, 2026 08:21
0779a63 to
d650f63
Compare
… a call approved after a restart; actions see the running operation id
…eforeToolCall changed
… input, also after a restart
…er the action's outcome or the rejection, as on Think
…rt, per actionLedgerRetention
…harness-backed Think records them per operation and answers replyAttachments()
…on the harness-backed Think loads
…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
force-pushed
the
slim/harness-e4
branch
from
November 27, 2026 09:46
046b435 to
8a08826
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inputbeforeToolCallchanged, 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 oneReplyAttachmentsthat 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.tspasses 10 of 10, and the class's action suites are unchanged. Both typechecks are clean after rebasing onto main through H7.Score:
pnpm test:harnesson 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.