Skip to content

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

Commits on main

test(e2e): pin the module-dispatch and maintenance-contract hops for memory sources\n\nTwo e2e gaps found in the coverage audit of recently merged PRs. Both paths\ncould break completely today without a single lane going red.\n\n#5808 / #5801 — `MemorySourceSync::run_source_sync` is a DEFAULTED contract\nmember. `ModuleMemoryProvider` inherited its `Unsupported` body instead of\nbridging, so "Sync now" answered `unsupported capability: source_sync` on a\nbuild whose module could sync fine. A defaulted member that was never bridged\nis indistinguishable from a bridged one at compile time, which is why it\nshipped — so this asserts the RUNTIME answer.\n\nThe discriminator: `binding::build` binds `module_provider` whenever the\n`modules` feature is on, so this RPC really does reach the bridged member. An\nunbridged member refuses the capability BEFORE any transport is attempted; a\nbridged one gets as far as the module.\n\n#5725 — `reset_tree` and `flush_now` were routed through\n`Maintenance::reset_derived_index` / `flush_pending`. Nothing exercised either\nafterwards: in the raw-coverage lane both names appear only as string literals\nfed to `memory::schema::schemas(...)`, and in `worker_c_modules_e2e.rs` they\nsit in a 68-method loop whose helper passes on an error response.\n\nThis commit also carries the two review findings raised on the PR, which were\nboth correct and were fixed in a follow-up now folded in by the rebase:\n\n - `sources_sync_...` excluded only "unsupported capability" and\n "source_sync". The other pre-dispatch refusal — `sync_rpc` bailing with\n "the bound memory driver '<id>' does not serve source sync"\n (`memory/sources/rpc_part_01.rs:560-564`) — spells it with a SPACE, so it\n matched neither string and the test passed green while `run_source_sync`\n was never reached. Now rejected. Proven: forcing\n `ModuleMemoryProvider::as_source_sync()` to `None` fails the new assertion\n with the real message; before the change that same revert passed.\n - `tree_reset_and_flush_...` excluded one string, so a renamed or removed RPC\n answered `unknown method: <name>`, contained no "does not serve\n Maintenance", and passed without dispatching. Now rejected, plus a check\n that the response is a result or an error rather than neither.\n\nNeither test asserts success. That would need a live module artifact fetched\nover the network, which this lane must not depend on; the bugs these pin were\nnever "wrong data" but "the call is refused before it is attempted".\n\nRebased onto 3f4b12921. The conflict with the merged relative-folder-path\ntests (#5959) was textual, not semantic: both sides append independent tests to\nthe tail of this file and share the same setup boilerplate, which is what git\ninterleaved. Resolved by taking main's file whole and appending these two\ntests, so both sets survive intact.\n
M3gA-Mind committed 3 months ago
7e78ae3
1eec16f
test(tools): assert the recovered registry handle is the same handle\n\nCodeRabbit on #5965: `is_some()` proves only that the erased extension held a\n`PackRegistryHandle`, not that it held *the* one. A producer handing back a\nfresh `default()` — or a second instance — satisfies the assertion while\n`toolpacks::ops` reads an unbound registry and skips the pack, which is the\nsame silent outcome as a failed downcast.\n\n`PackRegistryHandle` is `Clone + Default` over a private `Arc<OnceLock<_>>`\nwith no `PartialEq`, so identity cannot be compared directly. It can be\nobserved: two handles share one `OnceLock` only if they are the same handle.\nBind a registry through the recovered handle and read the effect off the tool,\nwhich consults its own.\n\n`render_pack` names the two states differently, which is what makes this\ndiscriminate rather than smoke-test:\n\n unbound -> "The skill registry is not available in this session"\n bound, registry empty -> "Skill `...` has no tools available"\n\nso both are asserted: the first must be absent, the second present. The empty\nregistry is deliberate — the second message proves the binding was observed\nwithout standing up a real packed tool. The skill id comes from\n`PACKS.first()` so a pack rename cannot turn this into an `Unknown skill`\nno-op.\n\nProved non-vacuous: with `recovered.bind(..)` replaced by\n`PackRegistryHandle::default().bind(..)` the test fails on its own assertion,\nrendering the "registry is not available" sentinel.\n\ncargo test --features "voice,inference" --test raw_coverage_all\n -- a_pack_tools_registry_handle -> 1 passed; 0 failed\n
M3gA-Mind committed 3 months ago
e2c39dd
test(e2e): backfill coverage for the flush latch, scope rendering, erased tool extensions and theme import\n\nFour recently merged PRs changed behaviour that no e2e test drives. Each\ntest below was mutation-checked: with the fix reverted it fails naming its\nown assertion.\n\n- #5779 `flush_source_tree`'s re-entrancy latch. A failing flush used to\n latch its scope out for the life of the process, so the natural retry\n answered "already running" forever. Reverted, the retry comes back\n `Ok(seals_fired: 0)` with that log line and the test fails.\n\n- #5854 `as_bus_scope`, the host->bus join the retrieval handlers were\n rewired onto. `None` means unrestricted and must stay `None`; an empty\n `SourceScope` denies every source-attributed item, so collapsing the two\n inverts the policy and silently blanks recall. Nothing asserted it —\n every occurrence in the tree was a call site or a comment.\n\n- #5841 the erased `dyn Any` host extensions. Both the e2e and unit lanes\n only asserted `is_none()`, which is also the silent-downcast failure\n mode, so the failure and the only tested state were the same value.\n Adds the `Some` side, plus the MCP error-flag orientation the PR itself\n flagged as easy to get backwards.\n\n- #5946 theme import validation, in the Playwright lane. `typeof null` and\n `typeof []` are both `'object'`, so malformed pastes were stored; a\n non-string token value then threw in `channelsToCss`, crashing the panel\n on an already-stored theme.\n\nThe empty-`colors` case is asserted as ACCEPTED on purpose: CLASSIC_LIGHT\nand CLASSIC_DARK both carry `colors: {}`, so rejecting it would break the\npanel's own export -> import round trip.\n
M3gA-Mind committed 3 months ago
697bd7d
fix(test): assert the shipped /skills redirect, and make the TinyBus peel reachable\n\nTwo unrelated-looking items with one shape: assertions and error handling that\ncould not do the job they were written for.\n\n`786d7ba76` replaced `<Navigate to="/connections" replace />` with\n`<ForwardSearch to="/connections" />`, which copies `search` and `hash` onto the\ntarget so a `?tab=` deep link survives the redirect. Two specs still asserted the\nold behaviour -- that the query is DROPPED -- one of them committed 94 minutes\nafter the fix landed:\n\n- route-redirect-history.spec.ts:114 not.toContain('tab=messaging')\n- connections-tab-deeplinks.spec.ts:176 not.toContain('tab=channels')\n + expectSelectedTab('welcome')\n\nIn that form they passed only while the bug was present, so the fix -- not a\nregression -- is what would have turned them red. Both now assert the shipped\nbehaviour. The deeplinks case also asserts the SELECTED tab (`channels` is a\ncanonical value in Skills.tsx), because a forwarded query that failed to resolve\nwould still leave the right hash while showing the wrong panel. Three stale\ncomments that still described the redirect as broken are corrected with them.\n\n`module_client::normalize_error` peeled one `ai.tinyhumans.tinybus.Error.<Kind>:`\nlayer, then had a second `strip_prefix` guarding `Error.Failed: ` specifically.\nThe peel above it already consumed that prefix, so the fallback was reachable\nonly by a *doubly* wire-wrapped error -- not the shape its own comment described.\nConfirmed by removing it: `classified_errors_stay_at_byte_zero_after_tinybus_\nfailure_wrapping`, which asserts exactly that documented shape, still passes.\n\nDeleting it outright would have regressed the two-layer case it did catch, so\nthe peel now loops instead. Output is unchanged for every shape the old form\nhandled; a three-layer wrap, which the old form passed through unnormalised --\nreaching the frontend as an unclassified outage rather than the classified\nreason -- now normalises too. That depth is pinned by a new test.\n\nPlaywright, with /skills reverted to a bare <Navigate> and dist-web rebuilt:\nboth specs FAIL naming their own assertions (toContain('tab=channels') and\ntoContain('tab=messaging'), each receiving "#/connections"); restored, both pass.\n\nRust, with the loop reverted to single-peel-plus-fallback: the new depth test\nFAILS naming its assertion, the other seven pass; restored, all eight pass.\nThe first version of that test used two wire layers and passed against the\nreverted code -- vacuous, because the old fallback still fired at that depth.\nIt carries three layers for that reason.\n
M3gA-Mind committed 3 months ago
20ba8c5
test(e2e): backfill coverage for the git config guard, the retained workspace denylist, and the null-classed driver refusal\n\nThree of the four gaps found auditing #5672, #5807, #5825 and #5847. Each test drives\nthe surface an agent actually calls, and each was checked by reverting its fix and\nconfirming the test fails naming its own assertion.\n\n- #5672 — a repository config naming a command does not get to run it, asserted through\n `GitOperationsTool::execute` rather than the private helper the unit suite uses. The\n assertion is a marker file the planted `core.fsmonitor` hook would create: an error\n alone would not distinguish "refused" from "refused after spawning git". Revert the\n guard and the hook runs *and* the tool returns a clean status payload, so the agent is\n told everything is fine while attacker-controlled code executes.\n A second test pins the other direction — an ordinary `git init` + identity still works\n — so a future tightening of `ALLOWED_REPO_CONFIG` that breaks real repositories fails\n here rather than in the field.\n\n- #5847 — the one behaviour deliberately retained when TinyPlace was deleted. Agent file\n tools cannot read or write `tinyplace/` inside the workspace at full autonomy, and the\n file is byte-identical afterwards, so a refusal that only prints an error would not\n pass. `redirect_links` and `codegraph` are asserted alongside it: all three are\n retained-after-removal entries with the same rationale, and a test naming only\n `tinyplace` would miss a regression that took all three. A control read of an ordinary\n workspace file keeps the test from passing because everything is blocked.\n\n- #5807 — importing into a driver deliberately given `class = "null"` names that driver\n and its class, and does not blame a build with no memory module. Driven through\n `migration_helpers::rpc::migrate_openclaw`, the function the `config.openclaw` RPC\n handler calls, with an explicit `Config` so the assertion does not depend on\n process-global state shared with the rest of the merged test binary.\n\n#5825 is deliberately not covered, and the reason is recorded rather than papered over:\nno provider reachable from an integration target exposes `as_scoring()`, so the only\ntest that could be written there asserts the fail-open fallback — which is the\npre-change behaviour and therefore passes with the fix reverted. A vacuous test that\nsatisfies the string-match gate would be worse than the gap.\n\nOne bug found while writing these: #5672's refusal message never reaches the agent. Every\noperation is preceded by a `rev-parse --is-inside-work-tree` probe that runs through the\nsame guarded function, so a refused probe collapses to "Not in a git repository" for a\ndirectory that plainly is one. The security property is unaffected; the diagnostic is\nlost. The test asserts the property that holds and carries a comment saying why it does\nnot assert the message.\n
M3gA-Mind committed 3 months ago
7cd885b
05d73c6
61edbb4