Skip to content

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

Commits on main

fix(git_operations): stop `-c diff.external=` from breaking every diff\n\n`hardened_git` injected `-c diff.external=` as one of the `NEUTRALISED_CONFIG`\noverrides. An empty value does not disable an external diff driver — git\nexecutes the empty string — so every `diff` this tool ran died with:\n\n error: cannot run : No such file or directory\n fatal: external diff died, stopping at <file>\n\nThat is not hardening; it is an outage that happens to look like one. The\n`diff` operation was broken for every repository, with or without config of\nits own.\n\nTwo things replace it, and together they are strictly stronger than what they\nreplace:\n\n- `diff.external` is not on `ALLOWED_REPO_CONFIG`, so a repository that sets\n it is already refused outright by `first_disallowed_repo_config_key`. That\n is the fail-closed guarantee and it was never carried by the `-c` entry.\n- `--no-ext-diff` on the `diff` command itself covers what the `-c` entry was\n actually reaching for: a key written into the repository in the gap between\n that inspection and the command. Verified directly against a repository\n whose `diff.external` names a script that touches a marker file — without\n the flag the marker appears and the driver's output is used; with it the\n diff is correct and the marker never appears.\n\n`git_log` passes `--pretty=format:` and never produces a patch, so it has no\nexternal diff to refuse; `diff` is the only affected operation.\n\nA test pins that `diff.external` is never re-added to `NEUTRALISED_CONFIG`,\nsince the value that looks correct there is the one that breaks the tool.\n\nCloses #5979\n\n
Shanu committed 3 months ago
db853af
test(git_operations): make the e2e git fixture hermetic instead of reading the developer's config\n\n`run_git` in `tools_network_channels_raw_coverage_e2e.rs` spawned git with the\nmachine's own configuration in scope, and the fixture performs a real `commit`.\nA global `commit.gpgsign = true` — which every maintainer who signs commits has\n— made that commit try to sign and fail:\n\n gpg: skipped "DEADBEEFDEADBEEF": Input/output error\n gpg: signing failed: Input/output error\n fatal: failed to write commit object\n\nCI has no global git config, so this was green there and red only on the laptops\nof the people most likely to run it. Reported by W2, who lost time to it.\n\nClose the system and global config the way the unit suite's `hermetic()` and the\nproduct's own `suppress_ambient_git_config` do. `GIT_CONFIG_GLOBAL` must name a\nreadable-but-empty path rather than be unset, or git falls back to `~/.gitconfig`\n— the thing being closed. The committer identity is unaffected: the fixture\nalready sets `user.email` / `user.name` repository-locally, so nothing is\nstranded by removing the ambient config.\n\nRevert-checked under a fabricated signing developer's `HOME` (global\n`commit.gpgsign = true`, unusable key):\n\n - without the fix: fails at the commit, `gpg: signing failed`\n - with the fix: no gpg complaint at all; the commit succeeds\n\nWith the fix the test then reaches, and fails on, the `diff.external` defect\nfixed earlier in this same PR — which is why the two belong together: neither\nalone makes this test pass on a maintainer's machine.\n
M3gA-Mind committed 3 months ago
ffde0fd
fix(lint): compare the prose skip against a posix path
Nguyen Thanh Dat committed 3 months ago
1425632
fix(lint): compare the prose skip against a posix path\n\n`lint:ui-tokens` fails on a Windows checkout with 15 violations, every one of\nthem English out of a translation catalogue:\n\n src\lib\i18n\en.ts:237: text-to-speech (to-speech is not a token this theme defines)\n src\lib\i18n\en.ts:690: to-dos (dos is not a token this theme defines)\n src\lib\i18n\it.ts:818: to-do (do is not a token this theme defines)\n\n`holdsProseNotClasses` exists precisely to prevent this, and its own doc\ncomment names these exact strings. It never fires on Windows: `path.relative`\nreturns the platform separator, so the value it tests is `src\lib\i18n\en.ts`,\nand `startsWith('src/lib/i18n/')` and `includes('/__tests__/')` both miss.\nThe catalogues are then read as class lists, where "text-to-speech" parses as\n`text-` plus an undefined token.\n\nThe gate is in `.husky/pre-push`, so on Windows it blocks every push with a\nfailure the author cannot have caused and cannot silence — the suggested\nremedy ("choose a defined semantic token") does not apply to prose.\n\nNormalising to `/` before the comparisons is the whole change; the same walk\nalready yields platform paths to every other check, which are separator-blind.\n\nVerified on this host: `node scripts/lint-undefined-scales.mjs` goes from\n15 violations to `no undefined colour scales or tokens (30 shade-bearing\nscales, 68 shadeless colours, 18 shadows)`, and reverting the two-line change\nbrings all 15 back.\n
Nguyen Thanh Dat committed 3 months ago
d3bc914
fix(mcp): announce a supervisor outage only in the workspace it belongs to\n\nBoth Codex findings on d0dd1d142.\n\n**P1 — the live path was still unrouted.** Routing the store by the event's\nworkspace fixed persistence but not the broadcast: `core::socketio`'s bridge\nemits `core_notification` to every connected client with no per-client routing\n(its own comment says so), and the banner prints the server's qualified name\nand its error. An outage from a workspace the user had switched away from\nwould therefore name that account's server inside the one they are in.\n\n`should_announce` gates the broadcast on the live workspace. The signal it\nreads is `config::active_workspace_dir`, added here: it goes through the same\nresolver `Config::load_or_init` uses — `OPENHUMAN_WORKSPACE`, then\n`active_user.toml`, then the workspace marker, then pre-login — so a caller\ncannot disagree with the loader about which workspace is active. It is\ndeliberately uncached, because a switch is a change to an on-disk marker and\nanything pinned at construction goes stale exactly when it matters.\n\nThis also corrects something I asserted on two review threads: I said there was\nno live active-workspace signal. There is — it is a marker read, not a cached\nvalue, which is why it is paid per *decision* rather than per event. Events that\nname no workspace return on the first line and never reach it, so the cost is\nthe handful of events a supervisor tick produces.\n\nIt fails OPEN: an unresolvable workspace still announces. A banner from the\nwrong workspace is a visible annoyance; a swallowed "your MCP tools are down"\nis the failure #5931 exists to end.\n\n**P2 — a slow cycle left no gap.** `MissedTickBehavior::Delay` stops the burst\nof catch-up ticks but schedules the next deadline one interval after the overdue\ntick *returns* — i.e. from when the cycle starts, not when it ends. A cycle\nconsistently slower than its interval would find the next tick already due and\nprobe continuously, which is the opposite of what the comment claimed. An\n`interval.reset()` after the workspace loop paces from the end of the cycle,\nwhich is what `tinymcp::Supervisor::run` does and what this loop stands in for.\n\n
Shanu committed 3 months ago
a3088a1
c616bff
chore(windows): make clippy -D warnings pass on a Windows host\n\n`cargo clippy -p openhuman -- -D warnings` is what .husky/pre-push runs,\nand on Windows it fails with 11 errors before it reaches anything the\ndeveloper changed. Linux CI never sees them: every one is in a code path\nguarded by #[cfg(windows)] or #[cfg(not(unix))], so the lint only fires\nwhere those arms are compiled. The practical effect is that no commit can\nbe pushed from a Windows checkout.\n\nImports that only one platform uses are now gated the way the imports\nbeside them already were:\n\n- core/auth.rs, security/pairing.rs: `std::io::Write` is used solely by\n the #[cfg(unix)] arm of the token writer; the #[cfg(not(unix))] arm\n calls std::fs::write. Gated with #[cfg(unix)], matching the\n OpenOptionsExt import directly below it.\n- composio/trigger_history.rs: `fs2::FileExt` backs the\n #[cfg(not(windows))] lock/unlock path only - Windows serializes through\n the process-local Mutex above it.\n\nTwo imports were redundant rather than platform-specific:\n\n- inference/local/process_util.rs, inference/voice/local_speech.rs:\n `creation_flags` is an inherent method on tokio::process::Command under\n Windows, so importing std's CommandExt adds nothing.\n\nThe rest are ordinary lints in Windows-only code:\n\n- sandbox/cwd_jail/windows.rs: drop the unused HANDLE import, drop `mut`\n from `dacl_present` (only ever read), pass `&ea` to SetEntriesInAclW\n which takes *const, and add the Default impl clippy asks for next to\n AppContainerBackend::new().\n- security/keyring/encrypted_store.rs: the #[cfg(windows)] arm shadows\n `msg` rather than mutating it, so `mut` was unnecessary on both\n platforms and the #[cfg_attr(not(windows), allow(unused_mut))] escape\n hatch can go with it.\n- platform/doctor/core.rs: on Windows the sibling #[cfg] block is stripped,\n so the remaining block is the function tail and the `return` is noise.\n\nNo behaviour changes. cargo fmt clean, and clippy -D warnings now passes\non Windows.\n
Nguyen Thanh Dat committed 3 months ago
ab8cbb3
fix(git_operations): suppress an external diff with --no-ext-diff, not an empty config\n\n`NEUTRALISED_CONFIG` carried `diff.external=`, and an empty value does not\ndisable an external diff — git tries to *execute* the empty string, so every\n`diff` operation died before producing a patch:\n\n error: cannot run : No such file or directory\n fatal: external diff died, stopping at tracked.txt\n\nReproduced against git directly rather than inferred:\n\n $ git -c diff.external= diff -- tracked.txt\n error: cannot run : No such file or directory # the CI failure verbatim\n $ git diff --no-ext-diff -- tracked.txt\n +second\n\n`--no-ext-diff` is the real suppression and is strictly stronger: verified\nagainst a repository with `diff.external=/bin/false`, plain `diff` dies and\n`--no-ext-diff` still prints the patch. So this hardens the operation where the\nold form removed it. `diff.external` is on neither allowlist, so a repository\ncarrying it is refused before the invocation; this is the second layer, for the\ngap between that inspection and the command.\n\nThe regression test goes in the **lib** suite deliberately. This broke every\ndiff on every repository and still reached `main`, because a change to\n`git_operations.rs` maps to the `openhuman::tools` libtest filter while the test\nthat caught it lives in `raw_coverage_all` — a target that filter never selects.\n`main`'s own run over this file (0daba138a) therefore did not execute it. A test\nhere runs whenever this file is touched.\n\nRevert-checked: with `diff.external=` restored and `--no-ext-diff` removed, the\nnew test fails naming its own assertion and reproducing the exact error above;\nrestored, 43 pass.\n\nThe same entry is still present in `tools/impl/system/workspace_state.rs:235`.\nIt is latent there — that module runs only `status` and `log --oneline`, neither\nof which generates a diff — so it is left alone here and recorded rather than\nswept into an unrelated change.\n
M3gA-Mind committed 3 months ago
3a8aa89
e6f3f4f
feat(security): resolve `credential_ref` handles through the keychain\n\n`docs/specs/kernel.md` §3.6 gives every subsystem the same driver-binding\nconfig shape and `docs/specs/plan-memory.md` §4.5 fixes one of its fields:\n\n [subsystems.memory.drivers.supermemory]\n credential_ref = "keychain:supermemory"\n\nThe value is a reference, never an inline secret — but nothing in the tree\nturned one into the secret it names. `MemoryDriverConfig` has carried the field\n(with a redacting Debug) since the subsystem seam landed, and the memory\nbinding tests already use `credential_ref: "keychain:supermemory"` fixtures,\nyet there is no parser and no resolver.\n\nAdd `security::credentials::credential_ref`: parse `<scheme>:<name>`, then\nresolve it through the existing keychain. It lives in `security/` rather than\nbeside its first caller because §3.6 makes the field uniform across subsystems —\nmemory binds first, and inference, channels and sandbox follow onto the same\nshape (kernel.md §5).\n\nResolution is deliberately not a bare `keyring::get`. It mirrors the order\n`web3::wallet::keychain_load_mnemonic` already uses: consent\n(`keyring_consent::policy::check_secret_access`) before availability\n(`keyring::is_available`) before absence. Reporting a pending consent prompt as\nan unavailable backend — or either as a missing entry — would send an operator\nto fix the wrong thing. That ordering is extracted into a pure `preflight()` so\nit is testable without a keychain, a consent store or a booted core, the same\nreason `memory::binding::admit` is pure.\n\nNothing here may reach an operator-facing string. `CredentialRefError` carries\nno name and no secret, and `CredentialRef`'s `Debug` redacts the name, because\n`memory::binding`'s `FallbackReason` is rendered into `subsystems_status` and is\npinned by `fallback_reason_never_contains_credential_ref_or_endpoint`. The sharp\nedge is `KeyringError`, whose own `Display` interpolates the key — propagating\none verbatim would leak the very name this module exists to keep out of that\nstring, so backend failures map to a name-free variant and the detail is logged.\n\nThe resolved secret is returned in `Zeroizing<String>` so it is wiped on drop.\n\nNo behaviour change: nothing calls this yet, and the external-driver refusal in\n`memory/binding.rs` is untouched. 13 unit tests, all pure.\n\nClaude-Session: https://claude.ai/code/session_01ACB4Ugi5pJMQqoCbZnVo6f\n
Maciej Myszkiewicz committed 3 months ago
ab733cf
test(e2e): address review — panic-safe stall guard, tighter bounds, fresh-bearer proof\n\nFive review findings, all legitimate:\n\n- The scripted stall was not panic-safe. The env lock is deliberately recovered\n from poisoning, so a panic between arming and the bare disarm left the global\n at 25s and added 25s to every completion in every later test sharing the\n handler. `arm_scripted_stall` now returns a `ScriptedStallGuard` that clears\n the atomic on drop, `#[must_use]` so binding to `_` is caught.\n- `elapsed < 15s` would have admitted a fixed 10s ceiling that ignored\n OPENHUMAN_MODEL_CALL_TIMEOUT_SECS. Tightened to 8s — ~4x the configured 2s,\n above the measured 2.43s and far below the reverted 25.50s.\n- The missing-folder test checked only the phrase `resolved to`; a reader still\n joining on the CWD would have reported some path and passed. Now asserts the\n concrete workspace.join("no-such-folder").\n- The embeddings key field is `type={setupShowKey ? 'text' : 'password'}` and\n starts as a password input, which has no implicit textbox role, so\n getByRole('textbox') matched nothing. Located by placeholder instead.\n- The 401 spec counted requests, so a retry re-sending the stale token passed —\n the exact regression #5876 guards against. The route now rotates the stored\n bearer before rejecting, modelling a core restart, and the test asserts the\n retry carries the new token and that the panel rendered.\n\nNot changed: the no-query case already asserts expectSelectedTab(page, 'welcome')\non the line after the absence check, which is what was asked for.\n\nRe-revert-checked after these changes: 5767 pass 2.43s / FAIL 25.50s reverted;\n5838 both pass 0.42s / both FAIL reverted. cargo fmt clean.\n
M3gA-Mind committed 3 months ago
953f5c7
style: rustfmt the scripted-stall setup line
M3gA-Mind committed 3 months ago
74f43f2
test(e2e): backfill coverage for the model-call ceiling, relative folder sources, and the /skills deep link\n\nSix merged PRs were audited as MISSING or PARTIAL on e2e coverage. This closes\nwhat could be closed honestly and records the rest.\n\nRevert-checked (each fails with the fix reverted, naming its own assertion):\n\n- #5767 per-model-call ceiling — `tests/agent_harness_e2e.rs`. A new global\n stall knob on the scripted upstream holds every reply, so a model call is\n still in flight when the ceiling elapses. With a 2s per-call ceiling under a\n 600s turn deadline the turn is stopped in 2.57s; with\n `policy.limits.max_model_call_ms` unwired the 25s stall completes and the turn\n SUCCEEDS at 25.77s. Elapsed time is the assertion because it is the only\n externally visible signal that separates the two ceilings — see below.\n\n- #5838 relative folder sources — `tests/memory_sources_e2e.rs`, two tests. A\n folder source configured with a RELATIVE path must resolve against the\n workspace, not the process CWD (openhuman#5830), and a missing one must say\n where the reader looked. The pre-existing folder test passes an ABSOLUTE path,\n the branch the fix deliberately left alone, so it could never catch this.\n Reverted, both fail with `folder does not exist: relative-notes`.\n\n- #5924 /skills?tab= forwarding — `connections-tab-deeplinks.spec.ts`. This spec\n already covered the path but asserted the BUG: it was written to pin the\n pre-fix defect and flipped nowhere when #5924 landed, so on main it asserts\n the opposite of shipped behaviour and would red the next release promotion.\n Flipped to assert forwarding, renamed off `BUG:`, header corrected, and two\n cases added (`?tab=mcp`; no query still lands on the overview).\n\nWritten but NOT revert-checked — do not record as coverage:\n\n- #5943 embeddings custom-endpoint Test button, #5876 core-RPC 401 recovery.\n Both are new Playwright specs. The lane needs a core-bin build plus a browser\n and the machine is at its memory limit, so they could not be verified. They\n are isolated new files; drop them if you would rather not carry unverified\n tests. No lane runs Playwright on PRs to main, so they cannot affect CI here.\n\nNot covered, with reasons in the findings file:\n\n- #5851 provider construction. `start_channels` is the only host path to\n `tinychannels::build_channels`, and with a populated config it enters live\n provider listen loops and never returns; `openhuman.channels_list` builds\n `ChannelManager::new(ChannelsConfig::default(), ())` so it cannot witness the\n change. Covering it needs a build-without-starting seam that does not exist.\n\nTwo bugs found while writing these, recorded and NOT pinned by any test:\n\n- The per-call/turn distinction #5767 built is discarded at the event boundary.\n A wedged model call emits `turn_timeout` with "This turn ran past its time\n budget ... a tool call or a delegated sub-agent stalled" when the turn had 598\n of 600 seconds left and no tool ran. The harness preserves the distinction\n (`per-model-call ceiling` vs `remaining wall-clock budget`) precisely so\n triage can use it; the host collapses both.\n- The #5924 spec described above.\n\nNo product code changed. Full detail in bugs/W5-test-findings.md.\n
M3gA-Mind committed 3 months ago
c0aa28e
test(e2e): correct two assertions and drop one the revert-check proved vacuous\n\nRevert-checking found three things, and in two of them the code was right and my\ntest was wrong.\n\n- **#5772 `TimedOut` is not reachable here.** A probe with a `Duration::ZERO`\n window still returned `Alive { elapsed: 42.708µs }`: `tokio::time::timeout`\n polls the inner future before it checks the deadline, and `list_tools` on an\n established stdio connection answers inside that first poll. Producing a real\n timeout needs a stub that stalls on a named method, which `test-mcp-stub`\n cannot be asked for. The assertion is dropped rather than contrived; the test\n keeps the `Missing` half, which is reachable and which the old `bool` API\n could equally not express.\n\n- **#5810 `observed_samples` is 3, not 2.** The allowed dispatch in the same\n test completes, and `run_subagent` folds a real child's wall-clock into the\n estimator on its success path. That the runner measures its own children is\n the mechanism gate 2 rests on, so counting it is the assertion.\n\n- **#5852's pruning test is removed as vacuous.** Deleting `self.remove(task_id)?`\n from `DetachedTaskRegistry::wait` did not make it fail — the run rebuilt\n (1m27s) and still passed, so the entry is pruned by some path other than the\n one `ops.rs:20-23` documents. It asserted something true without being able to\n distinguish the documented mechanism from whatever actually does the work,\n which is not a test that would catch the regression it was written for.\n\nRemaining five, each revert-checked: both #5810 dispatch refusals (gate removed\n-> both fail), #5772 `Missing` (Missing -> Broken -> fails naming the assertion),\n#5772's 8s window (8s -> 30s -> fails naming the message), and #5839's\n`memory_diff` removal.\n
M3gA-Mind committed 3 months ago
34d26e5