Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test: add missing test files for AI settings and usage state

Steven Enamakelac72b8b9ab76
diff --git a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
index 82cd5b50b3..4d5e914704 100644
--- a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx
@@ -36,7 +36,7 @@ import AIPanel, {
vi.mock('../../../../services/api/aiSettingsApi', async importOriginal => {
const actual = await importOriginal<typeof import('../../../../services/api/aiSettingsApi')>();
return {
- ALL_WORKLOADS: ['chat', 'reasoning', 'agentic', 'coding', 'memory', 'embeddings', 'learning'],
+ ALL_WORKLOADS: ['chat', 'reasoning', 'agentic', 'coding', 'memory', 'embeddings'],
loadAISettings: vi.fn(),
saveAISettings: vi.fn(),
loadLocalProviderSnapshot: vi.fn(),
@@ -129,7 +129,6 @@ const baseSettings = {
vision: { kind: 'openhuman' as const },
memory: { kind: 'openhuman' as const },
embeddings: { kind: 'openhuman' as const },
- learning: { kind: 'openhuman' as const },
},
modelRegistry: [],
};
@@ -371,7 +370,6 @@ describe('AIPanel', () => {
'Coding',
'Vision',
'Memory summarization',
- /Learning/,
]) {
expect(screen.getByText(label)).toBeInTheDocument();
}
@@ -887,7 +885,6 @@ describe('AIPanel', () => {
vision: { kind: 'openhuman' as const },
memory: { kind: 'openhuman' as const },
embeddings: { kind: 'openhuman' as const },
- learning: { kind: 'openhuman' as const },
},
modelRegistry: [],
};
@@ -1513,7 +1510,6 @@ describe('AIPanel', () => {
vision: { kind: 'openhuman' as const },
memory: { kind: 'openhuman' as const },
embeddings: { kind: 'openhuman' as const },
- learning: { kind: 'openhuman' as const },
},
modelRegistry: [],
};
@@ -1568,7 +1564,6 @@ describe('AIPanel', () => {
vision: { kind: 'openhuman' as const },
memory: { kind: 'openhuman' as const },
embeddings: { kind: 'openhuman' as const },
- learning: { kind: 'openhuman' as const },
},
modelRegistry: [],
};
@@ -2214,7 +2209,6 @@ describe('buildRoutingDiffSummary', () => {
coding: { kind: 'default' },
vision: { kind: 'default' },
memory: { kind: 'default' },
- learning: { kind: 'default' },
});
it('emits one "<label> → <target>" entry per changed workload and skips unchanged ones', () => {
diff --git a/app/src/hooks/useUsageState.test.ts b/app/src/hooks/useUsageState.test.ts
index ae54606e4f..6856661dea 100644
--- a/app/src/hooks/useUsageState.test.ts
+++ b/app/src/hooks/useUsageState.test.ts
@@ -616,7 +616,7 @@ describe('useUsageState', () => {
});
it('suppresses near-limit banner when chat is fully routed away but background workloads remain (#3097)', async () => {
- // Background workloads (memory, learning, …) keep the billing API call
+ // Background workloads (memory, …) keep the billing API call
// alive (ALL_WORKLOADS check), but isFullyRoutedAway (CHAT_WORKLOADS) is
// true so the near-limit banner must NOT show — the user's chat is not
// on OpenHuman's budget.
diff --git a/app/src/services/api/__tests__/aiSettingsApi.test.ts b/app/src/services/api/__tests__/aiSettingsApi.test.ts
index 871d22afe6..94781b1eaa 100644
--- a/app/src/services/api/__tests__/aiSettingsApi.test.ts
+++ b/app/src/services/api/__tests__/aiSettingsApi.test.ts
@@ -90,7 +90,6 @@ function makeClientConfigResult(overrides: Record<string, unknown> = {}) {
coding_provider: null,
memory_provider: null,
embeddings_provider: null,
- learning_provider: null,
...overrides,
},
};
@@ -383,7 +382,6 @@ describe('loadAISettings', () => {
coding_provider: 'ollama:codellama:13b',
memory_provider: null,
embeddings_provider: null,
- learning_provider: null,
})
);
mockAuthListProviderCredentials.mockResolvedValue(makeAuthProfileResult([]));
@@ -563,7 +561,6 @@ describe('saveAISettings', () => {
vision: { kind: 'openhuman' },
memory: { kind: 'openhuman' },
- learning: { kind: 'openhuman' },
},
modelRegistry: [],
creditsBypass: { chat: false, reasoning: false },
@@ -662,7 +659,6 @@ describe('saveAISettings', () => {
vision: { kind: 'openhuman' },
memory: { kind: 'openhuman' },
- learning: { kind: 'openhuman' },
},
modelRegistry: [],
};
diff --git a/app/src/services/api/__tests__/openrouterFreeModels.test.ts b/app/src/services/api/__tests__/openrouterFreeModels.test.ts
index fed44c2daf..63cdb9a28b 100644
--- a/app/src/services/api/__tests__/openrouterFreeModels.test.ts
+++ b/app/src/services/api/__tests__/openrouterFreeModels.test.ts
@@ -54,7 +54,6 @@ function settings(hasOpenRouterKey = false) {
agentic: { kind: 'openhuman' },
coding: { kind: 'openhuman' },
memory: { kind: 'openhuman' },
- learning: { kind: 'openhuman' },
},
};
}
diff --git a/docs/RELEASE-MANUAL-SMOKE.md b/docs/RELEASE-MANUAL-SMOKE.md
index a8b05880e8..bc34249d4f 100644
--- a/docs/RELEASE-MANUAL-SMOKE.md
+++ b/docs/RELEASE-MANUAL-SMOKE.md
@@ -103,7 +103,6 @@ Applies to every release, all platforms.
- [ ] **GitHub Release notes are AI-generated from the previous release tag** — Before publishing the draft production release, inspect the GitHub Release body. Expected: notes start with a thematic H1 title, include high-level highlight sections with PR links and contributor thanks, list only PRs merged on the mainline (no branch or direct commits), omit a separate pull-request dump, include new-contributor thanks only when applicable, and the full compare URL is previous release tag → current release tag.
- [ ] **Logging out + logging back in preserves nothing private** — Sign out, sign in as a different user. Expected: no leaked memory, threads, or skill state from the previous session (regression watch — see #900).
- [ ] **A Docker core gateway connects, serves the app, and is torn down on switch-back** — Build `openhuman-core:local` (`docker compose build openhuman-core`). In `Settings > Core connection > Run the core somewhere else`, add a location running in a container and choose it. Expected: the status advances through its named steps and settles on Connected; chat, memory, and an agent run work against it; `docker ps` shows one `tinybox-*` container. Switch back to This computer. Expected: the local core answers again and the container is gone. Then relaunch the app while the gateway is selected. Expected: it re-provisions and reconnects rather than silently falling back to the local core — that fallback is the failure this row exists to catch, because everything keeps working against the wrong core.
-- [ ] **`memory_tree` migrates WAL→TRUNCATE on upgrade with memory intact** — Install a previous (WAL-era) build, use it enough to populate memory so a `chunks.db-wal`/`-shm` pair exists under `~/.openhuman/.../workspace/memory_tree/`, then upgrade to this build. Expected on first launch: `PRAGMA journal_mode` on `chunks.db` reports `truncate`, the `-wal`/`-shm` side-files are gone, previously-captured memories still surface in recall, and no `Failed to initialize memory_tree schema` errors appear.
- [ ] **Home connectivity chip reflects the core's hosted link** — Sign in on a desktop build and wait for the chip on Home to read green "Connected". Block the core's traffic to the hosted backend in a way that also kills the *established* socket, not only new connections: a firewall DROP rule for the backend host (e.g. Linux `sudo iptables -I OUTPUT -d <backend-ip> -j DROP`, macOS a pf or Little Snitch/LuLu deny rule for `api.tinyhumans.ai`), or a VPN route change that blackholes the active flow and the handshakes that follow. A hosts-file entry does not touch an established socket; if that is all you have, add it first and then force a reconnect (toggle Wi-Fi off and on). Use DROP rather than REJECT so the reconnect attempts hang the way the field failure did. Expected, in `~/.openhuman/logs/openhuman.<date>.log`: within ~50 s of the block, `[socket] No server ping received … connection age Ns …` and `Connection lost: Ping timeout`; then `Connection failed (attempt N/5): WebSocket connect: IO error: operation timed out after 10s …` lines never more than ~10 s plus the backoff apart. The chip turns amber "Disconnected" within ~30 s of the loss while chat keeps working. Remove the rule: the chip returns to green within ~5 s of the next handshake and the log shows `[socket] Reconnected after …` (#6256).
---
diff --git a/docs/library-benchmarking.md b/docs/library-benchmarking.md
index a778553a3c..9e3c08a068 100644
--- a/docs/library-benchmarking.md
+++ b/docs/library-benchmarking.md
@@ -23,7 +23,7 @@ re-deriving those findings.
The default `library-bench.sh` sweep runs the six scenarios currently linked
into the binary. `memory-ingest` and `cold-phases` remain documented workload
designs, but are excluded because the binary no longer links the in-process
-memory engine they measured. All runnable scenarios run in
+memory engine they measured (superseded by Memory v2, whose engine is remote). All runnable scenarios run in
`target/release/library-profile <scenario>`, replace
network inference with a deterministic provider (`rss-bench` feature), and
print one pretty-printed JSON result object to stdout (diagnostics go to
@@ -164,8 +164,8 @@ scenario and feature set (see the baseline table below).
Treat this as a **north star, not an apples-to-apples benchmark**. ZeroClaw's
scope and feature set differ substantially from the OpenHuman core: OpenHuman
-links a full agent/memory/tool/orchestration stack (SQLite-backed unified
-memory, TinyCortex PII detection, prompt-injection detection, a builtin-agent
+links a full agent/memory/tool/orchestration stack (pluggable Memory v2
+engine host, TinyMemory secret/PII scrubbing, prompt-injection detection, a builtin-agent
registry, tool catalogs, provider routing) that a narrower harness may not
carry at all. A closer gap is a meaningful signal that the initialization
graph is leaner; it is not evidence of feature parity, and a wider gap is not
@@ -259,7 +259,7 @@ Start cheap, escalate only as needed:
1. **`library-bench.sh`** — RSS/duration medians across fresh processes. Answers "did this change move the needle" for most changes.
2. **`library-cpu.sh` (samply)** — symbolized CPU profile when a scenario is slower than expected, or to attribute cold-path CPU to a specific phase (registry init, agent build, memory construction, SQLite init, TinyAgents turn runner were the top contributors in the prior session).
-3. **`library-heap.sh` (dhat)** — live-heap allocation sites and retained bytes when RSS is high but the cause isn't obvious from CPU alone (e.g. the TinyCortex PII `RegexSet` finding came from stack-logged allocation attribution, not CPU sampling).
+3. **`library-heap.sh` (dhat)** — live-heap allocation sites and retained bytes when RSS is high but the cause isn't obvious from CPU alone (e.g. an earlier PII `RegexSet` finding came from stack-logged allocation attribution, not CPU sampling).
4. **Instruments / `vmmap` / `heap` / `malloc_history`** — deepest macOS-native attribution, using the `OPENHUMAN_PROFILE_HOLD_SECS` / `HOLD_BEFORE_SECS` hooks to pause the process at baseline or settled state:
```bash
diff --git a/docs/library-minimal-recipe.md b/docs/library-minimal-recipe.md
index 1b9f7a1736..195a13cb59 100644
--- a/docs/library-minimal-recipe.md
+++ b/docs/library-minimal-recipe.md
@@ -172,8 +172,8 @@ build-fact error:
- **tui:** `openhuman tui` / `chat` returns "tui feature disabled at compile time".
Everything the opencompany use cases need remains: the agent harness + turn
-runner, subagent delegation (`spawn_parallel_agents`), the full memory stack
-(TinyCortex store/tree/queue/ingest + PII/injection detectors), threads, config,
+runner, subagent delegation (`spawn_parallel_agents`), the Memory v2 host
+(engine binding, sources, conversations, context + secret/PII scrubbing), threads, config,
security policy, provider routing/inference, `skills` (SKILL.md discovery/install
+ node/python execution + `run_workflow`/`await_workflow`), and `flows` (saved
graph create/run/schedule + `workflow_builder`/`flow_discovery` agents).
@@ -245,10 +245,6 @@ prioritization.
into its own sub-gate would reclaim most of that 12.7 MiB while keeping the
flows graph engine. Currently all-or-nothing.
-3. **`git2` (vendored libgit2).** Always-on native dependency of the `memory_diff`
- change-ledger (git-backed snapshots/checkpoints/diffs). A large vendored C lib.
- If a library host does not need git-backed memory diffs, this is a candidate for
- a future gate.
4. **`reqwest` dual TLS backends.** The root `reqwest` enables both `rustls-tls`
**and** `native-tls` — two full TLS stacks linked simultaneously. A headless