|
| 1 | +# Live deployment verification |
| 2 | + |
| 3 | +Run `liveDeployment.mjs` with Node 24 on macOS or Linux with Docker available. |
| 4 | +It builds and installs the actual npm tarball in a disposable directory, drives |
| 5 | +the interactive CLI through a PTY, starts the real Sourcebot/Postgres/Redis stack, |
| 6 | +onboards a synthetic owner through Chromium, verifies indexing and authenticated |
| 7 | +search, then verifies health, search, and install-ID continuity after restart. |
| 8 | + |
| 9 | +Pull `docker.sourcebot.dev/sourcebot-dev/sourcebot:v5.1.13`, `postgres:16`, and |
| 10 | +`redis:8` first. The default scenario is `github_repo`. For the public/configuration |
| 11 | +matrix, set: |
| 12 | + |
| 13 | +```sh |
| 14 | +SETUP_TEST_LIVE_CASES=github_repo,github_org,github_user,gitlab_project,gitea_repo,gerrit_project,remote_git,local_root,local_wildcard,local_nested,auto_start,ai_all \ |
| 15 | +SETUP_TEST_LIVE_OUTPUT=/absolute/path/outside/the/repository \ |
| 16 | +node packages/setupWizard/tests/e2e/liveDeployment.mjs |
| 17 | +``` |
| 18 | + |
| 19 | +The optional `anthropic` scenario reads `ANTHROPIC_API_KEY` from development env |
| 20 | +files under `SETUP_TEST_CREDENTIAL_DIR`. Never pass the credential as a command |
| 21 | +argument. `ai_all` configures all twelve providers with synthetic values. Neither |
| 22 | +scenario calls Ask or an inference endpoint; neither proves credential validity |
| 23 | +or requires a Pro license. The tests check generated model configuration, |
| 24 | +credential references, container environment propagation, and successful startup. |
| 25 | + |
| 26 | +Every deployment uses a unique Compose project, random loopback HTTP port, and |
| 27 | +unpublished database/Redis ports. The Compose download is intercepted only to |
| 28 | +apply these isolation settings, pin the image, and disable deployment telemetry. |
| 29 | +The wizard's generated config, `.env`, identity, and local-repository override |
| 30 | +remain intact. Wizard PostHog requests use the real SDK and are routed to the |
| 31 | +local TLS collector; live public autocomplete/model-catalog requests remain real. |
| 32 | +This suite does not forward to production or dev PostHog. The separate dev smoke |
| 33 | +test provides actual ingestion/query evidence. |
| 34 | + |
| 35 | +Public fixtures are bounded: one explicit repository/project per host, the |
| 36 | +small `chalk` organization, and the `octocat` user. Organization/user tests obtain |
| 37 | +the expected repository count before starting and require all repositories to |
| 38 | +be discovered and indexed. Multi-local tests clone two distinct origins because |
| 39 | +Sourcebot deduplicates multiple local clones of the same origin. |
| 40 | + |
| 41 | +Each scenario records success/failure and removes its containers, volumes, |
| 42 | +network, generated secrets, and temporary files in cleanup. Only redacted reports |
| 43 | +and browser screenshots remain when an output directory is supplied. Task-owned |
| 44 | +image downloads should be removed by the operator afterward without removing |
| 45 | +images that existed before the run. Do not commit generated artifacts. |
| 46 | + |
| 47 | +This live matrix supplements, not replaces, the deterministic collector, fault, |
| 48 | +transport, lifecycle, and platform suites. It does not establish live access to |
| 49 | +private/GHE/GitLab self-managed, Azure DevOps, or Bitbucket deployments, and does |
| 50 | +not claim every possible code-host scope or credential mode has live coverage. |
| 51 | +Unavailable integrations must remain explicitly unverified in the completion |
| 52 | +report rather than being inferred from fixture-based coverage. |
0 commit comments