---
name: test-t3-app
description: Launch and verify Akeru Bot web and desktop in isolated development environments. Use for browser testing, Electron-specific checks, pairing recovery, debug access, and fixture setup.
title: test-t3-app
canonical_url: https://skilld.dev/gh/opencoredev/akeru-bot/test-t3-app
last_updated: 2026-10-22T21:17:00.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/opencoredev/akeru-bot/test-t3-app/agents/openai.yaml), [references/sqlite-fixtures.md](https://skilld.dev/api/skills-raw/opencoredev/akeru-bot/test-t3-app/references/sqlite-fixtures.md).
>
> If the user asked to install this Skill, run `npx skilld install opencoredev/akeru-bot/test-t3-app`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/test-t3-app`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/opencoredev/akeru-bot/test-t3-app) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/test-t3-app`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/test-t3-app --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/test-t3-app --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Test Akeru Bot web and desktop

Read [the verification policy](../../../docs/internals/verification.md) before launching a client. It defines authorization, coverage, evidence, and environment lifetime. For native mobile testing, use [`test-t3-mobile`](../test-t3-mobile/SKILL.md).

## Find or start the environment

1. Run commands from the repository root. Run `vp run dev:status` to inspect the current environment without starting it. Reuse an owned healthy environment and its authenticated browser context.
2. Use the worktree-local `.akeru` home. For a separate test, create a temporary directory and retain its absolute path. An explicit home stores runtime state in `<home>/userdata`.
3. Run `vp run dev` in the background. Use `--home-dir <path>` only for a deliberately selected isolated home. Add `--share` only when the user requests access from another tailnet device.
4. Retain the task handle, selected ports, home, and startup output. Read actual ports from `[dev-runner]`; occupied ports can shift them.
5. Confirm the selected home before loading fixtures or pairing. Worktree defaults outrank ambient home settings. Never start a test server against the live `~/.akeru/userdata` database.

The setup script copies optional project `.env` configuration into each new worktree. Existing `.env` files are preserved. If setup reports a legacy symlink, replace it with a private copy before editing configuration. Keep secrets out of test evidence.

Browser dev is single-origin. Vite proxies backend requests; leave `VITE_HTTP_URL` and `VITE_WS_URL` unset. Automated runs leave browser auto-open disabled so an uncontrolled tab cannot consume the startup token.

## Pair the controlled browser

1. Load the browser skill for the tool available in the current harness. With `agent-browser`, read its skill and run `agent-browser skills get core --full` before the first browser action. Keep one background browser session for this task.
2. Open the complete startup URL ending in `/pair#token=...` once. Preserve the fragment exactly.
3. Wait for the pairing exchange and redirect. Verify that the intended environment and projects appear.
4. Continue in the same browser context. A pairing page or disconnected empty view does not prove a connection.

Recover an expired or consumed token with `node apps/server/src/bin.ts pair`. If the server uses an explicit home, pass `--base-dir <same-absolute-path>`. Discovery reads the running server's origin, including its shared origin.

Recovery tokens have standard client scopes. The startup URL has admin scopes needed for Settings → Connections management. For that flow, restart only the owned test server and use its new startup URL.

Keep tokens out of screenshots and durable evidence. A human and an agent need separate tokens. When handing over shared access, first check the shared bare origin in the browser without consuming the human's token. Then provide the full fresh pairing URL to the user.

## Prepare data and verify behavior

Read [SQLite fixtures](https://skilld.dev/api/skills-raw/opencoredev/akeru-bot/test-t3-app/references/sqlite-fixtures.md) when preparing data or inspecting state. Prefer deterministic fixtures for repeatable visual checks. Use a safe snapshot of real data when reproducing a data-specific defect.

Exercise the affected flow using clicks, typing, submission, and navigation. Apply the coverage and evidence checks in the verification policy. A screenshot alone is not a behavior test.

## Desktop-specific verification

Use a web pass for shared renderer-only changes. Run Electron when a change touches the desktop shell, IPC, native menus, protocol links, preload, packaged origins, startup, or process cleanup.

1. Build with `vp run build:desktop`. For an automated startup check, run `vp run test:desktop-smoke`. The smoke script creates private application and OS home directories and stops its captured Electron process group.
2. For interactive inspection, use the installed raw Electron executable with `apps/desktop/dist-electron/main.cjs`. Resolve the executable and create its private environment with `resolveSmokeElectronPath` and `createSmokeEnvironment` from `apps/desktop/scripts/smoke-test.mjs`. Create the returned home, temporary, and config directories before spawning. Retain the temporary root and captured process group.
3. Set `T3CODE_HOME` and `AKERU_HOME` to the same isolated fixture home. Use a different home from any running backend. Pass `--remote-debugging-address=127.0.0.1 --remote-debugging-port=<free-port>` to that Electron process.
4. Attach the supported browser tool to that exact Electron instance. With `agent-browser`, use a named session and `connect <port>` after loading its version-matched guidance. Confirm the app and environment before acting.
5. Exercise the Electron behavior itself, then recheck after the relevant reload or restart. A successful external web tab does not prove shell behavior. Use native automation only when browser tools cannot reach the control, within the verification policy's authorization boundary.

`--home-dir` isolates server data, not Electron's OS profile. The branded development launcher can also register OS protocol handlers. Use the raw runtime for isolated checks; test the branded launcher only when its OS integration is in scope and authorized. Startup log markers prove less than renderer content and interaction. Packaged-artifact tests must also isolate the OS home; `--user-data-dir` alone can be overridden by the app.

The debug port is local test access. Do not expose it through a tunnel. If attaching is unavailable, report the missing tool and what focused tests could prove instead.

## Diagnose and finish

- Run `vp run dev:status` to confirm the selected home and runtime state before diagnosing an unexpected screen.
- Inspect `<home>/userdata/logs/server.trace.ndjson` for explicitly selected or worktree homes. See [observability](../../../docs/operations/observability.md) for trace fields and provider logs.
- Preserve background stdout/stderr for startup failures. Share only the errors relevant to the failed action.
- If pairing fails, mint a fresh token and confirm home and origin rather than retrying the same URL.
- Retain or tear down the environment according to the verification policy. Stop only the task or process group captured at launch.
