The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Commits on main
fix(chat): hoist the Edit gate so coverage can see it\n\n`PR CI Gate` failed at 75% diff coverage, naming `thread.tsx:872` — the\n`{canEdit && (` gate — as the one uncovered changed line, while vitest's own\nreport showed the surrounding function exercised. Both agreed on the facts and\ndisagreed on the verdict: CI's v8 summary listed uncovered lines ending\n`...30,745,884,920`, and 872 was not among them.\n\nThe cause is instrumentation, not coverage. A bare JSX logical expression emits\nno `DA:` record on its own line, so `diff-cover` — which reads lcov, not the v8\nsummary — sees a changed line with no record and counts it missing. No test can\nfix that; the line has to become a statement.\n\n`const editAction = canEdit ? (…) : null`, rendered as `{editAction}`. Behaviour\nis identical. Verified in the lcov: the hoisted line now carries `DA:867,144`,\ni.e. 144 executions, where the JSX conditional carried no record at all.\n\nRevert-proofed after the change: forcing the ternary true fails\n`UserActionBar.test.tsx` at `toHaveLength(0)` with "expected <button …> to have\na length of +0 but got 1", and the sibling control keeps passing.\n M3gA-Mind committed 3 months ago
daad449 test(chat): cover the Edit gate in jsdom and retire the stale characterisation\n\nTwo things the browser spec could not do on its own.\n\n1. Diff coverage. `PR CI Gate` failed at 75% — `thread.tsx:872`, the\n `{canEdit && (` gate, was the one uncovered changed line. Playwright output\n does not feed `diff-cover`, which reads only Vitest and cargo-llvm-cov, so\n the browser spec cannot satisfy that gate however good it is.\n\n `UserActionBar` cannot be rendered on its own — `ActionBarPrimitive.Root`\n throws "The current scope does not have a `message` property" without an\n assistant-ui message scope, and exporting the component to reach it would\n widen the module surface for a test and still not supply the scope. So the\n test mounts the real `Thread` and seeds one user message into\n `thread.messagesByThreadId`, which is exactly what\n `useOpenHumanExternalStore` reads. That exercises the true render path.\n\n Revert-proofed: restoring the unconditional render fails\n `UserActionBar.test.tsx` at `toHaveLength(0)` with "expected <button …> to\n have a length of +0 but got 1", while the sibling control test — the message\n and its action bar render at all — keeps passing, so the fault is scoped.\n\n2. The #5882 characterisation test is retired rather than left to fail. It\n asserted `.aui-user-action-edit` had count 1 and that clicking it opened\n nothing — the pre-fix behaviour — and #5882 is merged, so it now sits on main\n asserting the opposite of this PR. It was written to go red exactly here; it\n has, and the honest response is to remove it and point at the post-fix spec\n rather than invert it in place and duplicate coverage.\n\n What that investigation established is kept in the file header: the edit\n composer is unreachable, so the Lexical comparison it was reaching for has to\n be done by behaviour instead.\n\n`tsc` in the e2e build caught a type error vitest did not — `ThreadMessage` has\nno `threadId` field. Fixed before this landed; worth noting because vitest alone\nwould have shipped it.\n\nVerified through the shared CI slot: vitest 2 passed, e2e build green,\nwarm Playwright run 6 passed (38.6s) across both specs. Ports 18404/17704/4404.\n M3gA-Mind committed 3 months ago
3320bf0