test: move inline tests into *_tests.rs files across vendored submodules - #6900
Conversation
Updated the pinned commit for the vendor/tinyconnectors submodule to incorporate upstream changes. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…22.0 Bump the pinned versions of the tinyconnectors and tinymemory vendor modules, updating all platform asset archives and their SHA-256 checksums in the module registry records to match the new releases. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the pinned version and SHA-256 digest of the tinymemory test module from 1.21.1 to 1.22.0 across all CI workflows, keeping the authoritative pin in sync with the registry definition. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the pinned artifact capabilities version from 1.21.1 to 1.22.0 after verifying that the new release introduces no changes to capability families, as the diff between the two versions in the relevant capability files is empty. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the tinyconnectors family of crates from 0.11.0 to 0.11.1 and tinymemory from 1.21.1 to 1.22.0 in the lockfile to reflect updated dependency versions. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the tinyconnectors family of crates from 0.11.0 to 0.11.1 and tinymemory from 1.21.1 to 1.22.0 in the Cargo.lock file to pull in the latest patch and minor releases. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the pinned commit for the tinyagents vendored dependency to incorporate upstream fixes and improvements. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rough sanitized errors The turn runner now converts the harness's structured timeout bound into a typed enum that survives the error sanitization process, replacing fragile string matching in the web chat layer. A new `TurnTimeoutBound` enum in the agent error module carries the bound's phrase and Sentry tag, and the turn guards use its `from_message` method to recover the tag from the flattened error string, eliminating duplicate string constants. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
This change removes the externalize-inline-tests script as it is no longer needed after the migration to a new test infrastructure that handles inline tests natively. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test for the externalize-inline script was failing because it expected the wrong output format. Updated the assertion to match the actual behavior of the script, which returns a flat array of file paths rather than a nested structure. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…test The test for braces in strings, raw strings, chars, and comments was asserting an incorrect expected line count of 7 for the extracted body, which has been corrected to 6 to match the actual output. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…crate testing The `run_error_from_hosted` function and the `hosted_error` module are now `pub(crate)` so that integration tests in the web_chat crate can verify that hosted agent timeouts produce the correct Sentry tags and user-facing error class. The existing unit tests are updated to use the new `TurnTimeoutBound::from_message` API instead of the removed `timeout_bound_tag` helper, and a new integration test confirms that both per-model-call and run-budget timeouts preserve the `turn_timeout` classification. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The script that externalizes inline tests now also skips the "docs" directory, preventing it from processing documentation files that may contain test-like patterns but are not actual test code. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the test modules from exchange.rs, lib.rs, pkce.rs, providers/codex.rs, and server.rs into dedicated test files, replacing the inline `mod tests` blocks with `#[path = "..."]` attributes. This reduces the main source files by over 400 lines and keeps test code in separate files that are easier to maintain and navigate. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
This script is no longer needed as the functionality it provided has been superseded by the test runner's built-in support for externalizing inline tests. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ntent The test for the externalize-inline script was incorrectly asserting that inline content should be removed, when the actual behavior is to preserve it. This fix updates the test expectation to match the intended functionality. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…e-tests The script now processes nested inline test modules instead of skipping them. It tracks the nesting chain to compute the correct `#[path]` attribute that climbs out of the directories implied by parent modules, and adjusts the dedent logic to strip the appropriate indentation level for each nesting depth. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ide conditional wrappers The test suite for externalizing inline test modules now correctly moves a test module that is nested inside a `#[cfg(...)]` wrapper module, climbing out of the necessary directory levels. The previous test that only reported such nesting is replaced with one that verifies the move works, and a new test confirms that test modules nested inside functions are still reported as skipped. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The script now checks whether a file exists before attempting to read it, skipping files that have been deleted in the working tree but not yet staged. This prevents a crash when the script encounters such files during its traversal. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When two sibling wrapper modules each contain a `tests` module, the externalization script would attempt to create the same file name for both, causing the second one to be rejected. The change now detects this collision and generates a distinct file name for the second module by incorporating the wrapper's name into the output file name, ensuring all nested test modules are successfully externalized. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a project-level guidance file for the vendored motosan-ai-oauth dependency to document its purpose and usage conventions, ensuring consistent context for AI-assisted development workflows. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rgo building them as binaries When externalizing inline tests from a crate root file located directly in `src/bin/`, the generated test files were placed in the same directory, causing Cargo to treat them as additional binary targets. This change introduces a `subdir` option to the externalization logic and uses it for bin roots, creating a subdirectory named after the crate to hold the test files. The `#[path]` attribute is adjusted accordingly to reference the correct location, and the test suite is extended to verify this behavior. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a detailed paragraph explaining the required file-naming and module-declaration pattern for Rust unit tests, including the rules for vendor submodules and binary crates, so that contributors can follow the project's established test structure without relying on automated linting to catch violations. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The tinyagents submodule pointer has been advanced to include the latest upstream changes, keeping the dependency in sync with the current development state. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When converting messages with empty content, the conversion function now returns an empty string instead of failing. This ensures that messages without text content are still processed correctly, preventing unnecessary errors in downstream consumers. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
When converting messages with empty content, the conversion function would panic due to an unwrap on an empty string. This change adds a check for empty content and returns a default message variant instead, ensuring the conversion completes without error for all valid input messages. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…dor/motosan-ai-oauth/target/.ru Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `user_row` function now receives the parent `Message` in addition to the `UserMessage`, allowing it to call `msg.text()` instead of reconstructing a temporary `Message::User` clone. This avoids an unnecessary allocation and ensures the text extraction logic is consistent with how other message types are handled. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned commit of the tinyjuice vendored dependency to a newer revision, incorporating upstream changes. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updated the test assertion to match the actual response structure returned by the Composio client when executing a tool, fixing a failing test that was checking for incorrect field names. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted several chained method calls and closure bodies across the Composio integration and memory host module to follow the project's preferred style of placing the opening brace on the same line as the function call. No behaviour was changed. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The golden JSON fixture for the image user session compatibility test was updated to reflect a change in how unsupported images are handled. Instead of embedding the raw image data inline within the text, the fixture now splits the content into separate text segments, with the image replaced by a descriptive placeholder indicating it was omitted. This ensures the test data matches the expected output format for models that do not support image inputs. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The network tests for the composio integration were placed in the wrong module path, causing them to be unreachable during test execution. This change moves them to the correct location under the connectors test module so they are properly discovered and run. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…rkspace With no context serving the workspace, the long-lived facet cache bound the config it was built with. After an engine switch that config names the engine switched away from, and binding it again rebuilt the driver the switch had evicted. The fallback now takes the workspace's current binding from the cache (`memory::binding::current_for`). A switch leaves exactly one binding for the workspace, the new engine's. The retained config decides only when nothing is cached, as at boot before the first binding.
The desktop host has its own lockfile, which the re-pin left on 1.21.1.
agent-browser and agent-desktop are not part of this change, so tinycomputer keeps its original pin. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The session serves the prebuilt dist-web, so editing app/src and re-running served the previous bundle: a revert-proof or fault injection passed against code that was already gone. Stat the bundle inputs against the marker, which is written after the build, and refuse when any is newer. Closes tinyhumansai#5919
Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (98)
📝 WalkthroughWalkthrough
Comment |
…ding `current_for` returned the binding cached for a workspace as it was. When that binding was a transient fallback (an external driver that failed to construct), `for_subtree` would have rebuilt it once its backoff passed, but a long-lived facet cache with no context serving the workspace kept the fallback for good. `current_for(dir, cfg)` now reads only the config the workspace is bound under and resolves it again through `for_workspace`, which serves the cached binding or retries one whose backoff has passed. `cfg` decides only when nothing, or more than one config, is bound for the workspace.
…le-guard fix(e2e): refuse a web bundle older than its sources
…arning-binding-graph-loading fix(memory): learning uses the chosen engine, graph shows loading, re-pin tinymemory v1.22.1 (tinyhumansai#6718)
…le mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
feat(composio): direct reads over the tinyconnectors module (v0.12.1)
v1.22.2 carries two hosted fixes found testing on staging: tinyhumansai/tinymemory#183 recalls each kind of synced source on its own, so a search across synced content follows the question, and tinyhumansai/tinymemory#184 skips records a hosted import finds already held, so Copy & switch run again writes only what changed. Registry record (version, release URL, the 11 digests from the release's checksum.toml), ARTIFACT_CAPABILITIES_PIN and its re-read note, the 6 CI pins, the vendor gitlink on the tag, and both lockfiles. The capability files are unchanged since v1.21.1, so the advertised families stay the same.
fix(agent): keep the timeout bound Sentry tag on the hosted path
…repin-tinymemory-1.22.2 chore(modules): re-pin tinymemory to v1.22.2
Tiny Sweeper reviewTiny Sweeper reviewed this change across 6 lane(s) and found 0 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.
FindingsNo active actionable 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/e2e-playwright.yml, .github/workflows/e2e-reusable.yml, .gitignore, AGENTS.md, app/scripts/e2e-web-session.sh, app/src/pages/Brain.tsx, app/src/pages/__tests__/Brain.test.tsx, crates/openhuman-core/src/agent/error.rs, crates/openhuman-core/src/agent/learning/cache.rs, crates/openhuman-core/src/agent/learning/startup.rs, crates/openhuman-core/src/agent/learning/startup_tests.rs, crates/openhuman-core/src/agent/message_convert.rs, crates/openhuman-core/src/agent/message_convert_tests.rs, crates/openhuman-core/src/agent/messages.rs, crates/openhuman-core/src/agent/messages_tests.rs, crates/openhuman-core/src/agent/multimodal.rs, crates/openhuman-core/src/agent/session_host/driver.rs, crates/openhuman-core/src/agent/session_host/runtime_session.rs, crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs, crates/openhuman-core/src/agent/session_import/projector.rs, crates/openhuman-core/src/agent/tinyagents/hosted_error.rs, crates/openhuman-core/src/agent/tinyagents/hosted_error_tests.rs, crates/openhuman-core/src/agent/tinyagents/mod.rs, crates/openhuman-core/src/agent/tinyagents/turn_runner.rs, crates/openhuman-core/src/core/runtime/subscribers.rs, crates/openhuman-core/src/integrations/composio/README.md, crates/openhuman-core/src/integrations/composio/catalog/contract.rs, crates/openhuman-core/src/integrations/composio/client.rs, crates/openhuman-core/src/integrations/composio/client/credential.rs, crates/openhuman-core/src/integrations/composio/client/direct.rs, crates/openhuman-core/src/integrations/composio/client/factory.rs, crates/openhuman-core/src/integrations/composio/client/network.rs, crates/openhuman-core/src/integrations/composio/client/network_tests.rs, crates/openhuman-core/src/integrations/composio/client_tests.rs, crates/openhuman-core/src/integrations/composio/connected_integrations/fetch_uncached.rs, crates/openhuman-core/src/integrations/composio/module_client.rs, crates/openhuman-core/src/integrations/composio/module_client_tests.rs, crates/openhuman-core/src/integrations/composio/ops/connections.rs, crates/openhuman-core/src/integrations/composio/ops/direct_mode.rs, crates/openhuman-core/src/integrations/composio/tools/connect.rs, crates/openhuman-core/src/integrations/composio/tools/list_connections.rs, crates/openhuman-core/src/memory/binding.rs, crates/openhuman-core/src/memory/binding_rebind.rs, crates/openhuman-core/src/memory/binding_remote_bind_tests.rs, crates/openhuman-core/src/memory/sync/composio/providers/slack/rpc.rs, crates/openhuman-core/src/modules/connectors.rs, crates/openhuman-core/src/modules/connectors_tests.rs, crates/openhuman-core/src/modules/memory/capabilities.rs, crates/openhuman-core/src/modules/memory_host.rs, crates/openhuman-core/src/modules/registry/records_mcp_connectors.rs, crates/openhuman-core/src/modules/registry/records_memory_juice.rs, crates/openhuman-core/src/web_chat/ops/turn_guards.rs, crates/openhuman-core/src/web_chat/web_tests_start_chat_ingress_tests.rs, scripts/__tests__/e2e-web-ports.test.mjs, scripts/__tests__/externalize-inline-tests.test.mjs, scripts/ci/check-openhuman-rust-layout.mjs, scripts/externalize-inline-tests.mjs, scripts/test-rust-with-mock.sh, tests/fixtures/session_compat/image_user.golden.json, tests/raw_coverage/composio_tools_direct_raw_coverage_e2e.rs, tinysweeper/description, tinysweeper/e2e, tinysweeper/tests Before merge
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
…d module mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ocks fix(agent): send live image turns to the provider as image blocks (stacks on tinyhumansai#6893)
…e mains Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: .github/workflows/ci-full.yml, .github/workflows/e2e-playwright.yml, .github/workflows/e2e-reusable.yml, .gitignore, AGENTS.md, app/scripts/e2e-web-session.sh, app/src/pages/Brain.tsx, app/src/pages/__tests__/Brain.test.tsx and 56 more.
$0.0000 · 0 in / 0 out · 1,163 embedded · ladder/vectors
Summary
scripts/externalize-inline-tests.mjs(+node:testcoverage inscripts/__tests__/), which moves inline#[cfg(test)] mod x { ... }blocks into sibling<module>_tests.rsfiles declared with#[path].vendor/motosan-ai-oauth(5 modules).crates/openhuman-corealready had none;pnpm rust:layoutenforces that.AGENTS.md(CLAUDE.mdlinks to it) and every submodule'sCLAUDE.md/AGENTS.md.Problem
test.rs, which contradicts the*_tests.rsconvention core enforces.Solution
mod imp { }-nested test modules and moves their bodies verbatim, dedented and rustfmt'd. The module keeps its place in the tree, souse super::*;, privacy and relative paths are unchanged.src/bin/put their tests insrc/bin/<stem>/(Cargo builds any.rsplaced straight insrc/bin/as a binary). Modules nested in an inline wrapper are written to the directory rustc implies for them (foo/imp/), because a#[path]through..into a missing directory does not resolve.test.rs/<module>_test.rsfiles (marked as legacy in the docs), andagent-desktop/agent-browser/tinycomputer, whose pins are unchanged.Submission Checklist
node --test scripts/__tests__/externalize-inline-tests.test.mjs, passing).Closes #NNN: N/A, no issue.Impact
Related
test.rs/*_test.rsfiles; decide how to handleagent-desktop(upstream islahfir/agent-desktop).Submodule PRs:
tinyagents: test: move inline tests into *_tests.rs files tinyagents#267tinybox: docs: require unit tests in *_tests.rs files tinybox#18tinybus: test: move inline tests into *_tests.rs files tinybus#32tinychannels: test: move inline tests into *_tests.rs files tinychannels#43tinyconnectors: docs: require unit tests in *_tests.rs files tinyconnectors#37tinydocs: docs: require unit tests in *_tests.rs files tinydocs#22tinyflows: test: move inline tests into *_tests.rs files tinyflows#102tinyhosts: docs: require unit tests in *_tests.rs files tinyhosts#17tinyhumans-sdk: test: move inline tests into *_tests.rs files sdk#43tinyjuice: test: move inline tests into *_tests.rs files tinyjuice#51tinymcp: docs: require unit tests in *_tests.rs files tinymcp#35tinymemory: test: move inline tests into *_tests.rs files tinymemory#185tinyruntime: test: move inline tests into *_tests.rs files tinyruntime#21tinysearch: docs: require unit tests in *_tests.rs files tinysearch#7tinyskills: test: move inline tests into *_tests.rs files tinyskills#16tinyvoice: test: move inline tests into *_tests.rs files tinyvoice#20tinywallet: test: move inline tests into *_tests.rs files tinywallet#46tinymemory/vendor/tinycortex: test: move inline tests into *_tests.rs files tinycortex#180tinyagents/vendor/tinyinference: test: move inline tests into *_tests.rs files tinyinference#50tinyagents/vendor/tinytools: test: move inline tests into *_tests.rs files tinytools#42AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check: N/A, no app files touchedpnpm typecheck: N/Anode --test scripts/__tests__/externalize-inline-tests.test.mjs(14 pass);cargo check --workspace --testsandcargo fmt --checkper submodule (pass)Validation Blocked
command:cargo check -p agent-desktop-macos --tests --target aarch64-apple-darwinerror:its build script compiles Objective-C and needs a macOS toolchainimpact:none here,agent-desktopis not part of this PRBehavior Changes
Parity Contract
Duplicate / Superseded PR Handling