Docs

Turnstone

How Turnstone syncs a repository

When Turnstone reads your issues, what it reads, and what it does with an issue that has no facts.

View as Markdown

On this page
  1. When Turnstone syncs
  2. What a sync reads
  3. Separate issues repository
  4. Missing or invalid facts

A sync is one read of a connected repository. Turnstone reads the issues that Testkit filed and takes the facts from each issue. The dashboard's charts come from those facts. A sync writes nothing to GitHub or Gitea.

When Turnstone syncs

Turnstone syncs a repository at these times:

  • When you connect the repository to a project. This sync reads every issue that carries the testkit label.
  • Every 5 minutes after that. This sync reads the issues that changed since the last sync.
  • Once a day. This sync reads every issue again.
  • When you select Sync now. This sync also reads every issue.

Use Sync now when you filed a bug or changed a label and you want the dashboard to show the change before the next scheduled sync. Owners and admins see the button.

  1. Open the project.
  2. In the Issue sync panel, select Sync now.

The same panel is on the project's connection settings page, under Settings, then Connection. It shows when the last sync ran and whether that sync read every issue. If a sync fails, the panel gives the reason.

What a sync reads

Turnstone reads only the issues that carry the testkit label. Testkit puts that label on every issue it files. Turnstone does not read the other issues in the repository.

From each of those issues, Turnstone reads the state, the dates, the labels, and the facts block in the body. Turnstone also reads the commit that closed the issue and the commit that introduced the bug, with that commit's pull request. Facts lists each fact and its source.

Turnstone keeps the facts. It does not store the issue's title or its text.

Separate issues repository

Turnstone reads issues from the connected repository unless you name another one. Name another one when Testkit files your bugs in a different repository from the one that holds the code. In Testkit, bugs.repository in testkit.config.ts sets that repository.

If your testkit.config.ts sets bugs.repository, enter the same repository in the issues repository field. The field is on the project's connection settings page, and it is optional. Turnstone then reads the issues from that repository.

Turnstone needs read access to the issues repository too. On GitHub, install the Turnstone GitHub App on it.

When you change the issues repository, Turnstone deletes the facts it stored for the project. It then reads every issue from the new repository.

Missing or invalid facts

Testkit writes a facts block into the body of each issue it files. An issue with the testkit label can still reach Turnstone in one of these two states:

  • No facts block. The body has no facts block. For example, someone added the testkit label to an issue by hand.
  • Invalid facts block. The body has a facts block that Turnstone cannot read. For example, an edit broke the JSON, or the block has a format version that Turnstone does not know.

Turnstone keeps the issue in both cases and records which case applies. The bug keeps the facts that do not come from the block. Those facts are its issue number and link, its state, its dates, its severity, and its area id. Turnstone takes no fact from the block, so the bug has no cause, no impact, and no introducing commit.

To repair an invalid block, edit the issue body so that the block follows the bug record format. A later sync reads the repaired block.

  1. OverviewStartWhat Testkit is, and what you need to run it.
  2. Get startedStartFive steps from install to a merge gate.
  3. Test filesWrite testsWhere a test lives and what its name means.
  4. Contract testsWrite testsCall your running service from Node.
  5. HTTP testsWrite testsDrive routes with k6, signed in as named actors.
  6. Browser testsWrite testsAssert on a real page in Chromium.
  7. Database testsWrite testsRun SQL against a Postgres that Testkit builds.
  8. CIRunOne command decides whether a pull request merges.
  9. ResultsRunWhere a run's evidence lands and how to read it.
  10. CLIRunEvery command and flag.
  11. ConfigurationRunEvery field of testkit.config.ts.
  12. CampaignsHunt bugsGive your agent a target and collect proven bugs.
  13. Bug reportsHunt bugsThe five things every issue states.
  14. TurnstoneTurnstoneWhat the dashboard keeps, and what it never stores.
  15. Connect GitHubTurnstoneConnect a repository, and see the access Turnstone asks for.
  16. Connect GiteaTurnstoneAdd your Gitea host, then connect a repository.
  17. SyncTurnstoneWhen Turnstone reads your issues, and what it reads.
  18. FactsTurnstoneEach fact about a bug, and where Turnstone reads it.