London DataTrading systems technology

Nexus deep diveDeliveryCompanion to step 8 · Change the system

Test, Merge, Ship.

Right-sized tests for every change, automated merge lanes and a guarded way into production.

Nexus runs its own CI on 29 self-hosted runners across 14 repositories and two hosts. A change pays only for the tests it needs. Approved work in the core repositories lands through merge lanes: one arms and merges approved work by itself, another batches it and tests it together on fresh main. The deploy tool refuses anything it can't trust. In the repository that carries the agent fleet's own tools, a broken main branch is found and reverted automatically, and green builds install themselves. Fast where it is safe, thorough where it matters.

Self-hosted runners29on two hosts, routed by capability
Workflow runs2,997in two weeks, across 12 repositories
Pull requests merged346in two weeks, across 9 repositories
Production deploys70in two weeks, across 8 services, every one in a ledger

Read on 2026-10-27 from the GitHub API and the deploy ledger. Two-week figures cover 13–26 October 2026. Pull-request and deploy counts exclude this website, and a batch counts once.

01One change

One trunk, two ways onto main

Changes in the core repositories follow the same route, whichever agent wrote them. Each stop is a gate in code, and a gate that is unsure takes the safe option. The route splits at one junction: how approved work lands.

  • Checks
  • Lands alone
  • Lands in a batch
  • Full suite on main
  • Ship
  • Red: found and reverted
The route from a pull request to production A pull request is pushed, the diff picks its tests, the checks run in parallel on self-hosted runners, and a second agent approves the exact commit. The route then splits. Most work lands alone, one pull request at a time, through a serial lane or GitHub auto-merge. The research service lands in batches built on fresh main and tested together. Both lines meet at main, where the full suite runs after merge and every night, and the change is then installed or deployed. A red loop from the full suite back to main shows a failure being bisected and reverted. Pusha pull request Classifythe diff picksits own tests Checksin parallel, onour own runners Approvea second agent,exact commit Lands aloneone at a time, by alane or auto-merge Batch builtapproved PRs,on fresh main Batch testedone full runfor them all mainone way in Full suiteafter mergeand nightly Shipinstall, orguarded deploy red after merge:bisect and revert
Most repositories land approved work alone. The research service, whose full suite is the heaviest, lands only in batches tested together on fresh main. After merge the full suite runs again, and in the tooling repository a red result is confirmed, bisected and reverted automatically. Merging never deploys: services ship on the operator's word, and the tooling installs itself from the newest green build.

Where the changes come fromThe pull requests on this page are written and reviewed by an AI agent fleet working from one shared board. How that works: Change the system.

02Right-sized tests

Pay only for the tests a change needs

A full suite is the safe default, but not every change needs one. Nexus picks the smallest selection that is still safe, and falls back to the full suite whenever it is unsure. In the research service the rules that choose are read from main, not from the pull request. Everywhere, a change to the selection rules gets the full suite, so a change can't lower its own bar.

  • Already tested

    A tree that has already passed the full suite isn't tested again. In the research service a push to main whose exact file tree passed skips the suite, and in the tooling repository so does an exact revert to the last green tree.

  • Docs

    Documentation, or code whose syntax tree hasn't changed, gets a docs check in a minute or two.

  • Scoped

    A change inside one mapped package runs that package's tests, plus a set of canaries that run on every source change.

  • Affected checks

    In the tooling repository, a pull request runs only the checks that cover the components it changes. The full suite runs after merge, once main has been quiet for a while, and again every night.

  • Full

    Anything uncertain gets the full suite: an unmapped path, a shared component, a change to the selection rules, or any error in the selector. In the research service the heaviest proofs run after merge and at night, and on a pull request only when it touches them.

03Onto main

One way onto main

Four core repositories protect their main branch: the research service, the tooling repository, the market-data service and its web app. The research service and the tooling repository land approved work through merge lanes, and the two market-data repositories through GitHub auto-merge. An approval names the exact 40-character commit it read. It carries to a later commit only when that commit just catches up with main and the author's own change is byte-for-byte what was approved; anything else needs a fresh review. The other repositories follow the same review rule as working practice, without branch protection.

  • A lane that arms itself. Every two minutes the tooling repository's lane arms each open pull request that is approved, green and within its rules, then merges them one at a time.
  • A batch lane. Since 9 October the research service's main branch has had one writer: a lane that tests approved pull requests together on fresh main before they merge. It has built more than 250 batches since 19 September and landed 193. When the queue is short a batch holds a single pull request; 35 of the 193 held two to five.
  • No self-merge. An author never queues its own pull request to merge. That happens only after an approval that still covers the head commit.
  • CI can't mark its own work. In the research service, a change to the CI itself merges alone, with the full suite, so it is never batched with work it would judge.
  • A fast route for fixes. In the tooling repository, repairs to CI get reserved capacity, so a broken pipeline is fixed quickly.
  • Flakes have owners. A failure is confirmed on the same commit before anyone acts. A quarantined test needs an owner and an expiry within seven days, and no repository may quarantine more than five.
How a failed batch finds its culprit A batch of four approved pull requests, A to D, fails. The lane splits it into A and B, and C and D. A and B pass on the current main and land. C and D are tested on the main that now includes A and B. They fail, so they split again. C passes and lands. D fails, so it is isolated as the suspect and sent back to its author. One batch, four pull requests ABCD AB CD C D red: split in half green: landson the current main red on the new main,so split again green: lands red: the suspectisolated and sent backto its author
When a batch fails, the lane doesn't re-run it until it passes. It splits the batch and rebuilds each half on the current main, one at a time, and the halves that pass land. The second half is tested on a main that already includes the first, because two halves that pass alone don't prove their union is safe. The suspect goes back to its author with the evidence, and it can only return with a new commit and a fresh review.
04Self-healing

Builds that repair and install themselves

The tooling repository carries the skills, rules and tools that all three vendors' agents run on. Its main branch now looks after itself.

  1. 1

    Confirm

    When the full suite goes red after merge, only the failing checks run again on the same commit. A flake is recorded, and nothing stops.

  2. 2

    Pause, bisect, revert

    If the failure repeats, merging pauses. The system bisects the merges since the last green build, in at most six probes, and opens an exact revert at the front of the lane. Seven reverts have been opened since 11 October, and five merged.

  3. 3

    Resume

    A fix item names the culprit on the work board, with the evidence attached. Merging resumes when the revert lands or a full run goes green.

Green builds install themselves

No hand-run release step.

  • When the after-merge suite passes, the system starts the installer itself, with a ten-minute timer as the fallback.
  • It installs the newest main commit whose full suite passed, for every agent seat, and nothing else.

Market-data tests stay off live data

Fast feedback without risk to live data.

  • Since 14 October the market-data service's tests run on a throwaway database cluster, not against anything live.
  • Coverage floors and minimum test counts mean a suite that quietly stops collecting tests can't pass.
05Into production

A deploy you can trust

Merging isn't shipping. Deploys happen on the operator's instruction, and the tool that runs them refuses anything it can't trust. In the two weeks to 26 October it shipped 70 times across 8 services.

  • Tested tree only

    It ships the merged, tested tree. Dirty trees, stale clones and rollbacks are refused by default. Standing a gate aside takes an explicit override, and the deploy log records it. Fixes go forward.

  • Proof is reused

    When CI is already green for the exact commit being shipped, the research service's gate runs a smoke check instead of the whole suite again.

  • Gate and health check

    It runs the service's deploy gate and a health check before it reports success.

  • Snapshot first

    It takes a snapshot before any deploy that changes the database.

  • Freeze windows

    Freeze windows are rows on the work board, and the deploy tool warns when one covers the service.

  • One ledger

    Every deploy writes a ledger row, so "what is live" is a query, never a guess.

  • Drift alarm

    When merged work waits too long to go live, a checker opens a work item on the board by itself.

06Runners

Runners chosen by capability, not by machine

29 self-hosted runners serve 14 repositories across two hosts. Workflows ask for a capability label, never a machine, so moving work means registering a runner, not editing workflows. A job whose label matches no online runner waits rather than fails, for up to a day.

Runner lanes on two hosts Nine lanes route jobs to runner pools by capability label. On the production host: tooling scope and host checks, 2 runners; research classify and host tests, 2; market-data database tests on their own database cluster, 1; and one runner for each smaller service, 11. On the CI compute host: research portable shards, 3; tooling pull-request shards, 6; the full suite on main after merge, 3, one of them shared with the pull-request pool; a runner kept free for CI fixes, 1; and the market-data portable lane, 1. Toolingscope andhost checks Researchclassify andhost tests Market datatests on its owndatabase cluster Serviceseach one'swhole workflow Researchportableshards Tooling PRsportableshards After mergefull suiteon main CI fixesfast route,kept free Market dataportablelane host2runners host2runners database1runner service11one per repo compute3runners compute6runners main-route31 shared ci-reserved1runner portable1runner Production host16 runners · short, host-bound jobs CI compute host13 runners · heavy, portable shards
Short host-bound jobs, and each smaller service's whole workflow, run on the production host. Heavy, portable test shards run on a separate CI host. Runners register per repository, so the research service and the tooling repository each have their own compute pool, sharing the CI host's processors. One CI runner carries two labels, so it serves both pull-request shards and the after-merge suite. That is why the pools add up to 14 on 13 runners.
  • No single runner is a point of failure. In the research service, every label is served by at least two runners.
  • Reserved slots. Short host-bound jobs have runners of their own, so long compute jobs can't crowd them out, and one runner is kept free for CI fixes.
  • Isolated. Runners run as their own services in a resource slice of their own, kept apart from the database and trading.
  • Measured weekly. An agent that owns CI publishes four targets and reports against them every week.

More runners is not more capacityThe CI host gives CI a fixed processor budget. When nine runners shared it on 26–27 October, test shards ran about three times slower than with six, and throughput fell by roughly half on our estimate. The pool went back to six. The lever now is less processor time per change: it is attributed to each check, so the most expensive can be cut first.

07Standard practice

Where our choices match standard practice

GitHub's own merge queue isn't available for these private repositories, so the lanes are built in-house. Most of what they do maps onto patterns that large engineering organisations have published, and the one partial match has its fix in review.

  • Batch merges, split on failure

    IndustryMerge queues batch pull requests. Bors-NG and Mergify split a failed batch and bisect it.

    NexusThe research service's lane splits a red batch in halves and retests each one on the current main.

    Matches
  • Run only affected tests

    IndustryTools such as bazel-diff, Nx and Turborepo run only what a change affects, and treat a change to shared configuration as affecting everything.

    NexusPath and package maps, plus a scan for the checks that reference a changed component. Anything unmapped, or a change to the maps themselves, gets the full suite.

    Matches
  • Fast checks before merge, everything after

    IndustryGoogle's TAP: presubmit runs fast, reliable tests, and postsubmit runs the rest, in batches under load.

    NexusIn the tooling repository: affected checks before merge, and the full suite after merge, once main is quiet, and every night.

    Matches
  • Keep main green

    IndustryGoogle's TAP finds the culprit and rolls it back, and Chromium closes the tree. Martin Fowler's advice: revert first, fix after.

    NexusIn the tooling repository: confirm on the same commit, pause merging, bisect, and put an exact revert at the front of the lane, all automatically.

    Matches
  • Quarantine flaky tests

    IndustryA flake passes and fails on the same code (Google). Buildkite and Datadog mute flaky tests, with owners and automatic clearing.

    NexusConfirmed on the same commit. At most five entries per repository, each with an owner and an expiry within seven days.

    Matches
  • Test the merged result

    IndustryThe "Not Rocket Science Rule": test the merge before it reaches main. GitHub's merge queue, GitLab's merge trains and Zuul exist to do this.

    NexusThe research service builds each batch on the current main, and the market-data service requires branches to be up to date. The tooling repository catches clashes after merge, and re-testing changes that interact before merge is in review.

    Partly
08What's next

In the pipeline

The aim is fewer full runs, less waiting and less hand-holding, with the safe fallback always there.

Now running
  • Automatic arming. Approved, green pull requests in the tooling repository are armed to merge without a manual step.
  • One full run, not several. The tooling repository's full suite moved to after merge, where one run covers every merge since the last.
  • The heaviest proofs after merge. In the research service they run after merge and at night, and on a pull request only when it touches them.
  • A deploy-drift alarm that opens a work item when merged work isn't live yet.
In review
  • Re-test only what interacts. Before the tooling repository's lane merges a pull request, it checks what has landed on main since that pull request's last green run, and re-tests on today's main only when something interacts. It will run first as a shadow that only reports.
Built, awaiting switch-on
  • Approvals that survive a catch-up. In the market-data service, an approval carries over when a pull request is brought up to date with main and the author's own change is byte-for-byte what was approved.
Planned
  • Less processor time per change, until the busiest repositories meet all four CI targets. Today they miss them, by a wide margin under load.
  • A CI view on the work board: runners by host, queues by pool and the merge lanes.

Sources, read 2026-10-27: the GitHub REST API for runner registrations, workflow runs (13–26 October 2026), merged pull requests in the same window, the research service's batch pull requests since 19 September and the tooling repository's revert pull requests since 11 October; the deploy ledger (13–26 October, excluding this website); the merge-lane, post-merge, testing-policy and CI-architecture documents on the handbook's main branch; the work board; and the CI owner's load reading of 27 October. Industry: GitHub merge queue, GitLab merge trains, Zuul gating, Mergify batches, Jane Street on the Not Rocket Science Rule, Bors-NG, bazel-diff, Nx affected, Software Engineering at Google, ch. 23, Chromium CQ, Fowler on continuous integration, Flaky tests at Google, Buildkite quarantine, Datadog flaky tests.

Want CI that earns its keep?

I can set up right-sized testing, merge lanes and guarded deploys on your own runners.