Repository navigation
Make TinyMemory engine resolution async - #48
Merged
senamakel merged 7 commits intoOct 27, 2026
Merged
Conversation
The EngineResolver trait now exposes an async resolve method, and all call sites await it. This lets resolvers perform asynchronous work such as I/O when locating the configured engine and identity instead of blocking the caller. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a DeferredResolver test double whose resolve future stays pending until released, and a test asserting that pre_turn does not complete while engine resolution is still in flight. This pins down the ordering guarantee that citations are not recorded before the engine memory is available. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…lock The StaticResolver implementation of EngineResolver was missing the async_trait attribute, so it now matches the trait's async signature. The DeferredResolver resolve method also drops its mutex guard before awaiting the release, avoiding holding the lock across an await point. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Track resolver invocations with an atomic counter so the pre-turn test can verify the async engine resolution is awaited exactly once before proceeding. The fixture now clones the resolver handle to keep it accessible after the turn completes. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test now clones the resolver before passing it to TurnHooks so the original binding stays available for later assertions. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The fixture builder cloned the resolver before moving it into the struct, which was unnecessary since the value is not used afterwards. Removing the clone keeps the test setup free of a needless allocation. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bumps tokio from 1.53.1 to 1.53.3 and downgrades the windows-sys dependency pulled in by several crates from 0.61.2 to 0.52.0. The lockfile was regenerated to reflect the resolved dependency graph. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
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.
Summary
Make
EngineResolver::resolveasynchronous so hosts can resolve credentials without blocking. Await resolution in pre-turn, post-turn, and compaction lifecycle hooks, and add a regression test proving pre-turn waits for asynchronous resolution.Update the locked Tokio patch to 1.53.3 to clear the current
RUSTSEC-2026-0386supply-chain failure.Verification
cargo fmt --all -- --checkcargo deny check allcargo +1.96 check -p tinymemory-toolscargo +1.96 test -p tinymemory-tools --lib(403 passed)Refs senamakel/openhuman#656