Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/ci-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ jobs:
docs: ${{ steps.filter.outputs.docs }}
rust-core: ${{ steps.filter.outputs['rust-core'] }}
rust-core-full: ${{ steps.filter.outputs['rust-core-full'] }}
# The vendored engine owns migrated memory tests; Cargo does not run
# dependency tests as part of the OpenHuman crate suite.
tinycortex: ${{ steps.filter.outputs.tinycortex }}
# Shell-quoted list of changed src/ + tests/ files, consumed by
# scripts/ci/rust-coverage-changed.sh (domain-scoped llvm-cov).
rust-core-src-files: ${{ steps.filter.outputs['rust-core-src_files'] }}
Expand Down Expand Up @@ -203,12 +200,6 @@ jobs:
rust-core-src:
- 'src/**'
- 'tests/**'
tinycortex:
- '.github/workflows/ci-lite.yml'
- '.github/workflows/test-reusable.yml'
- '.gitmodules'
- 'scripts/ci-cancel-aware.sh'
- 'vendor/tinycortex'
rust-tauri:
- '.github/workflows/ci-lite.yml'
- 'Cargo.lock'
Expand Down Expand Up @@ -1160,39 +1151,6 @@ jobs:
- name: Run install.ps1 unit tests
run: pwsh -NoProfile -File scripts/tests/OpenHumanWindowsInstall.Tests.ps1

tinycortex-tests:
name: TinyCortex Memory Tests
needs: [changes]
if: needs.changes.outputs.tinycortex == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 30
container:
image: ghcr.io/tinyhumansai/openhuman_ci:latest
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
persist-credentials: false

- name: Init tinycortex and tinymemory submodules
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init --recursive vendor/tinycortex vendor/tinymemory

- name: Cache TinyCortex build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: vendor/tinycortex -> vendor/tinycortex/target
cache-on-failure: true
key: tinycortex

- name: Run TinyCortex engine and Composio sync tests
run: bash scripts/ci-cancel-aware.sh cargo test --manifest-path vendor/tinycortex/Cargo.toml --features git-diff,sync,persona

pr-ci-gate:
name: PR CI Gate
needs:
Expand All @@ -1205,7 +1163,6 @@ jobs:
- test-inventory
- toolchain-image-drift
- pester-install
- tinycortex-tests
- orch-ip-gate
- feature-forwarding-gate
- module-pin-gate
Expand All @@ -1226,7 +1183,6 @@ jobs:
["Test Inventory"]="${{ needs['test-inventory'].result }}"
["Toolchain Image Drift Guard"]="${{ needs['toolchain-image-drift'].result }}"
["PowerShell Install Test"]="${{ needs['pester-install'].result }}"
["TinyCortex Memory Tests"]="${{ needs['tinycortex-tests'].result }}"
["Orchestration IP Gate"]="${{ needs['orch-ip-gate'].result }}"
["Feature Forwarding Gate"]="${{ needs['feature-forwarding-gate'].result }}"
["Module Pin Gate"]="${{ needs['module-pin-gate'].result }}"
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/test-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,39 +249,6 @@ jobs:
fi
done < <(integration_test_targets)

tinycortex-tests:
if: inputs.run_rust_core
name: TinyCortex Memory Tests
runs-on: ubuntu-22.04
timeout-minutes: 30
container:
image: ghcr.io/tinyhumansai/openhuman_ci:latest
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
fetch-depth: 1
persist-credentials: false

- name: Init tinycortex and tinymemory submodules
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git submodule update --init --recursive vendor/tinycortex vendor/tinymemory

- name: Cache TinyCortex build artifacts
uses: Swatinem/rust-cache@v2
with:
workspaces: vendor/tinycortex -> vendor/tinycortex/target
cache-on-failure: true
key: tinycortex-full

- name: Run TinyCortex engine and Composio sync tests
run: bash scripts/ci-cancel-aware.sh cargo test --manifest-path vendor/tinycortex/Cargo.toml --features git-diff,sync

rust-core-tests-windows:
if: inputs.run_rust_core
name: Rust Core Tests (Windows — secrets ACL)
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "vendor/tinyflows"]
path = vendor/tinyflows
url = https://github.com/tinyhumansai/tinyflows
[submodule "vendor/tinycortex"]
path = vendor/tinycortex
url = https://github.com/tinyhumansai/tinycortex
[submodule "vendor/tinychannels"]
path = vendor/tinychannels
url = https://github.com/tinyhumansai/tinychannels
Expand Down
22 changes: 16 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1083,12 +1083,22 @@ Two survivals are deliberate and neither puts the engine back in the product:
allow-listed in `INTENTIONALLY_NOT_FORWARDED`; neither feature is in
`scripts/ci/product-features.txt`.

The `[patch]` entries for `tinycortex` / `tinycortex-api` stay in both manifests
and must not be removed with the dependencies. Dropping a direct dependency and
dropping its patch are different things: the crates are unpublished and the
engine crates still reached as dev-dependencies name them by version
requirement, so removing a patch fails **resolution** ("no matching package
named `tinycortex-api` found") before anything compiles.
The `[patch]` entries for `tinycortex` / `tinycortex-api` stay in the **root**
manifest and must not be removed with the dependencies. Dropping a direct
dependency and dropping its patch are different things: `tinycortex-api` is
unpublished (and the crates.io `tinycortex` is a stale 0.1.1 without the engine
features), the engine crates still reached as dev-dependencies name both by
version requirement, so removing a patch fails **resolution** ("no matching
package named `tinycortex-api` found") before anything compiles. Both point into
tinymemory's own vendored engine, `vendor/tinymemory/vendor/tinycortex` — there
is no top-level `vendor/tinycortex` submodule any more — so the engine the tests
link is the one the prebuilt module was built from, and a tinymemory re-pin
moves it. The shell manifest (`app/src-tauri/Cargo.toml`) carries **no** such
entries: dev-dependencies of a path dependency are never resolved there and
nothing forwards `memory-engine-seams` / `rss-bench`, so its copies sat under
`[[patch.unused]]` in `app/src-tauri/Cargo.lock` from #5560 until they were
removed (`cargo tree --locked --all-features -e normal,dev,build --manifest-path
app/src-tauri/Cargo.toml -i tinycortex` → not in the graph).

`memory/direct_engine_refs_tests.rs` is still the ratchet over direct
`tinymemory_core::` references, but **its non-empty list no longer implies a
Expand Down
37 changes: 25 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ tinyinference = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinfe
# crates. After cloning: `git submodule update --init --recursive vendor/`.
tinytools = { path = "vendor/tinyagents/vendor/tinytools/crates/tinytools" }
# TinyCortex — Rust core for the memory engine (store/chunks/tree/retrieval/
# queue/ingest/score + long tail), vendored as a git submodule and patched
# below to `vendor/tinycortex`. OpenHuman's memory subsystem migrates onto this
# queue/ingest/score + long tail). No longer a submodule of this repo: the
# `[patch.crates-io]` entry below resolves it to the copy `tinymemory` vendors
# (`vendor/tinymemory/vendor/tinycortex`), so the engine the tests link is by
# construction the one the prebuilt `tinymemory` module was built from.
# OpenHuman's memory subsystem migrates onto this
# crate through the adapter seam in `src/openhuman/tinycortex/` (mirroring the
# tinyagents seam): engine logic (including provider sync pipelines) in the
# crate; RPC, agent tools, sync scheduling/credentials/events, security gating,
Expand Down Expand Up @@ -1446,7 +1449,7 @@ should_implement_trait = "allow"
too_many_arguments = "allow"
while_let_loop = "allow"

# The tinycortex vendored above takes `tinymemory-api` by git (it re-exports
# The tinycortex patched in below takes `tinymemory-api` by git (it re-exports
# the TinyMemory contract instead of duplicating it, tinymemory#18 §A1).
# Without this entry cargo resolves that git copy *and* the path copy under
# vendor/tinymemory as two distinct crates, and `tinymemory_api::MemoryCategory`
Expand All @@ -1456,7 +1459,7 @@ while_let_loop = "allow"
[patch."https://github.com/tinyhumansai/tinymemory"]
tinymemory-api = { path = "vendor/tinymemory/crates/tinymemory-api" }

# `tinycortex` (vendored below) depends on `tinyinference` by git rev rather
# `tinycortex` (patched in below) depends on `tinyinference` by git rev rather
# than by path — `[patch.crates-io]` only rewrites crates.io-sourced deps, so
# it does not touch this one. Without this entry cargo resolves a THIRD copy
# of `tinyinference` (git) alongside the path copy openhuman/tinyagents use and
Expand Down Expand Up @@ -1502,15 +1505,25 @@ motosan-ai-oauth = { path = "vendor/motosan-ai-oauth" }
# path (tinyagents' crates are built against it too), so `cargo tree -i
# tinyinference` resolves to exactly one package.
tinyinference = { path = "vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }
# TinyFlows, TinyCortex, and TinyChannels are vendored beside
# TinyAgents so integration work can test crate changes against OpenHuman before
# publishing.
# TinyFlows and TinyChannels are vendored beside TinyAgents so integration
# work can test crate changes against OpenHuman before publishing.
tinyflows = { path = "vendor/tinyflows/crates/tinyflows" }
tinycortex = { path = "vendor/tinycortex" }
# `tinymemory-core` names `tinycortex-api` by version requirement (this crate
# depends on it by path, above). Patch it onto the same checkout so both see one
# copy of the contract types and the trait identities unify.
tinycortex-api = { path = "vendor/tinycortex/api" }
# TinyCortex is not a submodule of this repo. `tinymemory-core` and
# `tinymemory-tinycortex` — the [dev-dependencies] engine — name `tinycortex`
# and `tinycortex-api` by version requirement, i.e. from crates.io.
# `tinycortex-api` was never published, so without a patch resolution fails
# outright ("no matching package named `tinycortex-api` found") before anything
# compiles — product build included, because lock resolution is feature-blind.
# `tinycortex` IS on crates.io, as a stale 0.1.1 that declares none of the
# features the engine crates ask for, so without a patch cargo would look there
# instead of at the commit the module ships, and fail on the features.
# tinymemory already vendors that exact commit, so the patch points into its
# nested checkout rather than a second, hand-synchronised copy: one checkout,
# one copy of the contract types, and a tinymemory re-pin moves the test
# engine with it. Needs `git submodule update --init --recursive
# vendor/tinymemory`; every CI lane that builds Rust checks out recursively.
tinycortex = { path = "vendor/tinymemory/vendor/tinycortex" }
tinycortex-api = { path = "vendor/tinymemory/vendor/tinycortex/api" }
tinychannels = { path = "vendor/tinychannels" }

# Emit just enough DWARF in release builds for Sentry to symbolicate Rust
Expand Down
8 changes: 0 additions & 8 deletions app/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 10 additions & 12 deletions app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ sandbox-bubblewrap = []
# e2e-test-support`. See app/scripts/e2e-build.sh.
e2e-test-support = ["openhuman_core/e2e-test-support"]

# The tinycortex vendored above takes `tinymemory-api` by git (it re-exports
# The root world's tinycortex takes `tinymemory-api` by git (it re-exports
# the TinyMemory contract instead of duplicating it, tinymemory#18 §A1).
# Without this entry cargo resolves that git copy *and* the path copy under
# vendor/tinymemory as two distinct crates, and `tinymemory_api::MemoryCategory`
Expand All @@ -305,8 +305,8 @@ e2e-test-support = ["openhuman_core/e2e-test-support"]
tinymemory-api = { path = "../../vendor/tinymemory/crates/tinymemory-api" }

[patch."https://github.com/tinyhumansai/tinyinference"]
# tinycortex depends on tinyinference by git rev; without this the shell world
# resolves TWO copies of the same types. Mirrors root Cargo.toml:1345.
# Crates in this world name tinyinference by git rev; without this the shell
# world resolves TWO copies of the same types. Mirrors the root Cargo.toml.
tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }

[patch.crates-io]
Expand All @@ -324,16 +324,14 @@ tinytools = { path = "../../vendor/tinyagents/vendor/tinytools/crates/tinytools"
# tinymemory-core declares `tinyinference = "0.2"` (crates-io-shaped, unpublished),
# so this world must patch it exactly as the root manifest does.
tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }
# TinyFlows, TinyCortex, and TinyChannels are vendored beside
# TinyAgents so integration work can test crate changes against OpenHuman before
# publishing.
# TinyFlows and TinyChannels are vendored beside TinyAgents so integration
# work can test crate changes against OpenHuman before publishing.
tinyflows = { path = "../../vendor/tinyflows/crates/tinyflows" }
tinycortex = { path = "../../vendor/tinycortex" }
# `tinymemory-core` (pulled in transitively through `openhuman_core`) names
# `tinycortex-api` by version requirement, same as the root Cargo world —
# patch it onto the same checkout here too, or this independent Cargo world
# tries to resolve it from crates.io and fails (it was never published).
tinycortex-api = { path = "../../vendor/tinycortex/api" }
# No `tinycortex` / `tinycortex-api` patch here. Since openhuman#5560 the
# engine is a [dev-dependencies] and `rss-bench`-only concern of the core
# crate, and neither reaches this world — `Cargo.lock` carried both entries
# under `[[patch.unused]]`. The shipped app reaches memory through the prebuilt
# `tinymemory` module over `tinymemory-api`.
Comment thread
M3gA-Mind marked this conversation as resolved.
tinychannels = { path = "../../vendor/tinychannels" }


Expand Down
2 changes: 1 addition & 1 deletion gitbooks/developing/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Every layer is async and non-blocking. The Rust core processes thousands of conc

## Vendored crate family & recent shifts

Core subsystems run on published `tiny*` crates, vendored as git submodules under `vendor/` (`tinyagents`, `tinyflows`, `tinycortex`, `tinychannels`, `tinyjuice`) so crate changes can be tested in-tree before publishing. The major ownership boundaries are:
Core subsystems run on published `tiny*` crates, vendored as git submodules under `vendor/` (`tinyagents`, `tinyflows`, `tinychannels`, `tinyjuice`, `tinymemory`, …) so crate changes can be tested in-tree before publishing. `tinycortex` is not a top-level submodule: the memory engine is reached through the copy `tinymemory` vendors (`vendor/tinymemory/vendor/tinycortex`), which is the commit the prebuilt `tinymemory` module is built from. The major ownership boundaries are:

- **Agent engine on tinyagents** — every agent turn runs through the `tinyagents` crate harness via the seam in `src/openhuman/agent/tinyagents/`; see [Agent Harness](architecture/agent-harness.md).
- **Memory on tinycortex** — the generic store/tree/queue/retrieval/sync engine is crate-owned. OpenHuman keeps RPC, tools, scheduling, credentials, security/event policy, worker orchestration, and the host namespace-document store; `src/openhuman/memory/tinycortex/` implements those seams. Concrete embedding transports are shared through `tinyagents::harness::embeddings`.
Expand Down
4 changes: 2 additions & 2 deletions src/core/subsystem/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//! (kernel.md §5). A *memory* crate must not be the source of generic kernel
//! vocabulary, and a third-party driver must be able to depend on the contract
//! crate without pulling in the host. The contract crate states both halves of
//! that rule itself (`vendor/tinycortex/api/src/lib.rs`, module docs of
//! `vendor/tinycortex/api/src/health.rs`).
//! that rule itself (`vendor/tinymemory/vendor/tinycortex/api/src/lib.rs`,
//! module docs of `vendor/tinymemory/vendor/tinycortex/api/src/health.rs`).
//!
//! So the contract carries `MemoryHealth` / `Capabilities`, this module carries
//! the kernel's equivalents, and the **memory adapter converts at the
Expand Down
1 change: 0 additions & 1 deletion vendor/tinycortex
Submodule tinycortex deleted from 79131f
Loading