Skip to content

Make TinyMemory engine resolution async - #48

Merged
senamakel merged 7 commits into
epic/8089-test-ownershipfrom
sec-656-async-engine-resolver
Oct 27, 2026
Merged

senamakel merged 7 commits into
epic/8089-test-ownershipfrom
sec-656-async-engine-resolver

Conversation

@senamakel

@senamakel senamakel commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Make EngineResolver::resolve asynchronous 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-0386 supply-chain failure.

Verification

  • cargo fmt --all -- --check
  • cargo deny check all
  • cargo +1.96 check -p tinymemory-tools
  • cargo +1.96 test -p tinymemory-tools --lib (403 passed)

Refs senamakel/openhuman#656

senamakel and others added 7 commits October 27, 2026 02:47
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>
@senamakel
senamakel merged commit 4b83a81 into epic/8089-test-ownership Oct 27, 2026
34 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