Repository navigation
fix(memory): re-pin tinymemory to v1.21.0 and advertise EpisodicPortability - #6874
Conversation
Register the newly added `running_subagents_wire_tests.rs` test module so that its tests are discovered and executed by the test runner. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a new test file containing golden tests that verify the prompt cache works correctly across different scenarios. These tests ensure that cached prompts are reused when appropriate and that cache invalidation triggers fresh prompt generation. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…crates/openhuman-core/src/web_c Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The dump file path was pointing one directory too deep, causing the test to write to a non-existent location. Adjusted the relative path from three levels up to two levels up to match the actual project structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nscript_compat_tests.rs Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When the session host encounters a transcript with missing optional fields, it now gracefully handles the absence rather than panicking. This ensures compatibility with transcripts generated by older versions of the agent that may not include all fields. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change introduces the tinyagents library as a vendored dependency to support agent-based workflows in the project. The dependency is added to ensure consistent builds and to decouple from external package manager availability. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…s integration The tool policy module was updated to properly handle the tinyagents harness assembly, ensuring that policy enforcement works correctly when tools are invoked through the new agent framework. The approval middleware was also adjusted to align with the updated policy checks, resolving inconsistencies that could cause approval requests to be bypassed or misrouted. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reordered the middleware imports in the harness assembly to list them alphabetically, and removed unnecessary line breaks in the tool policy's call to the gate check method, keeping the code consistent and more readable without changing any behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…entation The `ToolPolicyMiddleware` now implements `ToolMiddleware` directly instead of delegating to the harness `ToolPolicyGate`, giving it full control over the tool execution pipeline. This change moves the channel-permission ceiling check (session deny and per-call permission level) into the middleware itself, and adds session-scoped rendering for `use_skill` calls that filters available tools and provides routing hints when a tool is blocked. The `SessionToolPolicy` adapter and its associated gate are removed, consolidating all policy logic into a single middleware that can resolve tools, check permissions, and render skill listings with consistent session-aware behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…s,crates/openhuman-core/src/age Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Replaced the direct policy check in ToolPolicyMiddleware with the harness's ToolPolicyGate, which wraps a new SessionToolPolicy adapter. This aligns the middleware with the harness's policy seam, enabling consistent desktop approval handling and removing the manual approval-disabled check. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the pinned commit for the tinyagents vendored dependency to incorporate upstream changes. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…dule Adds support for cancel, registry, resolve, roster, and wait operations in the running subagents orchestration module. This change enables proper lifecycle management of sub-agents during execution, allowing them to be tracked, cancelled, and resolved as needed. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The dump.txt file was being tracked in the repository but is now removed from version control, as it should remain an untracked file. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The running_subagents module and its associated test files have been renamed to subagent to better reflect the module's purpose and align with the naming conventions used throughout the orchestration layer. This change updates all internal references and file paths accordingly without altering any behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the test expectations in the error copy fixture tests to match the actual error messages produced by the system, ensuring the tests validate the correct output. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When copying failure data, the system now correctly handles an empty failure table by returning an empty result instead of panicking. This fixes a crash that occurred when attempting to process inference results that had no recorded failures. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…t execution Added loop guards and repeated failure detection to the agent middleware stack, ensuring that agents terminate when they exceed maximum loop iterations or encounter persistent failures. This prevents runaway execution and provides clear error signals for stuck agents. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…types Adds a fallback case to the error classification function so that errors not matching any known pattern are still assigned a default classification instead of causing an unhandled match. This prevents panics when encountering unexpected error variants from external services. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Renamed the budget module to better reflect its purpose and updated the backend error code enum to use the new module path, ensuring consistency across the error handling structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ator Added error handling for inference failures in the loop guards middleware and triage evaluator arm, ensuring that repeated failures are properly detected and reported. Also introduced a failure copy module to propagate error context across inference boundaries, and updated web error response predicates to account for new failure types. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reordered import statements across several modules to follow the project's convention of grouping external crate imports before internal crate imports, and reformatted long assertion lines in test files to improve readability without changing any behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nts_orchestration Move the `DetachedSubagentStatus`, `WaitError`, and `WaitOutcome` imports from the local `running_subagents` module to the external `tinyagents_orchestration::subagent` crate, aligning the subagent control code with the rest of the codebase that already uses the external type. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ystem messages Add a new scenario to the prompt cache golden tests that covers the case where a conversation is resumed with a zero prefix and no system messages, ensuring the cache behaves correctly in this edge case. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a comprehensive set of prompt cache golden test fixtures covering various scenarios including first turns with and without tools, text dialect, resumed sessions, compaction summaries, unrecoverable prefixes, subagent contexts, and system nudges after user messages. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `PromptCacheSegmentMiddleware` and its associated test suite have been removed. This middleware was responsible for declaring stable prompt prefix segments for KV-cache management, but the functionality is no longer needed as the crate's `PromptCacheGuardMiddleware` now handles cache segment detection directly. The removal includes the middleware implementation, its unit tests, the module declaration, and the golden test integration that previously pushed this middleware into the harness. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…tration Replace direct imports from local `running_subagents` module with the canonical types from the `tinyagents_orchestration` crate, and add the `SubagentResumeRef` import that was previously missing. This aligns the subagent tooling and tests with the upstream type definitions after the orchestration logic was moved to the shared library. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add golden and input fixture files for session compatibility tests covering compaction records, generation chains, image user, legacy adoption, native tools, plain sessions, and XML tools. These fixtures provide the necessary test data to validate session serialization and deserialization across different formats and legacy versions. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When loading transcripts from older versions that lack a session_id field, the compatibility layer now defaults to an empty string instead of failing. This ensures that archived sessions remain accessible without requiring migration of historical data. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Skipping rows that barely moved (tinyhumansai#6869) left `last_seen_at` at the last write, but stability counts time since the last reinforcement, which every rebuild used to refresh by writing every row. Stability therefore decayed between writes and jumped back after one, and a facet near a threshold could be demoted and re-promoted with no new evidence. The detector now keeps the previous rebuild's time in memory and reads an existing row as reinforced at that time at the latest, as the refresh would have. A test rebuilds every half hour for a week against a detector that writes every row every cycle: the lifecycle state matches at every step, and confidence and stability stay within the rewrite tolerance.
An empty walk forgot nothing, but still dropped every item from the record, losing the stored ids that forget a file once a later walk shows it is gone, and the forgets waiting to be retried. An empty listing now leaves the record whole.
v1.21.0 ships tinymemory#178: the `EpisodicPortability` family (contract 4.3), served by the module through `ExportEpisodic` and `ImportEpisodic`. The registry record, the 11 asset digests (from the release's checksum.toml), the 7 CI pins and the vendor gitlink move to the tag, and the family joins the advertised list beside the forwarder tinyhumansai#6869 added.
Update the pinned commit for the tinymemory vendored dependency to incorporate upstream fixes and improvements. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the pinned commit for the tinymemory vendored dependency to include the latest upstream changes. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bumps the embedded module record for the tinymemory local memory engine from version 1.20.0 to 1.21.0, updating the release URL, archive filenames, and SHA-256 checksums for all supported platforms. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned version and SHA-256 digest of the tinymemory test module from 1.20.0 to 1.21.0 across all three jobs in the reusable e2e workflow, keeping the values in sync with the authoritative registry pin. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the pinned artifact version from 1.20.0 to 1.21.0 and add the EpisodicPortability capability family to the advertised list, as the module now serves this capability from both engines and forwards it through ModuleMemoryProvider. The corresponding test assertion is updated from 26 to 27 to reflect the new total. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the tinymemory crate from version 1.20.0 to 1.21.0 in the Cargo.lock file to incorporate the latest bug fixes and improvements from the dependency. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned version and SHA-256 digest of the tinymemory test module across all three CI workflows to match the authoritative entry in the registry, ensuring downloaded artifacts remain consistent and avoiding stale-digest failures. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The engine now includes the EpisodicPortability capability in the expected capabilities for the hosted adapter, as tinymemory v1.21.0 serves episodic export and import alongside the existing Episodic capability. The provider tests are updated to reflect this new capability in the bound driver status report. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper review
Last completed reportTiny Sweeper reviewTiny Sweeper reviewed this change across 6 lane(s) and found 3 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete What changedThe review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. Findings
Pending checks: Rust E2E (mock backend), Build Playwright E2E Artifact, E2E (Playwright / web lane), Desktop E2E (full suite, 3 OS) Could not review: .github/workflows/ci-full.yml, .github/workflows/ci-lite.yml, .github/workflows/e2e-playwright.yml, .github/workflows/e2e-reusable.yml, crates/openhuman-core/src/core/subsystem/driver_tests.rs, crates/openhuman-core/src/memory/ops/engine.rs, crates/openhuman-core/src/memory/ops/provider_tests.rs, crates/openhuman-core/src/modules/memory/capabilities.rs, crates/openhuman-core/src/modules/registry/records_memory_juice.rs Before merge
How this fits togetherflowchart LR
n0["...lity_string_maps_into_driver_capabilities<br/>changed"]:::changed
n1["...eports_id_class_contract_and_capabilities<br/>changed"]:::changed
n2["status_from_binding"]:::impacted
n3["driver_capabilities_round_trips_through_json"]:::impacted
n4["from_value"]:::impacted
n5["to_value"]:::impacted
n6["for_workspace"]:::impacted
n7["settle_memory_module"]:::impacted
n0 -->|calls| n4
n0 -->|tests| n4
n0 -->|calls| n5
n0 -->|tests| n5
n1 -->|calls| n2
n1 -->|tests| n2
n1 -->|calls| n6
n1 -->|tests| n6
n1 -->|calls| n7
n1 -->|tests| n7
n3 -->|calls| n4
n3 -->|tests| n4
n3 -->|calls| n5
n3 -->|tests| n5
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
…e mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
refactor(agent): tool policy + approval gate as adapters over the harness policy seam
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughTinyMemory references and checksums advance from version 1.20.0 to 1.21.0. The capability metadata and expected capability lists add EpisodicPortability. CI and E2E workflows use the updated version and checksum. ChangesTinyMemory Upgrade
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The TinyMemory upgrade consistently adds episodic portability across release pins and capability expectations. No actionable merge-blocking risk is established; merge after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The upgrade aligns release pins and capability declarations while retaining download checksum checks. No security regression was verified, but the newly enabled import and export implementation was unavailable for review, leaving authorization, safe retry, and recovery guarantees unresolved. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
A rabbit checks the checksum bright Comment |
… mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
refactor(errors): one failure-copy table and one budget matcher
refactor(agent): vendor loop is the sole owner of prompt-cache segments; delete host PromptCacheSegmentMiddleware
There was a problem hiding this comment.
Requesting changes: 1 lane(s) blocking, worst finding is high.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.0062 · 52,629 in / 11,125 out · 7,680 cached (15%) · ladder/vectors, deepseek/deepseek-v4-flash · 1,426 embedded
tests: $0.0018 · 17,392 in / 1,547 out · 0 cached (0%) · deepseek/deepseek-v4-flash
description: $0.0014 · 8,911 in / 3,119 out · 0 cached (0%) · deepseek/deepseek-v4-flash
e2e: $0.0020 · 18,414 in / 1,889 out · 0 cached (0%) · deepseek/deepseek-v4-flash
| C::Episodic, | ||
| // tinymemory v1.21.0 (#178): the hosted adapter serves episodic | ||
| // export/import alongside `Episodic`. | ||
| C::EpisodicPortability, |
There was a problem hiding this comment.
Add end-to-end test for EpisodicPortability capability
The pull request adds EpisodicPortability to the driver's advertised capability list (engine.rs), updates the artifact capability list (capabilities.rs), and adjusts count assertions in unit tests (driver_tests.rs, provider_tests.rs). No end-to-end test actually calls an episodic export or import operation or verifies that the module serves this capability over the bus. Without an E2E test, a regression in this new capability would not be caught by the CI suite.
[RULE] e2e-uncovered ·
…py-review fix(memory): review fixes for engine-switch copy + re-pin tinymemory v1.21.0 (tinyhumansai#6718)
…mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
refactor(orchestration): move detached sub-agent status/wait/ledger/roster into tinyagents-orchestration
…ains Co-authored-by: Medulla <medulla@tinyhumans.ai>
refactor(agent): persist and replay the vendor message row; delete host ChatMessage/ConversationMessage and their converters
…module mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
Summary
On main, 8 lib tests fail. Seven of them have one cause:
vendor/tinymemorysits atv1.20.0-3, which includes tinymemory#178. That PR added theEpisodicPortabilityfamily (ExportEpisodic/ImportEpisodic), and 33d2efd wired it into the host.ARTIFACT_CAPABILITIESand the capability-count tests still described 26 families while the contract has 27.tinymemory v1.21.0 is published and contains #178, so this moves both pins to it.
Changes
vendor/tinymemory: pinned to the cleanv1.21.0tag. No pin exemption is needed.records_memory_juice.rsmoves to 1.21.0, with the release URL and all 11 platform digests copied verbatim from the release'schecksum.toml(gh release download v1.21.0 -R tinyhumansai/tinymemory -p checksum.toml).e2e-reusable.yml,ci-full.ymlandci-lite.ymlnow pinmemory_version=1.21.0and the ubuntu-22.04 x86_64 digest from thatchecksum.toml.modules/memory/capabilities.rs:ARTIFACT_CAPABILITIES_PINis now 1.21.0 and listsEpisodicPortability. v1.21.0'stinymemory-moduleserves it, andModuleMemoryProvider::as_episodic_portabilityforwards it.memory/ops/engine.rs: the hosted (tinyhumans) engine row advertisesEpisodicPortability, matching what the hosted driver reports at bind.episodic_portability.Verification (product features)
memory-remote: thememory::ops::enginetests pass with it enabled (40).check-module-pinsreports nothing for tinymemory, and the CI workflows match the registry digest.check-submodule-monotonic upstream/main HEADpasses.cargo check --tests -p openhuman -p openhuman-cliis clean.The eighth failure on main, MCP
list_tools_errors_for_unconnected_server, also passes on this branch.Summary by CodeRabbit