Customer Readiness Tests#
These focused checks back the hosted and local companion parts of
build-loop-tests.md.
Local Companion Setup Test#
Prove hosted customers can prepare a repo without hand-editing config.
- Verify Settings → Agent connection shows the hosted package command
npm install --save-dev <host>/downloads/co-vibe.tgz, or an intentionalCOVIBE_COMPANION_INSTALL_COMMANDoverride. If using public npm, verifynpm view co-vibe version. - Run
npm exec -- covibe-local setup --base-url <host>and approve the browser device prompt; verify setup mints one token per detected agent into~/.covibe/credentials.json(or pass--token/ exportCOVIBE_MCP_TOKENfor automation). - Verify
.mcp.jsoncontains the Co-Vibe stdio bridge. - Verify
.claude/settings.jsoncontains the Claude Code session hooks. - Verify the raw MCP token is not written into either config file.
- Verify existing non-Co-Vibe MCP servers and Claude hooks are preserved.
- Verify
.covibe/telemetryexists for Codex/Cursor/provider usage JSON. - Verify setup prints status checks and submits the first snapshot inside a git repo.
- Run
npm exec -- covibe-local doctor --base-url <host>and verify it rechecks Node, git, token, token-safe MCP config, configcwd, Claude hooks, and server reachability without rewriting config; stale base URLs, stale working directories, or raw token values must fail. - Verify missing token is a hard failure before local config is written and a missing or hung running server is a bounded warning.
- Run
npm exec -- covibe-local snapshot --base-url <host>inside a git repo for manual resyncs, and verify API error messages do not echo raw token-shaped values. - Verify Co-Vibe stores branch, dirty count, ahead/behind, changed file paths, unpushed file paths, and diff hashes without file contents.
- Submit a second snapshot from another session with an overlapping dirty or unpushed file.
- Verify the snapshot response returns a warning to the agent and stores
repo.snapshot_conflict. - Write counter-only usage JSON into
.covibe/telemetry, flush withnpm exec -- covibe-local telemetry --base-url <host> --inbox .covibe/telemetry, verify the file archives under.covibe/telemetry/sentafter success, verify failed ingest leaves the file in the inbox for retry, and verify raw input/output/response-style payload envelopes are rejected before ingest. - Run
npm exec -- covibe-local telemetry --base-url <host> --codexwith local Codex state and logs databases; verify the first run primes.covibe/codex-usage-state.jsonwithout backfilling old totals, then a laterresponse.completedlog submits input, output, cache-read, and total counters throughcovibe_ingest_agent_telemetry; if the logs database is absent, verify no Codex usage event is submitted. - Run
npm exec -- covibe-local watch --base-url <host> --once --session-id <id>and verify it submits a snapshot, flushes telemetry inbox files, syncs Codex split usage counters when present, heartbeats the session, rejects invalid numeric flags, and does not submit file contents, transcripts, prompts, responses, raw SSE bodies, aggregate thread counters, or logs. - Verify the Settings → Agent connection command does not prompt for or put
a raw token on the setup command line (setup uses the browser device
approval instead), chains the copied commands so setup/doctor do not run
after an install failure, does not start a foreground watch loop (setup
installs the background machine service by default;
--no-serviceskips it, and a temporary npx-cache install is refused with a hint), shows a separate copyablenpm exec -- covibe-local watch --base-url <host>command, and verify setup still accepts--tokenwithoutCOVIBE_MCP_TOKENin the environment for automation, uses it for readiness/snapshot calls, accepts--flag=valuesyntax, and does not print or store it. - Verify setup rejects credential-bearing, callback, path, query string, and hash
--base-urlvalues before writing.mcp.jsonor Claude settings. - Verify unknown setup flags and extra positional arguments fail before writing
.mcp.jsonor Claude settings. - Run
npm run smoke:packageand verify a packed package installs into a clean external repo, preserves existing config, exposescovibe-local --help,covibe-local doctor,covibe-mcp --help, andcovibe-claude-hook --help, writes package-backed MCP/Claude hooks, creates.covibe/telemetry, exposesnpm exec -- covibe-mcp, runsnpm exec -- covibe-local watch --base-url <host> --once, and does not store or print the raw token.
Hosted Deployment Canary Test#
Prove the hosted product is ready before customers connect local companions.
- Run
npm run check:deployto verify the Docker and standalone output contract. - Run
npm run readiness:customerwith Docker, WorkOS env, and enough free disk; verify its preflight fails fast, reports every unavailable prerequisite together, and gives safedocker system df/docker builder prunecleanup guidance, including Docker reclaimable-space hints when Docker responds. Usenpm run readiness:customer -- --preflight-onlyfor quick prerequisite-only checks before launching the longer build/test/container sequence. - Run
npm run smoke:containerwhere Docker is available to prove the hosted image boots and fails closed without WorkOS env. - For our hosted Docker path, verify
docker-compose.ymluses WorkOS mode,/app/datapersistence, and either a configured external HTTPS load balancer or the built-in Caddy proxy profile:docker compose --profile proxy up -d --build. - Run
npm run db:postgres:init,npm run smoke:postgres,npm run smoke:postgres:runtime, andnpm run doctor:productionwith the deployed WorkOS environment. Real hosted origins and localhost rehearsals must use PostgreSQL; the local companion does not run a database. - Before a permanent domain exists, optionally run
npm run readiness:hosted:https-rehearsalwith authenticatedngrokto prove the public HTTPS contract against a temporary WorkOS-mode container. - Run
npm run readiness:handoff -- https://...against the permanent customer origin. It must reject localhost, private-network, HTTP, callback, path, query, hash, credential-bearing URLs, and temporary tunnel domains. Forhttps://co-vibe.dev, do not run this until security reviews are done and Cloud SQL/PostgreSQL env is configured. It must run a fast/api/health,/api/mcp, and/downloads/co-vibe.tgzpreflight plusdoctor:productionbefore the long local gate, including exact compact MCP tools, sign-in reachability, protected API rejection, unauthenticated token creation rejection, hidden local-only routes, malformed MCP envelope rejection, and missing/invalid MCP-token rejection, plus token-shaped response leak checks, and companion package identity before customer readiness and permanent hosted readiness. - Verify
/api/healthreturnsok,checks.auth = "workos", and at least 8 MCP tools. - Verify
/api/mcplists exactly the eight compact public tools and no legacy tools. - Verify
/downloads/co-vibe.tgzis the minimalco-vibecompanion package without unexpected dependencies or app files, installs in a throwaway repo,covibe-local --help,covibe-mcp --help, andcovibe-claude-hook --helprun,covibe-local setupwrites token-safe config,covibe-local doctorpasses token/config/server/hook checks, invalid-token manualcovibe-local snapshot --base-url <host>fails without echoing the raw token,covibe-local watch --base-url <host> --oncestarts the separate sync loop, setup reports the first snapshot result without file contents, andcovibe-mcpexposes the public tools. - Verify
/auth/sign-inresponds with a redirect to the hosted WorkOS AuthKit page (the canary accepts a 3xx with aLocationheader). - After a first sign-in with a fresh user, verify
/onboardingcreates the tenant and first workspace and lands on the dashboard; a user invited to a tenant that already has members sees the access-pending panel instead. - Verify
/api/state, token list, and token creation reject unauthenticated users. - Verify local-dev-only routes return 404 in WorkOS mode.
- Verify
/api/mcprejects a missing or invalid MCP token and does not echo the raw token.