An app started in the job
A hosted run can only test a product that Trawler’s runners reach over the internet. To test the build of a pull request without publishing it, run the product inside the CI job and let the job carry out the run: that is --runner own. The product listens on localhost, trawler-ci starts Trawler’s runner in the same job, and the only connection that leaves the job is the runner’s outbound one to Trawler. Nothing is exposed to the internet.
The GitHub Actions page has a complete workflow. This page explains what happens in it.
How the run goes
Section titled “How the run goes”- The job starts the product and waits until it answers.
- The job checks Trawler out and installs it, with Chromium.
trawler-ci run --runner own --url http://localhost:3000asks Trawler for a run withexecutionset to"own"and the address inurl. Trawler’s own runners never take such a run: it waits as Queued, with Waiting for a runner. on its page. If no runner takes it within 20 minutes, Trawler stops it: No runner picked this run up within 20 minutes, so it was stopped.trawler-cistarts a runner,trawler-runner work, with the API token as its runner token and the run’s id inTRAWLER_RUN_ID. It is the same program as the local runner and as Trawler’s hosted runners. It asks Trawler for work, and takes the jobs of that run and no other: the sign-in checks of the plan’s stored accounts, the people’s sessions, the grouping of reports, every replay and every judge call. Another runner of the workspace, such as a local runner someone left working, never takes a job of a run with--url: only a runner given that run does.- For each job the runner opens Chromium in the job, goes to the address, and sends what happens back to Trawler. Its model calls go through Trawler, which adds the workspace’s key; the key never reaches the job.
- The run page follows the run as for any run. When it has ended,
trawler-ciprints the result, comments and stops the runner. If the run has not ended when the command leaves, it stops the run too; see If the job ends early.
With --conversation every person needs a runner at the same time, so trawler-ci starts one for each person. Otherwise one runner does all the jobs of the run, one after another.
What the job needs
Section titled “What the job needs”- Outbound access to the address of the app,
app.usetrawler.com. The runner connects out to Trawler; Trawler never connects in. - Node.js 24 or later, a checkout of Trawler with
npm cirun in it, and Chromium installed through Playwright, as for the local runner. On a Linux job,npx playwright install --with-deps chromiumalso installs the system libraries. - The product, started and ready before
trawler-ciruns. The command does not start it and does not wait for it. - An API token, and no model key: the key stays with Trawler.
A runner that Trawler turns away for good does not retry for ever. When the checkout is of another version than the app’s, Trawler answers 426 with upgrade the runner; when it does not know the token, for instance because it was revoked while the command ran, it answers 401, unknown runner; any other refusal of the claim, bar a 408 or 429, ends it the same way. The runner prints one line behind [runner] in the job’s log and exits with code 1:
claim failed for good, the runner is stopping: this runner is too old for the control plane (HTTP 426): … upgrade the runnerclaim failed for good, the runner is stopping: the control plane does not know this runner (HTTP 401); check the token the runner was started withclaim failed for good, the runner is stopping: the control plane refuses this runner's claims (HTTP 4xx): …with Trawler’s own words after it
trawler-ci sees the runner has gone within 5 seconds, stops the run and fails the job with error: the runner exited with code 1 before the run finished; see the [runner] lines above. Check out the version of Trawler the app runs and install again, or create a new token. A network failure or a 5xx is not permanent: the runner prints claim failed: … and tries again every 5 seconds.
The address under test
Section titled “The address under test”--url names the address the people start from, such as http://localhost:3000. Left out, the run tests the project’s own address, which the job’s network must then reach. The origin of --url is added to the origins the people may open, so the product can load its own pages; every other origin is blocked, as in any run. See Where the people may go.
A service next to the app in the job, such as a mail catcher whose inbox the people open, is another origin. Allow it with --allow-origin <address>, given up to 5 times; it needs --runner own and --url, and only the origin of each address counts, not its path. The Run API takes the same as allowedOrigins. Without it the browser blocks the inbox like any other address. See GitHub Actions.
A project for a product that only the job can reach, such as an app started on localhost, is set up from a description you write, since Trawler cannot read its page: see A product on a private network. Its runs reach it through a runner that can, such as the job’s own runner.
A hosted run takes no --url: the app refuses it. trawler-ci warns a hosted runner cannot reach localhost; use –runner own for a server started in this job when it sees one.
What goes to Trawler
Section titled “What goes to Trawler”The people use the product in the job’s Chromium, and the same things reach Trawler as in a hosted run:
- Events: every step with the page it was on, the notes the people write, their findings with the steps and what they saw, goals reached or not, and, with a conversation, what they say to each other.
- Screen captures: one when a person reports a finding, and one where each replay ended, with passwords and other secrets blacked out and kept for 30 days. See What is stored.
- Model calls: the text of the pages the people read, their briefs, goals and notes, the lead’s brief for a pull request, and for replays and the judge the steps and reports compared. They go to Trawler and from there to the model provider, with the secrets masked.
- The pull request: its number, title, description, changed files, branches, commit, repository and address, kept with the run, and the description of the CI setup if there is one. Only the title, description, changed files and the setup description are read, to plan the run.
What stays in the job: the product itself and its source, every other file and variable of the job, and the passwords of accounts from the job, which the runner types into the product and masks in everything it reports.
How it differs from a hosted run
Section titled “How it differs from a hosted run”Everything about the run itself is the same: the plan, the people, the cap, the report, the replays and the judge. What differs is where the browser is.
- The browser reaches whatever the job’s network reaches,
localhostincluded. A hosted run’s proxy, which refuses private addresses, and its separate operating-system user for the browser are part of Trawler’s runners, and the job has neither. The browser still opens only the allowed origins. - The run is only as available as the job: the machine, its Chromium and its network are yours.
- The run counts toward the workspace’s daily runs and monthly budget like any other.
- A run with
--urldoes not take the project’s place: runs of different pull requests go side by side, see Newer pushes and other pull requests.
Which jobs a runner takes
Section titled “Which jobs a runner takes”A runner that trawler-ci starts takes only the run its command started: the command passes the run’s id in TRAWLER_RUN_ID, and Trawler hands the runner jobs of that run alone. Another project’s own-runner run is never taken by it, whatever the token’s scope.
A runner you start by hand with trawler-runner work and an API token, without TRAWLER_RUN_ID, takes the jobs of any own-runner run without --url of the token’s workspace, or of its project if the token is for one project. With TRAWLER_RUN_ID set to a run’s id, it takes that run’s jobs only. A run with --url is taken only by a runner started with its id, which is what trawler-ci does.
A token for one project is still the better choice for a CI job: it can only start, read and stop runs of that project, and carry out only that project’s runs. See API tokens.
Newer pushes and other pull requests
Section titled “Newer pushes and other pull requests”- A newer push replaces the older run. A run started for a pull request stops the earlier run of the same project, repository and pull request number that is still Queued or Live, hosted or own. The older run ends Stopped, and its page reads A newer push to the same pull request started another run, so this one was stopped. Its job finds out, prints Run #17 was stopped because a newer push to this pull request started another run, so it does not pass or fail the job. Report: …, posts no comment and exits with
0. A run without a pull request number is never replaced. - Pull requests run in parallel. A run on an own runner with
--urldoes not take the project’s place: the runs of different pull requests go side by side, and neither waits for a run started from the app or on the project’s own address. A workspace may have 5 runs going on own runners at once,--urlor not. The sixth is refused with This workspace already has 5 runs going in CI jobs, the most it may have at once. … andtrawler-ciwaits and tries again, see When a run cannot start yet. A replaced run is not counted. - Other runs wait for the project. A hosted run, and an own-runner run without
--url, which tests the project’s own address, are one at a time on a project: while one is Queued or Live, the next is refused with Run 0007 is still going on this project. … andtrawler-ciwaits.
Pausing a project stops every run going on it, see Pausing runs.
If the job ends early
Section titled “If the job ends early”The command stops its run when the job is cancelled, which sends it SIGINT or SIGTERM, when --timeout-minutes runs out, and when it leaves before the run has ended for another reason, such as a runner that exited. The run is stopped with Stopped from CI: the job timed out, was cancelled or was interrupted before the run finished. on its page, what it found so far stays, and the project is free for the next run. A cancelled job therefore leaves no run behind, as long as the command gets the signal and can reach Trawler. See Stopping the run.
What the command cannot do is run after it is killed outright, with SIGKILL, or when the machine is lost, and a stop that Trawler could not be reached for fails with a warning. Trawler then stops the run itself: it keeps track of when the command last asked about it, and a run that has not been asked about for 3 minutes is stopped, checked once a minute. The run page reads The CI job that started this run stopped asking about it, so the run was stopped., and what it found so far stays.
Until then the run still counts. A project runs one hosted run at a time, so a next start of one is refused with Run 0007 is still going on this project. Wait for it to finish or stop it, then start again., and a run on an own runner counts toward the 5 of the workspace. Open the run and choose Stop run to free the project sooner.
Two limits apply to a run whatever the job does: an own-runner run that no runner takes is stopped 20 minutes after it started, and any run is stopped 3 hours after a runner picked it up, see the 3 hours.