Skip to content

chore: adopt TinyInference bootstrap scheduler - #97

Merged
senamakel merged 13 commits into
epic/8092-inference-outfrom
epic-8092-246-bootstrap-singleflight
Oct 19, 2026
Merged

senamakel merged 13 commits into
epic/8092-inference-outfrom
epic-8092-246-bootstrap-singleflight

Conversation

@senamakel

@senamakel senamakel commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

This PR updates the TinyInference recursive gitlink to the merged bootstrap single-flight change, so TinyAgents builds and downstream hosts consume the scheduler API from its owning component repository.

TinyInference PR #21 is merged at 62a182a28459d7ac5b59f598c749af3166e20f62. The TinyInference change adds non-queuing scheduled bootstrap probes while preserving awaited bootstrap for foreground callers. The leaf implementation commit changes only the TinyInference gitlink; the branch also incorporates the canonical base update described below.

The feature branch retains the TinyAgents epic ancestry (fb31e6f66f50ee8ccb09b0325055b4e3d32f24d5) and merges canonical origin/main through 5bda8a97404e1b44a8d4bbe608548efddd441b00 (canonical PR tinyhumansai#498).

Local validation on the final TinyAgents source:

  • cargo fmt --manifest-path vendor/tinyagents/Cargo.toml --all -- --check
  • CARGO_BUILD_JOBS=1 scripts/ci-cancel-aware.sh cargo test --manifest-path vendor/tinyagents/Cargo.toml -p tinyagents-harness (2964 unit tests and 44 doctests passed; 3 ignored)
  • CARGO_BUILD_JOBS=1 scripts/ci-cancel-aware.sh cargo check --manifest-path vendor/tinyagents/Cargo.toml -p tinyagents-harness
  • CARGO_BUILD_JOBS=1 scripts/ci-cancel-aware.sh cargo clippy --manifest-path vendor/tinyagents/Cargo.toml -p tinyagents-harness --all-targets -- -D warnings

Logs are retained under the OpenHuman epic evidence directory at evidence/leaf246/.

Refs senamakel/openhuman#246
Part of tinyhumansai/openhuman#8092

Exact-head hosted lint, feature-matrix tests, coverage, Windows and aggregate CI checks all passed (10 checks). Final canonical upstream rollup remains pending the epic.

senamakel and others added 13 commits October 19, 2026 02:02
Approval tickets were only recorded when the wrapped middleware returned a
tool result, so errors, cancellations, control returns, and dropped futures
left the resolver without a terminal signal. A guard now reports these
outcomes, including abandonment during unwinding, via a new
record_terminal hook that defaults to the existing record behaviour.

Auto-committed-on: dragonfly
Both approval paths duplicated the same match over the downstream
outcome to complete the ticket guard. The logic now lives in a shared
record_approved helper, so the two call sites just run the next
middleware and hand the result off.

Auto-committed-on: dragonfly
Approved tool calls previously recorded their ticket only when the
downstream run returned successfully, so errors and cancellations left
tickets unresolved. The execution path now uses a guard that reports the
result, control, cancellation, or failure outcome in every case.

Auto-committed-on: dragonfly
The gate previously reported only returned tool results, so errors and
cancellations on approved calls went unrecorded. It now routes all terminal
outcomes through the terminal guard and documents that new resolvers should
implement record_terminal rather than record.

Auto-committed-on: dragonfly
Reformatted the policy gate middleware and its tests to satisfy rustfmt,
splitting long match arms and call chains across lines. Also reordered the
re-exports in the library module so the list stays alphabetized. No behaviour
changed.

Auto-committed-on: dragonfly
Replace the manual TicketGuard bookkeeping in the approved branch with a
call to record_approved, so the outcome is recorded in one place instead
of being matched and completed inline.

Auto-committed-on: dragonfly
The approved path previously recorded the ticket only after the tool
succeeded, so a cancelled or failed call left the approval unresolved.
A guard now records the result, control, cancellation, or failure as soon
as the downstream call returns.

Auto-committed-on: dragonfly
Add a test asserting that a terminal resolver records exactly one
success outcome when an approved tool call runs to completion. This
locks in the expected outcome reporting for the approval gate.

Auto-committed-on: dragonfly
The post_gate short-circuit path returned its result without notifying the
approval resolver, so a ticket consumed by a short-circuited call was never
recorded as approved. The resolver lookup and ticket guard are now established
before invoking post_gate, ensuring the terminal callback fires exactly once.

Auto-committed-on: dragonfly
Reword the `record` doc comment to say "returned tool result" instead of "successful tool result", since the method is not limited to successful outcomes.

Auto-committed-on: dragonfly
…nal-outcome

Record terminal outcomes for approved tool calls
@senamakel
senamakel marked this pull request as ready for review October 19, 2026 00:20
@senamakel
senamakel merged commit 69b0c89 into epic/8092-inference-out Oct 19, 2026
10 checks passed
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