Skip to content

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

Commits on main

chore(vendor): drop the top-level tinycortex submodule\n\nThe memory engine has not been in the product build since #5560: the\nshipped app reaches memory through the prebuilt tinymemory TinyBus\nmodule over tinymemory-api, and `cargo tree -i tinycortex` under the\nproduct feature set prints nothing. What kept `vendor/tinycortex` alive\nwas the [dev-dependencies] engine — tinymemory-core and\ntinymemory-tinycortex name `tinycortex` / `tinycortex-api` by version\nrequirement, the crates are unpublished, and the root\n`[patch.crates-io]` pointed them at a second checkout that had to be\nbumped by hand in lockstep with `vendor/tinymemory` (#6049 moved both).\n\ntinymemory already vendors the exact engine commit its module is built\nfrom, so point the patch at `vendor/tinymemory/vendor/tinycortex` and\nremove the top-level submodule. On main both pointers are the same\ncommit already (79131f2, tinycortex 0.1.2), so the root Cargo.lock is\nbyte-identical. The app world never used its tinycortex patches\n(`[[patch.unused]]` in app/src-tauri/Cargo.lock), so they go, together\nwith those two lock entries.\n\nThe `tinycortex-tests` lanes ran the engine's own suite against the\ntop-level checkout; tinycortex's repo CI covers that, and the host\ntests that link the engine still run here (rust-core-full triggers on\n.gitmodules / vendor/**). A tinymemory re-pin now moves the test engine\nwith it instead of needing a second pointer bump.\n\nAGENTS.md's rule that the tinycortex patches live in both manifests\ndated from when tinymemory-core was a normal dependency of the core\ncrate; it now states the root-world-only invariant and why the shell\nworld never resolves the engine crates.\n
Shanu committed 2 months ago
58e0440
db6964e
test(e2e): cover 42 untested RPC controllers across voice, inference, sandbox, worktree, http_host, workspace, modules\n\nCloses part of the domain-e2e coverage gap: 42 controllers across 8 namespaces\nhad no `tests/**/*_e2e.rs` target. Five of those namespaces were at 0%.\n\nThree new suites under `tests/raw_coverage/`, so they are modules of the\naggregated `raw_coverage_all` target rather than three new link steps:\n\n- `voice_audio_e2e.rs` — voice 3/17 -> 17/17, audio_toolkit 0/3 -> 3/3\n- `inference_provider_auth_e2e.rs` — inference 30/37 -> 37/37\n- `sandbox_runtime_platform_e2e.rs` — sandbox, worktree, http_host, workspace,\n modules, all 0% -> 100%\n\n`node scripts/check-domain-e2e-coverage.mjs`: 379 -> 421 controllers invoked.\n\nEvery case dispatches over the real `build_core_http_router` HTTP surface and\nasserts on response content, and every namespace has at least one failure path.\nNothing here is a coverage-gate string match: the gate counts a method named in\na comment, so each method is exercised and its reply asserted.\n\nHermetic by construction, no network and no host state:\n- a mock backend on loopback serves `/auth/me`, `/openai/v1/audio/speech`,\n `/openai/v1/audio/transcriptions` and `/voice-agent/get-signed-url`, with a\n session minted through the real `auth_store_session` RPC\n- stub `claude`, `piper` and `docker` binaries drive the CLI-probe, local-TTS\n and container-cleanup paths, so `claude_code_status` reaches all four of\n ok / outdated / unusable / not_installed regardless of the host\n- `OPENHUMAN_EMAIL_CAPTURE_DIR` captures the composed MIME message instead of\n opening an SMTP connection\n- a real temp git repo with a `.claude/worktrees` checkout backs the worktree\n lifecycle, including the dirty-refusal and forced-remove branches\n\nSuites take the crate-wide `SHARED_ENV_LOCK`, not a file-local mutex: all\naggregated suites share one process, so a private lock isolates nothing.\n\nThey also read the RPC bearer back with `core::auth::get_rpc_token()` instead\nof assuming their own constant won. `RPC_TOKEN` is a process-global `OnceLock`\nand `init_rpc_token` is idempotent, so inside the aggregated binary the first\nsuite to initialise pins the bearer for every later one.\n\nRevert-proof: nine faults were injected together (one per test, so none could\nmask another), each named its own assertion in the failure, and `src/` was\nrestored — `git status --porcelain src/` is empty. Details in the PR body.\n\nNo production code is changed. Findings from reading these controllers are\nwritten up separately for triage rather than fixed here; one test is\n`#[ignore]`d with a pointer to the finding it documents.\n
M3gA-Mind committed 2 months ago
a0b1ab0
test(e2e): cover 41 uncovered RPC controllers across 13 namespaces\n\nAdds three suites under tests/raw_coverage/ (modules of the aggregated\nraw_coverage_all target, so no new binary and no Cargo.toml change):\n\n billing_cost_e2e billing (10), cost (4), dashboard (1)\n team_referral_e2e team (9), referral (2), update (3), migrate (1)\n secrets_devices_e2e encrypt, decrypt, security, keyring_consent (3),\n devices (3), wallet (2)\n\nAll thirteen namespaces go to 100%; repo-wide invoked controllers move\n379 -> 420. Every case drives the real router from build_core_http_router\nover HTTP. The hosted domains assert on the request the adapter built\n(method, path, query string, body) as well as the response; the local\ndomains assert against real state -- a seeded costs.jsonl, the\npaired_devices SQLite table, the persisted app-state.json.\n\nTwo harness details worth knowing:\n\n * The RPC bearer is read, not asserted. core::auth::RPC_TOKEN is a\n process-global OnceLock and init_rpc_token is first-writer-wins, so a\n suite that hard-codes its own token 401s whenever another suite\n initialised first. w4_shared::rpc_token() asks for the live value.\n * env_lock binds to crate::SHARED_ENV_LOCK, not a private static, so\n HOME / OPENHUMAN_WORKSPACE mutations serialize against every other\n aggregated suite.\n\nVerified with 12 fault injections into src/ (13 sites), each confirmed to\nfail the named assertion and then reverted; src/ is unchanged by this\ncommit. One case is #[ignore]d, documenting that a hand-written\nallowed_commands is widened by the 3->4 autonomy migration.\n\nNo production code is changed.\n
M3gA-Mind committed 2 months ago
522ab5d
test(e2e): cover 32 untouched RPC controllers across skills, MCP, medulla and todos\n\nNine namespaces went from 0% or partial to 100% on\n`scripts/check-domain-e2e-coverage.mjs`: skill_runtime (0/6), mcp_setup (0/6),\nmcp_audit (0/1), medulla (0/9), javascript (0/2), plus the uncovered halves of\nskills (4/10), mcp_clients (12/16), skill_registry (6/7) and todos (6/13).\n\nFour suites under `tests/raw_coverage/`, so they compile as modules of the\nexisting `raw_coverage_all` target rather than four new binaries each relinking\nthe ~936 MB openhuman rlib. 20 cases, 43 methods dispatched over the real axum\nJSON-RPC router.\n\nHermetic by construction — a planted skill and planted run logs on disk, a\nloopback MCP registry behind `MCP_OFFICIAL_REGISTRY_BASE`, a loopback Medulla\nbackend behind `OPENHUMAN_MEDULLA_BASE_URL`, and a session token planted through\n`AuthService` (production's own read path). Nothing leaves the machine.\n\nEvery case asserts on response content and covers at least one failure path.\nVerified by fault injection: four faults, one per suite, each tripping its own\nnamed assertion and nothing else.\n\n medulla list_messages drops the `after` cursor\n -> "only seq 3 is newer than 2"\n official registry stops filtering un-installable rows\n -> "the row declaring neither a remote nor a package must be dropped"\n run_log scanner stops parsing the footer duration\n -> "the footer's `duration: <n> ms` must be parsed to a number"\n todos_clear returns the board instead of emptying it\n -> "clear must return an empty board"\n\nClean 20/20, faulted 16/20 with exactly those four red, restored 20/20.\n\nThe `test` namespace is deliberately left at 0%. `test_support` registers behind\n`#[cfg(feature = "e2e-test-support")]` (src/core/all.rs:875), a gate in neither\n`[features] default` nor `scripts/ci/product-features.txt`, so under the product\nfeature string the reset answers `unknown method` and no `tests/**/*_e2e.rs`\ntarget can reach it. An honest 0% beats a hollow test.\n\nSix contract defects found on the way are written up for triage rather than\nfixed here; this PR changes no production code.\n\nClaude-Session: https://claude.ai/code/session_01Rx5Fzc5keoeUQB3MwMFqMM\n
M3gA-Mind committed 2 months ago
283a548
9a68261
chore(modules): re-pin the memory module to tinymemory v1.15.2\n\nv1.15.2 carries tinyhumansai/tinymemory#144, which makes\n`MemoryMaintenance::backfill_connector_trees` ask the ingest gate before it\ncharges its limit. Against 1.15.1 the walk re-examines the same `limit`\nalready-filed documents on every call and never reaches the rest, which is\nwhy the Sources page's "Repair older memories" button reports "Filed 0 (500\nalready there). More remain." forever (#6051). Nothing in the host changes:\nthe button, the RPC and the wire types are the same, and the numbers they\nshow become honest once the module behind them moves.\n\nA patch bump: no contract member was added. The release also carries\ntinyhumansai/tinymemory#143 (the remote API), which touches nothing the host\npins.\n\nFour pins move together, as they must:\n\n- `vendor/tinymemory` -> the v1.15.2 commit (258d9e5 -> 9143fe1)\n- the registry descriptor: version, release_url, and all 11 platform assets\n with the checksums the release published\n- `ARTIFACT_CAPABILITIES_PIN`\n- `memory_version` / `memory_sha256` in ci-full.yml, ci-lite.yml and\n e2e-reusable.yml (4 sites), which pin the ubuntu-22.04-x86_64 archive\n independently of the registry\n\nVerified rather than assumed: v1.15.2 has #144's merge (f1c234b) as an\nancestor; all 11 checksums were taken from the release's own checksum.toml\nwith each archive name and its digest rewritten as one unit; `git diff\nv1.15.1..v1.15.2 -- crates/tinymemory-api/src/capabilities.rs` is empty, so\nthe advertised family list is unchanged; both Cargo.lock files resolve\n`--locked` against the new checkout; and the two pin tests\n(`the_capability_list_matches_the_pinned_release`,\n`the_ci_workflows_pin_the_same_module_digest_as_the_registry`) pass.\n\nRefs #6051\n
Shanu committed 2 months ago
ba198c1
test(e2e): cover 37 untested RPC controllers across 10 namespaces\n\nCloses the E2E gap for `flows` (drafts, duplicate/enable, revision history\nand rollback, run-history read/prune, the save-time approval manifest,\nconnector requirements, the canvas tool browser, the copilot Stop button),\n`cron` (run/runs/remove), `workflow_run` (stop/resume), `task_sources`\n(sync, list_databases), `agent_work` (control), `agent_team` (list/close),\n`subagent` (cancel/steer), `harness_init` (run), `agent_experience` (all\nfour) and `hooks` (all three).\n\nEvery case dispatches over the real Axum JSON-RPC router against an\nisolated HOME and asserts on the *content* of the response, not on Ok-ness,\nand each covers at least one failure path. Nothing reaches the network:\n`api_url` is a closed port, `OPENHUMAN_ACTION_DIR` is pinned inside the\ntempdir (it otherwise defaults to the developer's real `~/OpenHuman/\nprojects`), and every provisioning switch harness-init would act on is\nasserted OFF in the parsed config before a step runs — `Config` does not\n`deny_unknown_fields`, so a mistyped table would silently let it download\nNode.js and CPython.\n\nThe three files are modules under `tests/raw_coverage/`, aggregated into\nthe single `raw_coverage_all` target by `build.rs`, so they add no new\nlink step and need no `Cargo.toml` edit. They bind the crate-wide\n`SHARED_ENV_LOCK` rather than a private one, and read the process bearer\nback from `get_rpc_token()` instead of assuming their own literal won the\n`RPC_TOKEN` `OnceLock` — several existing aggregated suites hard-code\nconflicting bearers, and only the first to run wins.\n\nCoverage gate: the ten namespaces go from 46/83 to 83/83; the repo total\nmoves 379 -> 416 of 627 controllers named by an e2e target.\n\nRevert-proofed: eleven independent faults were injected into production\ncode, one per namespace, and produced exactly eleven failures — each one\nnaming the assertion for its own fault. `src/` is unchanged by this commit.\n\nFour defects found while writing these and reported separately (not fixed\nhere; a test PR that also changes behaviour cannot be reviewed as either).\nThe tests pin the current behaviour with a pointer to each report:\n - flows_approval_manifest reports un-granted permissions as\n `already_trusted` when the approval gate is not installed\n - flows_get_tool_contract's `<TOOLKIT>_<ACTION>` guard is unreachable for\n any non-empty slug\n - the whole task_sources fetch pipeline is a hard-coded Err\n - cron_run's schema declares an outcome it never returns; cron_runs\n cannot distinguish an unknown job from one with no runs; and a shell\n job whose action_dir is absent fails with an unattributable ENOENT\n
M3gA-Mind committed 2 months ago
82a71c6
test(e2e): cover 39 uncovered controllers across webhooks, socket, channel and the notification platform\n\nThree new suites under tests/raw_coverage/ (modules of the aggregated\nraw_coverage_all target, so no new test binary and no Cargo.toml change):\n\n webhooks_ingress_e2e.rs webhooks 0/13 -> 13/13\n channel_socket_e2e.rs socket 0/5 -> 5/5, channel 1/4 -> 4/4\n notification_platform_e2e.rs notification 3/10 -> 10/10, plus health,\n doctor, service daemon-host,\n provider_surfaces, slack_memory,\n announcements — all 0% -> 100%\n\ncheck-domain-e2e-coverage.mjs: 379 -> 418 controllers invoked; modules below\nthe 90% threshold 60 -> 50.\n\nEvery case drives the real JSON-RPC surface against in-process axum mocks,\nasserts on response content, and covers at least one failure path. The backend\ntunnel CRUD mock records inbound requests so the tests assert on the request the\nadapter built, not only on what it returned.\n\nThe aggregated binary shares one process across ~79 suites, so these files bind\ntheir env lock to crate::SHARED_ENV_LOCK, read the RPC bearer back from\nget_rpc_token() rather than asserting a hard-coded literal against the\nprocess-global OnceLock, and attach to whichever global SocketManager actually\ntook.\n\nRevert-proof: 20 faults injected across src/ in two rounds; all 19 tests failed\nnaming their own assertion. src/ restored, no production code changed.\n\nSix findings recorded separately (socket status casing split, health_system_info\npid type, doctor_models use_cache dead, webhooks unregister silent no-op,\nlist_logs limit=0, socket_emit ok-while-unconnected). None are fixed here.\n
M3gA-Mind committed 2 months ago
ff31d0b
test(e2e): cover 42 untested RPC controllers across 9 namespaces\n\nCloses the W3 slice of the e2e coverage wave: `learning` (0/11),\n`memory_goals` (0/5), `people` (0/4), `tree_summarizer` (1/5),\n`session_db` (0/6), `session_import` (0/1), `tokenjuice` (6/8),\n`ai` (0/4) and `test_support` (0/5) all reach 100% on\n`scripts/check-domain-e2e-coverage.mjs`, taking the repo-wide count\nfrom 379 to 422 invoked controllers.\n\nThree new suites under `tests/raw_coverage/`, so they are modules of\nthe existing aggregated `raw_coverage_all` target rather than three\nnew binaries — no `Cargo.toml` edit, and the large `openhuman` rlib\nis linked once instead of three more times.\n\nEvery case boots the real axum JSON-RPC router and asserts on response\n*content*, with at least one failure path per namespace. Two hazards\nof the shared-process aggregate are handled explicitly: the env lock\nis the crate-wide `SHARED_ENV_LOCK` (a private lock isolates nothing\nwhen 77 suites share one process), and the RPC bearer is read back\nfrom `core::auth::get_rpc_token()` rather than assumed, because that\ntoken is a process-global `OnceLock` a sibling suite may seed first.\n\nFault-injected to prove the assertions bite. Six faults in one pass,\neach targeting a different case; exactly the six predicted tests\nfailed and nothing else, then `src/` was restored:\n\n - learning: let Dropped facets stay in the visible list\n - tree_summarizer: remove the cloud-summarization consent gate\n - people: always report `created: true` on resolve\n - artifacts: filter by thread after pagination\n - session_import: write the global marker on a dry run\n - tokenjuice: report a compactedBytes that does not describe `text`\n\nSix findings written up under `~/tinyhuman/bugs/`, none fixed here —\na test PR that also changes behaviour cannot be reviewed as either.\nThe two that matter most: nothing in `src/` ever calls\n`tinyagents_session::record_session_start`/`record_message`/\n`record_tool_call`, so the whole `session_db` namespace reads a table\nthe product never writes; and `test_support` is gated on\n`e2e-test-support`, which is in neither feature set, so those five\ncontrollers cannot be reached by any lane — the suite asserts the\nnegative contract (absent from `/schema`, unroutable) under the\nproduct features and carries the positive path behind the cfg.\n\nNo `src/` or `Cargo.toml` changes.\n
M3gA-Mind committed 2 months ago
9f5b636
fix(agent): conclude a capped turn inside the loop, not after it\n\nA turn that spends its whole iteration budget gathering data answered with a\nstatus line about having gathered it. Two causes, one structural and one in\nthe wording.\n\n**Structural: the answer was produced outside the loop.** On reaching the\nmodel-call cap the loop exited and `summarize_turn_wrapup` dispatched a second\nrequest straight at the ChatModel. Being outside the harness it ran with none\nof the loop's context management — no microcompact, no compression, no trim —\nwhile being built from the largest transcript the turn would ever hold. It was\ntherefore the likeliest call of the turn to overflow, and each of its failure\npaths returns ("", None) silently, so the answer collapsed to a digest of tool\nnames on exactly the turns that had gathered the most. It also bypassed usage\naccounting (folded back by hand at the call site) and the progress bridge\n(re-implemented there as buffer-then-validate-then-forward), and it spent a\ncall past the cap the operator configured.\n\nFinalCallWrapUpMiddleware moves that work into the loop. The loop records a\nmodel call before building the request, so `remaining_model_calls() == 0` in\n`before_model` identifies the last permitted call with no new counter: the\nmiddleware withdraws the tool schemas, resets tool_choice, and appends the\nwrap-up instruction. The conclusion is then an ordinary iteration — it inherits\nthe whole middleware stack, its usage rides UsageCarryMiddleware, its text\nstreams through the normal bridge, and the turn costs one call less. The tools\nare withdrawn rather than discouraged because an instruction is a request the\nmodel may ignore; with no schemas there is nothing to call.\n\nThe trade is explicit: a 25-call budget is now 24 tool rounds plus a\nconclusion, rather than 25 rounds plus an unbudgeted 26th call.\n\n**Top-level turns only**, the same cut CapPauser's dispatch guard takes. A\nsub-agent reaching its own cap is a routine outcome — it summarises, hands the\nresult back to its parent as a tool result, and the parent carries on — and\nsubagent_runner already owns that checkpoint. The harm being fixed is a person\nleft with a status line where an answer should be, which is a property of the\nturn that answers a human. It also leaves a child's budget arithmetic alone:\nthe conclusion costs a model call, and turning every delegated run's N tool\nrounds into N-1 as a side effect is not a trade to make implicitly.\n\nStrictly additive beyond that. `wrap_up_injected` rides the outcome beside\n`hit_cap`, and only a turn that actually concluded in-loop skips the old path;\na sub-agent run, a one-call budget, or a concluding call that came back empty\nall keep the out-of-band wrap-up exactly as it is. `hit_cap` gains the flag as\na first arm because such a turn now ends the way a finished one does (text, no\ntool request), so `final_response.is_none()` can no longer see it — the signal\ncallers read for the pause bubble, the "Continue building" card and\nworkflow-node settlement is preserved.\n\n**Wording: the instruction asked for the process.** It wanted "Done so far —\nwhat you have accomplished" plus "Next steps", and closed with "Be concise" —\nevery clause steering at the steps taken, on the one call whose job is to say\nsomething substantive. It now asks for the substance first (what was found,\nchanged, or established — named as three shapes so an editing turn is not asked\nfor "the data it retrieved") and demotes the rest to a closing "Still to do"\nline. FINAL_ANSWER_INSTRUCTION already worded its path this way; this was the\npath that did not, and the one where the model never got its own turn to answer\n— the model-call cap is checked before the request is built, so the final\nround's tool results had reached no reader at all.\n\nAlso gives the deterministic fallback the findings it lacked: it listed\n`tool_name — ok` because it read ToolCallRecord, whose output_summary is\nsanitized by contract to hold no raw output. Right for the learning pipeline it\nfeeds, useless as a substitute for an answer. A checkpoint-local type reads\nToolCallOutcome::content directly, leaving sanitize_tool_output untouched.\n
sanil-23 committed 2 months ago
1770a68