Skip to content

feat: publish live tool-result availability before canonical batch drain - #2013

Merged
jbeda merged 21 commits into
mainfrom
impl/tool-result-availability
Sep 30, 2026
Merged

jbeda merged 21 commits into
mainfrom
impl/tool-result-availability

Conversation

@jbeda

@jbeda jbeda commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Stage

Implementation of the approved live tool-result availability contract.

  • Plan / Interface PR: Plan: live tool-result availability #1982
  • Full approved baseline: 170053f5978e258f0f69f0e088a566c17bc96551
  • Plan: docs/acceptance/tool-result-availability.md (this PR proposes its landed status; it becomes authoritative after merge)
  • Interfaces match approved contract: Yes. No implementation deviation required an amendment; there are no human-authorized amendments.

Completed acceptance criteria

  • AC1.1–AC1.5: Safe per-call availability settles completed read-only siblings independently; canonical results retain original call order. Serial, denied, synthetic, and resumed paths emit uniformly; simultaneous completions retain observed monotonic sequence order. Telemetry ends tool spans at availability.
  • AC2.1–AC2.4: PostToolUse, repair, principal validation, inbound review, and held-result release precede availability. Clean siblings can appear around serialized held-result asks. Release and denial preserve exact/synthetic payload and no repeated side effects; cancellation preserves canonical replacement without a second availability event.
  • AC3.1–AC3.4: Live gRPC/SSE and StreamSessionLive relay complete availability results, while all durable recorder and replay/watch paths exclude them. Event-source reconstruction uses only canonical results. Mecatui and ACP correlate one card by call ID, confirm identical canonical results without duplicate presentation, and replace differing payloads. The TypeScript SDK types and decodes the additive event with the existing result payload.

The contributor agent-loop architecture and public embedded agent-loop guide now describe the implemented behavior. Protobuf comments and generated reference, engine API snapshot and changelog, and generated TypeScript reference were updated from their sources. The moved microVM integration-test helper now counts canonical results; the overlapping host-umask test repair was dropped during rebase because upstream #2014 already contains that fix.

Verification

The pre-rebase candidate passed task docs, task test, task lint, task test:race, task api:check, task site:build, task ac-trace-strict (13 named AC proofs), and the offline demo (tool call, permission ask/approval, availability, canonical result). Four-axis panel: PANEL: ship_blockers=0 important=0 advisory=0 reviewer_failures=0.

After rebasing onto main at ce9485821:

  • task docs, task lint, task api:check, task site:build, task ac-trace-strict, and go run ./cmd/mecademo pass.
  • Focused Go tests for engine/session/eventsource, Mecatui client/UI/scrollback, ACP, server, telemetry, and microVM integration pass. Focused race tests for Mecatui UI, server, ACP, and microVM integration pass.
  • Full task test and task test:race are not green: standalone adapters fails resolving pinned internal pseudo-versions on the base branch, reproduced on origin/main (#2018, bug). The full runs also exposed intermittent microVM goleak (#2016, flake) and JSONL lineage conformance (#2017, flake); focused runs pass. These remain open and are not waived by this PR.

Closes #1976

jbeda and others added 19 commits September 30, 2026 11:19
@jbeda
jbeda merged commit 6473fa3 into main Sep 30, 2026
37 of 38 checks passed
@jbeda
jbeda deleted the impl/tool-result-availability branch September 30, 2026 23:04
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 1, 2026
2 tasks
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.

Stream guardrail-released read-only results before sibling completion

1 participant