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(settings): cover the uncovered key-custody paths in RecoveryPhrasePanel\n\nRecoveryPhrasePanel.test.tsx (34 tests) covers the four modes and the\nreplace-confirm gate well, but measured it left the panel at 76.6% lines /\n73.8% branches — and the uncovered remainder is the part a user depends on to\nnot lose their wallet:\n\n - handleCopy's document.execCommand fallback: the only way a seed phrase\n reaches the clipboard when navigator.clipboard is unavailable (non-secure\n context, denied permission). Covers the ok/!ok branches and that the\n temporary textarea holding the phrase is removed afterwards.\n - handleViewCopy: the whole function was uncovered, both paths.\n - handleImportWordChange's paste handling: pasting a full phrase into one\n slot, which is how most people import. Covers the BIP39-length branch, the\n grid growing 12 -> 24, lowercasing, whitespace tolerance, the partial-paste\n fill-forward branch, and the slot-count clamp.\n - the generate-mode Save gate.\n\nTwo uncovered branches are deliberately NOT tested, and the file says so: the\nword-count error (:256-259) and handleSave's !confirmed early return\n(:288-291) are both unreachable through the UI because isImportComplete /\ncanSave gate the Save button first. Testing them would have asserted nothing.\n\n11 mutations run, each confirmed to fail naming the new assertion; source\nrestored byte-identical after each.\n\nRecoveryPhrasePanel: 76.6 -> 95.41% lines, 73.8 -> 84.52% branches,\n79.5 -> 93.18% functions. Settings suite 1005 -> 1022 tests, 0 failures.\nNo production code changed.\n
M3gA-Mind committed 3 months ago
fc5c167
f01cfee
test: address PR review — mock-admin port, vacuous assertions, suite registration\n\nYellowSnnowmann's blocker is correct and was the most damaging: three specs\ndefaulted the mock-admin port to 18402 instead of 18473. That literal is not\ndead code. `app/scripts/e2e-web-session.sh:12` sets E2E_MOCK_PORT WITHOUT\nexport and never exports it (verified: the only exports referencing it are the\nderived Composio/Telegram base URLs at :128-130), so Playwright never inherits\nit and the fallback is what resetMock/setMockBehavior actually dial. My local\nruns passed only because I exported the variable myself on the command line as\na fleet-concurrency measure; for CI and for anyone running `pnpm test:e2e:web`\nevery test in those files would have died in beforeEach on ECONNREFUSED. A\nport that exists to keep six concurrent workers off each other's services had\nno business being committed as a source default. All five specs now default to\n18473, with the env override retained.\n\nAlso fixed, each a case that could pass while proving nothing:\n\n - registry_snapshot: `if let Some(counts)` silently skipped every count\n assertion when `counts` was missing or non-object, so the case passed on\n `components` alone — the exact agreement it exists to pin. Now requires the\n object. Same for `graphs`, where `is_some()` accepted null or a scalar.\n - chat-model-override: the baseline label was allowed to be '', so an empty\n chip made before and after compare equal and the case passed vacuously.\n - chat-scroll-stick: `distanceFromBottom > 80` rejects a jump to the bottom\n but not a PARTIAL auto-scroll that drags the reader and still clears the\n threshold. Now also pins the viewport position of already-rendered content\n across the new turn, which is what "the view did not move" actually means.\n - chat-composer-attachment-gate: `Locator.isVisible({ timeout })` returns\n immediately — it does not honour the timeout — so the retry could fire a\n second setInputFiles while the first ingest was in flight, and\n handleAttachFiles appends without deduplication. Now waits with\n expect(...).toBeVisible().\n - EventLogPanel.sseConfig: fixture frames were terminated with one newline;\n real SSE frames end with a blank line. The panel's parser tolerates the\n short form, so the fixture would have kept passing if that parser were\n tightened.\n\nAgentsPanel: the orchestrator case is rescoped rather than repaired. It claimed\nto cover handleToggle's ORCHESTRATOR_ID early-return by clicking the switch,\nbut AgentRow renders that switch disabled, so the click never reaches the\nhandler and removing the guard alone would not fail it. My revert-proof missed\nthis because the mutation removed the guard AND the disabled prop together — a\nfault that changes two things proves neither individually. Renamed to describe\nwhat it honestly covers, with the reasoning in place.\n\nscripts/test-rust-e2e.sh: registers agent_approval_memory_coverage_e2e in\nALL_E2E_SUITES. Without it the dedicated Rust E2E lane skipped the entire new\nfile despite its _e2e name — the same failure the comment at :49-52 records for\nthe golden-fixture suites. This is a shared script; the change is a single\nalphabetical line with no conflict surface, and it is flagged in my report.\n\nNOT VERIFIED LOCALLY. Local builds and test runs are suspended fleet-wide, so\nnone of these changes has been executed. The vitest cases for AgentsPanel and\nEventLogPanel were run before that rule took effect (17 passed); everything\nelse — the Rust assertions, the port default, and all five Playwright specs —\nis reasoned from source and awaits CI. The revert-proofs these changes would\nnormally carry have not been redone.\n
M3gA-Mind committed 3 months ago
ad711a5
test(e2e): browser coverage for thread isolation during a stream\n\nA turn streaming on one conversation must stay attributed to it while the\nuser reads or starts another. The app models this per-thread — every\nselector in useOpenHumanExternalStore is keyed by the thread id it is\nhanded — but nothing in the browser suite exercised the switch. Thread\ncoverage was one history-persistence case and one rename/delete case.\n\nThree cases: the new thread offers no Stop control for the other thread's\nturn (a Stop there would cancel a turn the user is not looking at), the\nnew thread's transcript shows none of the streaming thread's content, and\nswitching back restores the original thread with its Stop control still\nlive. The content case waits for real streamed tokens first, so it is not\nracing an empty transcript — there is something that could bleed by the\ntime it switches.\n\nBehaviour was observed on the running app before any assertion was\nwritten, not inferred from source.\n\nEach case is proven by a fault that changes that case and leaves the\nothers alone, injected at the isolation mechanism itself:\n\n F1 lifecycle selector takes Object.values(...)[0] not [threadId]\n -> "no Stop control" fails\n F2 messages selector takes Object.values(...)[0] not [threadId]\n -> "transcript shows none of" fails\n G1 messages selector returns EMPTY for every thread\n -> "switching back restores" fails, while the two absence-based\n cases stay green because absence is still satisfied\n\nTwo earlier attempts proved nothing, and both failure modes are worth\nknowing. The first fault targeted selectedThreadActive in\nConversations.tsx; the live Stop is AuiIf(thread.isRunning), which comes\nfrom the external-store adapter, so nothing changed anywhere. The second\ncollapsed both selectors to Object.values(...)[0] — but thread A is the\nfirst entry, so the bleed coincidentally rendered exactly what the\nswitch-back case expects. It passed while its neighbours went red, which\nlooks like a successful proof unless attribution is checked per case.\n\nA fourth case was written and removed: it read activeThreadIds out of the\nRedux store, which is an internals assertion in a lane whose point is\nrendered state, and it duplicated what the switch-back case already\nproves through the UI.\n\nNot asserted, deliberately: the composer draft carries across a thread\nswitch (inputValue is one global useState while activeThreadIds,\nprocessingByThread and queuedFollowupsByThread are per-thread maps), so\ntext typed for one conversation sits in the next one's composer beside an\nenabled Send button. That is a product decision rather than a broken\ncontract; pinning it would entrench behaviour that may be wrong and force\nwhoever fixes it to delete the test. Written up as BUG-W2-UI-2 instead.\n
M3gA-Mind committed 3 months ago
aacc4ef
test(e2e): close a mount race in the attachment spec's attach helper\n\nThe confirmation run on restored source came back 14/15, failing `the\npicker attaches a file and the chip names it` — a case that had passed in\ntwo earlier runs, and whose immediate neighbour performs the same attach\nand passed in the same run.\n\nThe race is in the test, not the app. `ComposerAddAttachment` is a\nuseCallback whose identity changes with attachmentInteractionBlocked,\nattachments.length and maxAttachments (AssistantUiChat.tsx:160-185), so\nearly on a fresh page the hidden input can be replaced between\nsetInputFiles and React binding its onChange, and the change event lands\non a detached node. The failure screenshot shows a fully rendered, idle\ncomposer with [+] enabled and no chip. Seen once in ~15 runs, always on\nthe first case of the file.\n\n`attach()` now polls, re-issuing setInputFiles until the chip appears,\nbounded at 15s.\n\nA retry needs a higher bar than "the test passes now", because that is\nalso what a broken test does: the case must still fail when the behaviour\nis broken. Verified rather than assumed — re-ran fault A3 (onAttachFiles\nhanded an empty FileList) against the hardened helper:\n\n ✘ the picker attaches a file and the chip names it (16.0s)\n ✘ an attached file can be removed again (15.5s)\n ✘ an attachment keeps the Send affordance (11.2s)\n ✓ the [+] button is disabled while a turn streams (1.1s)\n ✓ the [+] button becomes usable again once stopped (1.2s)\n\nThe three ingest cases fail at the poll timeout — exhausting, not\npassing — while the two gate cases, which never ingest, correctly stay\ngreen. Restored and rebuilt clean: 15/15.\n\nWorth noting for whoever writes the next spec in this lane: this was\ncaught only by the "restore and re-confirm green" step at the end of the\nfault-injection loop. That run is the one most likely to execute under\ndifferent timing than the original green, so it is not ceremony.\n
M3gA-Mind committed 3 months ago
4f6ac25
test(e2e): browser coverage for the shipped chat composer and transcript\n\nFour Playwright specs, 15 cases, driving the real UI through the web e2e\nsession: which control is mounted in the composer's primary slot, the\nattachment gate, transcript scroll anchoring, and the model picker. Every\nassertion is on rendered state — mounted controls, contenteditable text,\nviewport position, aria/disabled state. None asserts a mock call.\n\nThese target the composer the product actually renders, which is NOT\nChatComposer.tsx. `Conversations.tsx:2539` picks\n`composer === 'mic-cloud' ? legacyMainPanel : assistantUiMainPanel` and\n`composer` defaults to 'text' (:255), so /chat renders the assistant-ui\nLexical composer. A DOM probe against the running app confirms it: the\npage contains `composer-human-mode` (AssistantUiChat.tsx:204) and not\n`human-mode-button` (ChatComposer.tsx:494), and `chat-message-input` is a\ncontenteditable (thread.tsx:346), not a textarea.\n\nThat distinction changes the assertions, not just the selectors. The live\nStop control is `AuiIf(isRunning)` with no typed-content term, so typing a\nfollow-up mid-stream does NOT revert it to Send the way the legacy\ncomposer does — the spec pins the shipped behaviour and says why, so it is\nnot "fixed" toward the legacy rule. The transcript likewise uses\n`turnAnchor="top"` (thread.tsx:224) rather than the legacy\n`useStickToBottom`, so a reader at the bottom gets the new turn anchored\ninto view rather than being held at the bottom.\n\nEvery case was verified by fault injection through the full loop —\ninject into app/src, rebuild the bundle, confirm the build exited 0, run,\nrestore, rebuild. The build's exit code is checked each time because a\nfailed build leaves dist-web stale and the spec then re-passes against the\nold bundle. All faults are term-drops or inversions rather than deletions,\nso noUnusedLocals cannot fail the build via TS6133. Four builds:\n\n A drop .trim() from showIdleAction; drop the gate term from the [+]\n disabled expression; ingest an empty FileList -> 6 cases\n B invert !hasComposerAttachments; invert the Stop render condition\n -> 7 cases\n C turnAnchor top->bottom; render Send unconditionally\n -> 4 cases\n D neuter the model pill's onValueChange -> 2 cases\n\nThree drafts did not survive that check and were changed rather than kept:\n\n - a model case asserting "choosing a provider updates the chip label"\n passed with the pill's handler replaced by a no-op. It captured the\n label AFTER selecting and only checked it was non-empty and stable —\n nothing compared it to the label before. Deleted rather than repaired:\n the only selectable provider in this fixture is the managed tier,\n which is already active, so a correct selection is legitimately a\n no-op with nothing observable to assert.\n - a scroll case expecting `distanceFromBottom <= 80` after a new turn,\n modelled on useStickToBottom's threshold. That hook belongs to the\n legacy transcript; measured against the shipped one it failed at\n 1448px while the UI behaved correctly. Retargeted to the contract\n turnAnchor="top" actually makes.\n - an assertion that scrollTop stayed put, deleted rather than weakened:\n appending a turn changes container height, so scrollTop legitimately\n shifts while the reader's view does not move.\n\nNo drag-drop or paste spec is included, deliberately. Probing the running\napp, a drop dispatched on every ancestor of the input — including\nassistant-ui's own AttachmentDropzone — attached nothing, while\nsetInputFiles in the same run worked. "Dropping while streaming does not\nattach" would therefore pass because dropping never attaches in any\nstate, which cannot distinguish a working gate from a dead gesture. The\nfinding is written up for a human to confirm with a real drag instead.\n
M3gA-Mind committed 3 months ago
a4e7c13
test(settings): cover CoreConnectionPanel's URL validation and HTTP warning\n\nThe sibling spec drives the save flow with a well-formed\nhttps://core.example.com/rpc every time, so `validate()`'s rejection arms\n(lines 195-208) and the plain-HTTP warning (225-231) were never\nexecuted — most of why the panel sat at 80.18% branch coverage.\n\nOne of those arms is a credential-leak guard, and it is the reason this\nfile exists. Its own comment: a `user:pass@host` URL "would be persisted\nand echoed back in the active-URL description, leaking a secret". A\nregression there does not throw — it writes the password to local storage\nand renders it back on the settings page. It had no test.\n\nEight cases in a new spec file: credentials in the URL rejected (also\nasserting the password appears nowhere in the rendered page), a\nusername-only URL rejected, a non-HTTP protocol rejected with its own\nmessage, an unparseable URL rejected, the plain-HTTP-to-public-host\nwarning shown, and three cases where it must stay quiet — localhost, a\nprivate-network host, and HTTPS.\n\nCoverage: 84.83 -> 89.32% statements, 80.18 -> 85.58% branches,\n88.88 -> 93.20% lines.\n\nVerified by mutation, one arm at a time: removing the credential guard,\nweakening it from || to && (which kills only the username-only case,\nconfirming the two are genuinely distinct), accepting any protocol,\nswallowing the parse error, suppressing the warning, dropping the\nlocal/private-host check, and dropping the protocol check each turned the\nmatching tests red.\n
M3gA-Mind committed 3 months ago
4ab504d
cb6aa3f
test(settings): cover EventLogPanel's SSE config frame\n\nBefore the stream sends events it may send a config frame, and that frame\ndecides how the log behaves for the rest of the session: `max_entries`\ncaps the in-memory buffer and `new_entries` ('top' | 'bottom') decides\nwhether arrivals prepend or append — which in turn decides which end is\ntrimmed at the cap, and where the panel scrolls.\n\nNone of it was executed. The sibling spec's `mockFetchSSE` helper only\nemits plain `data:` lines and cannot express a config frame, so lines\n114-117 and 127-131 were the panel's uncovered region and the reason it\nsat at 70.23% branch coverage.\n\nEvery failure mode here is silent: a dropped `new_entries` puts the\nnewest event at the wrong end, a dropped `max_entries` lets the buffer\noutgrow the server's cap, and trimming the wrong end discards the newest\nevents instead of the oldest. Nothing throws in any of those cases.\n\nSix cases in a new spec file, with a raw-SSE helper that can emit config\nframes: the newest-first default, 'bottom' inverting the order, the cap\ntrimming the oldest in each direction, an out-of-range `new_entries`\nbeing ignored, and the frame being consumed rather than rendered.\n\nCoverage: 90.98 -> 96.72% statements, 70.23 -> 84.52% branches,\n93.80 -> 100% lines.\n\nVerified by mutation: ignoring `new_entries`, ignoring `max_entries`,\ndropping the top/bottom enum guard, disabling the config-frame check,\ntrimming the same end in both directions, and flipping the default\ndirection each turned the matching tests red.\n\nTwo drafts did not survive that check and were changed rather than kept:\n\n - "does not render the config frame as an event row" passed with the\n config check disabled. It asserted on a name-filtered row list, which\n silently dropped the extra row, and on a `badge.unknown` key this\n panel never emits (unknown domains render as the uppercased domain).\n It now counts every rendered row.\n - an explicit `new_entries: 'top'` case was removed. It expected the\n same order as the default, so no single mutation could fail it\n without already failing the default case — it could not distinguish\n "honoured the frame" from "never read the frame".\n
M3gA-Mind committed 3 months ago
36824fe
test(settings): cover McpServerPanel's per-OS config paths and embedded mode\n\nThe sibling spec runs every case on macOS (its fixture hardcodes\n`os: 'macos'`), so `configFilePathFor`'s Windows and Linux arms were\nnever executed — lines 59-64 and 67-68, which is why the panel sat at\n68.18% branch coverage. Line 269, the `embedded` wrapper, was unreached\nfor the same reason: nothing rendered the panel with the prop.\n\nThese paths deserve pinning rather than eyeballing. The string is what\nthe "Config file" row shows and what a user is told to edit by hand; a\nwrong one sends them to a file that does not exist and nothing errors,\nbecause the value is only ever displayed. The four clients branch in\nthree different shapes — claude-desktop and zed have three arms each,\ncursor two, codex one — so the table is easy to get subtly wrong.\n\nSix cases in a new spec file: the macOS Application Support locations,\nthe Windows %APPDATA% / %USERPROFILE% backslash paths, the Linux\n~/.config fallthrough, codex asserted OS-independent, an unrecognised OS\nfalling through to Linux rather than rendering blank, and the embedded\nrender.\n\nCoverage: 84.84 -> 98.48% statements, 68.18 -> 88.63% branches,\n88.33 -> 100% lines.\n\nVerified by mutation, one arm at a time: deleting claude-desktop's and\ncursor's Windows returns, zed's macOS return, making codex OS-dependent,\nand widening isMac to `os !== 'windows'` each turned the matching test\nred.\n\nThe embedded case needed rewriting to survive that check. Asserting only\nthat the description was ABSENT when embedded passed even with the\n`embedded` branch deleted — the string it searched for was wrong, so it\nwas never present in either mode, and a negative assertion alone cannot\ndistinguish "correctly hidden" from "never rendered". It now asserts the\ndescription IS rendered normally and is NOT rendered when embedded.\n
M3gA-Mind committed 3 months ago
eee6200
4276628
test(settings): cover SystemDiagnostics' failure paths\n\nSystemDiagnostics was the weakest-covered of the eight settings panels in\nthis pass: 79.48% statements / 57.69% branches. Its sibling spec covers\nthe happy paths — Sentry row visibility per environment, a successful\nsend, the restart-tour row, the resolved logs path — and left every error\nbranch unexecuted (lines 32, 36-40, 88).\n\nThat matters more here than on most panels: this is the page a user is\nsent to when something is already broken, so a failure that renders\nnothing reads as "there is nothing wrong".\n\nSeven cases in a new spec file:\n - the logs-folder lookup rejecting, with an Error and with a bare\n string (the instanceof branch must not render "undefined");\n - the "Open logs folder" click, which had no test at all — it now\n asserts the invoke, its failure message, and that a retry clears the\n previous error rather than leaving a stale one on screen;\n - the Sentry test-event send rejecting, again for both Error and\n non-Error, asserting it does not still claim "Event sent".\n\nCoverage: 79.48 -> 94.87% statements, 57.69 -> 84.61% branches,\n80.00 -> 100% functions, 83.78 -> 100% lines.\n\nEvery case verified by mutation, one at a time for clean attribution:\ndropping the logs-path catch, removing the reveal invoke, swallowing the\nreveal failure, removing the leading setError(null), and swallowing the\nSentry catch each turned the expected tests red.\n\nA new file rather than an edit to the sibling: these need `invoke` to\nreject per-command, which the sibling's blanket mockResolvedValue(null)\ndefault would fight.\n
M3gA-Mind committed 3 months ago
988e5fa
test(settings): cover AgentsPanel's remove, toggle-failure and orchestrator paths\n\nAgentsPanel was the weakest-covered of the seven approval/agent settings\npanels: 79.03% statements / 62.50% branches, with `handleRemove` (lines\n77-87) having no test at all. Remove is the destructive action on this\npanel — it deletes a custom agent and resets a built-in — so it was the\ngap worth closing.\n\nSix cases added:\n - a failed toggle surfaces the API's own message, not the generic\n fallback, and does not leave the row stuck busy;\n - a non-Error rejection falls back to the i18n string rather than\n rendering "undefined";\n - deleting a custom agent calls remove and reloads the list;\n - resetting a built-in routes through the same remove endpoint — the\n label and the call diverge deliberately, so it is pinned;\n - a failed delete shows the error and does NOT reload, since reloading\n would redraw the row as if nothing happened and drop the error;\n - the orchestrator is never passed to setEnabled, asserted through the\n handler and not only via the disabled switch.\n\nCoverage: 79.03 -> 98.38% statements, 62.50 -> 75.00% branches,\n85.71 -> 100% functions, 79.62 -> 100% lines.\n\nEach case was verified by mutation — the covered behaviour was broken in\nAgentsPanel.tsx and the test confirmed to fail: the catch branch forced\nto the generic string, `String(err)` substituted for the instanceof\ncheck, `await load()` dropped from handleRemove, `remove(agent.id)`\nhardcoded, `load()` moved into `finally`, and the ORCHESTRATOR_ID guard\ndeleted alongside the switch's disabled prop.\n\nNo new spec files: the panel already had a test file, so these extend it\nrather than duplicate it.\n
M3gA-Mind committed 3 months ago
b51b97f
test(e2e): cover the agent, approval and memory controller gaps\n\nAdds wire-level e2e coverage for the eight RPC controllers that\n`scripts/check-domain-e2e-coverage.mjs` reported as uncovered, taking\nagent 7/12 -> 12/12, approval 3/5 -> 5/5 and memory 34/35 -> 35/35.\n\nEvery method is driven over the real JSON-RPC router rather than by\ncalling handlers directly. That matters because the checker's notion of\n"covered" is the string literal "openhuman.<method>" appearing anywhere\nin a tests/**/*_e2e.rs file — it never verifies the method is invoked.\nTwo of the eight (approval_get_gate_state, approval_preauthorize_flow)\nwere false negatives: they already had handler-level coverage in\ntool_registry_approval_raw_coverage_e2e.rs and scored 0 only because\nthose tests bypass the wire method name.\n\nIncludes an #[ignore]d reproduction of openhuman#5862: ComposioExecuteTool\nand ComposioActionTool declare PermissionLevel::Write but never override\nexternal_effect*, so they inherit the trait default of false and\nApprovalSecurityMiddleware — whose only gate predicate is\nexternal_effect_with_args — never parks them. Agent-initiated Composio\nwrites therefore run with no approval card. The legacy ComposioTool\nclassifies correctly (tools/direct_part_03.rs:66-80) but is not an agent\ntool, so the classification was simply not carried over when the surface\nwas split. The test asserts the correct behaviour and so fails today;\nit is ignored to keep the lane green and becomes the regression guard\nonce #5863 or an equivalent fix lands.\n\nEach test was verified by mutation: the covered behaviour was broken and\nthe test confirmed to fail naming its own assertion. Three drafts did not\nsurvive that check and were rewritten rather than kept:\n\n - an oversized-limit assertion (events.len() <= 1000) was unfalsifiable,\n since the queried run has no events;\n - a missing-run_id assertion matched .contains("run_id"), which also\n matches the downstream error's "run_id=" debug label — it could not\n tell rejection from acceptance-then-failure. It now matches the exact\n validate_params string;\n - a preauthorize idempotency assertion compared grant counts that are\n both empty when no gate is installed. It now pins the documented\n gate-absent contract instead, and says why the grant path belongs in\n the unit tests that own the gate lifecycle.\n
M3gA-Mind committed 3 months ago
ed30328