Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
90c759a
chore(vendor): bump tinytools and tinyinference submodules
senamakel Oct 22, 2026
b4e1dc2
test(turn_runner): cover live turn ordering and queue snapshot fifo
senamakel Oct 22, 2026
fab8dd1
chore(vendor): bump tinytools submodule
senamakel Oct 22, 2026
09f9002
chore(vendor): bump tinyinference submodule
senamakel Oct 22, 2026
5b52406
feat(turn_runner): expose live turns and return cancelled request ids
senamakel Oct 22, 2026
fa09706
test(turn_runner): gate parallel turn tests on a release signal
senamakel Oct 22, 2026
d7e114f
docs(turn_runner): document host inspection and cancellation APIs
senamakel Oct 22, 2026
be0fb60
test(turn_runner): cover live turns and cancellation across agents
senamakel Oct 22, 2026
19d4b9e
refactor(turn_runner): iterate parallel_active keys directly
senamakel Oct 22, 2026
82f197d
test(turn_runner): cover completed execution not reported as cancelled
senamakel Oct 22, 2026
3ebf0d0
fix(turn_runner): close cancellation window before reporting turn com…
senamakel Oct 22, 2026
b98ceef
fix(turn_runner): keep cancelled parallel turns visible until cleanup
senamakel Oct 22, 2026
811df4a
refactor(turn_runner): store parallel cancellation tokens directly
senamakel Oct 22, 2026
16501cb
feat(turn_runner): add TurnQueueItem trait to decouple queue storage …
senamakel Oct 22, 2026
21e5da2
refactor(turn_runner): parameterize active turn state over queue item…
senamakel Oct 22, 2026
5927256
refactor(turn_runner): reexport TurnQueueItem and use it in queue rem…
senamakel Oct 22, 2026
4537abd
refactor(turn_runner): drop unused type parameter from ActiveTurn
senamakel Oct 22, 2026
dfdbac7
fix(turn_runner): add phantom payload marker to TurnRunner
senamakel Oct 22, 2026
f0ec783
fix(turn_runner): keep parallel turn entries after cancellation
senamakel Oct 22, 2026
f2f7b40
refactor(turn_runner): store cancellation tokens directly for paralle…
senamakel Oct 22, 2026
1c83176
feat(turn_runner): support custom queue item types in turn host
senamakel Oct 22, 2026
341e544
test(turn_runner): split wrapped queue host into its own type
senamakel Oct 22, 2026
15ba1bc
test(turn_runner): wrap host in WrappedHost for queue test
senamakel Oct 22, 2026
d751ecd
test(turn_runner): correct queued request flag in custom queue test
senamakel Oct 22, 2026
82146f3
test(turn_runner): align queued request scopes with primary scope
senamakel Oct 22, 2026
5297454
docs(turn_runner): document custom queue item type and live turn trac…
senamakel Oct 22, 2026
52c0ba5
test(turn_runner): cover single cancel report until cleanup finishes
senamakel Oct 22, 2026
291f7ce
fix(turn_runner): mark cancelled turns as non-cancellable
senamakel Oct 22, 2026
bf138dd
refactor(turn_runner): iterate parallel_active keys directly
senamakel Oct 22, 2026
a096fdd
Merge remote-tracking branch 'origin/main' into tinyagents-runner-ins…
senamakel Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions crates/tinyagents-harness/src/turn_runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,28 @@ existing sinks. When one generation failure retires queued requests, the runner
rewrites each classification message to match that request's queued failure
message while preserving its class and details.

`TurnQueueItem<P>` lets a host store its own queue wrapper while the runner and
agent loop share the same `RunQueue` allocation. Implement the lossless request
conversions on the host wrapper and select it as the runner's trailing
queue-item type; the default remains `TurnRequest<P>`. Queue snapshots and
`TurnHost::run` expose that exact queue item type, while dispatch converts the
item back to its complete `TurnRequest<P>`.

## Host inspection and cancellation

`live_turns` returns identity-only `LiveTurn` records for primary and parallel
turns tracked through cleanup, including turns already canceled or completing.
Hosts can filter these records by `ScopeKey` and thread to prepare cancellation
notes without receiving runner-owned tokens. Use
`cancel_requests` to cancel matching turns and receive the request IDs it
actually stopped; when an unscoped cancellation matches multiple turns, the
primary request ID comes first, followed by parallel request IDs in
lexicographic order. The existing `cancel` method remains a boolean wrapper
for callers that only need to know whether anything matched.

`queue_snapshot` copies the active primary queue without consuming it. Items
are tagged by lane in Steer, Followup, Collect order, with FIFO order preserved
within each lane. Hosts can render or classify pending work from the snapshot
and still leave subsequent draining to the runner.

Focused unit coverage lives in `mod_tests.rs` and `mod_api_tests.rs`.
4 changes: 2 additions & 2 deletions crates/tinyagents-harness/src/turn_runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub(crate) use types::ActiveTurn;

pub use types::{
EventSink, FailureClassification, FailureClassifier, IngressDecision, IngressPolicy,
IngressStage, QueueDisposition, ReplyStore, RequeuePayload, ScopeKey, Summarizer,
TerminalEvent, TurnHost, TurnRequest, TurnResult, TurnRunner, TurnRunnerConfig,
IngressStage, LiveTurn, QueueDisposition, ReplyStore, RequeuePayload, ScopeKey, Summarizer,
TerminalEvent, TurnHost, TurnQueueItem, TurnRequest, TurnResult, TurnRunner, TurnRunnerConfig,
TurnRunnerError, TurnSession, TurnSignal, WorkTracker, deterministic_reply_id,
};

Expand Down
Loading
Loading